diff options
author | Pedro Alves <palves@redhat.com> | 2010-09-24 13:41:43 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-09-24 13:41:43 +0000 |
commit | b53a162374facf8ec3d09b5db6cba01c70e38d9c (patch) | |
tree | ce2c4b7dd533f35be90df39d46e9afc536894179 | |
parent | cf35638d431e230d51d54550e8a249e730264ea5 (diff) | |
download | gdb-b53a162374facf8ec3d09b5db6cba01c70e38d9c.zip gdb-b53a162374facf8ec3d09b5db6cba01c70e38d9c.tar.gz gdb-b53a162374facf8ec3d09b5db6cba01c70e38d9c.tar.bz2 |
gdb/
* amd64-linux-nat.c (compat_siginfo_from_siginfo)
(siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
si_code is < 0. Check for si_code == SI_TIMER before checking for
si_code < 0.
gdb/gdbserver/
* linux-x86-low.c (compat_siginfo_from_siginfo)
(siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
si_code is < 0. Check for si_code == SI_TIMER before checking for
si_code < 0.
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/amd64-linux-nat.c | 20 | ||||
-rw-r--r-- | gdb/gdbserver/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/gdbserver/linux-x86-low.c | 20 |
4 files changed, 38 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e335b68..b770356 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2010-09-24 Pedro Alves <pedro@codesourcery.com> + * amd64-linux-nat.c (compat_siginfo_from_siginfo) + (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when + si_code is < 0. Check for si_code == SI_TIMER before checking for + si_code < 0. + +2010-09-24 Pedro Alves <pedro@codesourcery.com> + * objfiles.h (ALL_OBJSECTIONS): Handle breaks in the inner loop. 2010-09-22 Joel Brobecker <brobecker@adacore.com> diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c index c0edc10..16e97a2 100644 --- a/gdb/amd64-linux-nat.c +++ b/gdb/amd64-linux-nat.c @@ -574,8 +574,10 @@ compat_siginfo_from_siginfo (compat_siginfo_t *to, siginfo_t *from) to->si_errno = from->si_errno; to->si_code = from->si_code; - if (to->si_code < 0) + if (to->si_code == SI_TIMER) { + to->cpt_si_timerid = from->si_timerid; + to->cpt_si_overrun = from->si_overrun; to->cpt_si_ptr = (intptr_t) from->si_ptr; } else if (to->si_code == SI_USER) @@ -583,10 +585,10 @@ compat_siginfo_from_siginfo (compat_siginfo_t *to, siginfo_t *from) to->cpt_si_pid = from->si_pid; to->cpt_si_uid = from->si_uid; } - else if (to->si_code == SI_TIMER) + else if (to->si_code < 0) { - to->cpt_si_timerid = from->si_timerid; - to->cpt_si_overrun = from->si_overrun; + to->cpt_si_pid = from->si_pid; + to->cpt_si_uid = from->si_uid; to->cpt_si_ptr = (intptr_t) from->si_ptr; } else @@ -628,8 +630,10 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from) to->si_errno = from->si_errno; to->si_code = from->si_code; - if (to->si_code < 0) + if (to->si_code == SI_TIMER) { + to->si_timerid = from->cpt_si_timerid; + to->si_overrun = from->cpt_si_overrun; to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr; } else if (to->si_code == SI_USER) @@ -637,10 +641,10 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from) to->si_pid = from->cpt_si_pid; to->si_uid = from->cpt_si_uid; } - else if (to->si_code == SI_TIMER) + if (to->si_code < 0) { - to->si_timerid = from->cpt_si_timerid; - to->si_overrun = from->cpt_si_overrun; + to->si_pid = from->cpt_si_pid; + to->si_uid = from->cpt_si_uid; to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr; } else diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index d769dd3..250729c 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,10 @@ +2010-09-24 Pedro Alves <pedro@codesourcery.com> + + * linux-x86-low.c (compat_siginfo_from_siginfo) + (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when + si_code is < 0. Check for si_code == SI_TIMER before checking for + si_code < 0. + 2010-09-13 Joel Brobecker <brobecker@adacore.com> * lynx-i386-low.c: New file. diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c index 8ddb553..49e9e55 100644 --- a/gdb/gdbserver/linux-x86-low.c +++ b/gdb/gdbserver/linux-x86-low.c @@ -792,8 +792,10 @@ compat_siginfo_from_siginfo (compat_siginfo_t *to, siginfo_t *from) to->si_errno = from->si_errno; to->si_code = from->si_code; - if (to->si_code < 0) + if (to->si_code == SI_TIMER) { + to->cpt_si_timerid = from->si_timerid; + to->cpt_si_overrun = from->si_overrun; to->cpt_si_ptr = (intptr_t) from->si_ptr; } else if (to->si_code == SI_USER) @@ -801,10 +803,10 @@ compat_siginfo_from_siginfo (compat_siginfo_t *to, siginfo_t *from) to->cpt_si_pid = from->si_pid; to->cpt_si_uid = from->si_uid; } - else if (to->si_code == SI_TIMER) + else if (to->si_code < 0) { - to->cpt_si_timerid = from->si_timerid; - to->cpt_si_overrun = from->si_overrun; + to->cpt_si_pid = from->si_pid; + to->cpt_si_uid = from->si_uid; to->cpt_si_ptr = (intptr_t) from->si_ptr; } else @@ -846,8 +848,10 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from) to->si_errno = from->si_errno; to->si_code = from->si_code; - if (to->si_code < 0) + if (to->si_code == SI_TIMER) { + to->si_timerid = from->cpt_si_timerid; + to->si_overrun = from->cpt_si_overrun; to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr; } else if (to->si_code == SI_USER) @@ -855,10 +859,10 @@ siginfo_from_compat_siginfo (siginfo_t *to, compat_siginfo_t *from) to->si_pid = from->cpt_si_pid; to->si_uid = from->cpt_si_uid; } - else if (to->si_code == SI_TIMER) + else if (to->si_code < 0) { - to->si_timerid = from->cpt_si_timerid; - to->si_overrun = from->cpt_si_overrun; + to->si_pid = from->cpt_si_pid; + to->si_uid = from->cpt_si_uid; to->si_ptr = (void *) (intptr_t) from->cpt_si_ptr; } else |