public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/11842] New: compat_siginfo_from_siginfo and siginfo_from_compat_siginfo are wrong
@ 2010-07-26  9:37 jan dot kratochvil at redhat dot com
  2010-07-26  9:39 ` [Bug gdb/11842] " jan dot kratochvil at redhat dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2010-07-26  9:37 UTC (permalink / raw)
  To: gdb-prs

Only biarch gdb is affected.

#include <unistd.h>
#include <sys/syscall.h>
#include <signal.h>
#define tgkill(tgid, tid, sig) syscall (__NR_tgkill, tgid, tid, sig)
int
main (void)
{
  return tgkill (getpid (), getpid (), SIGUSR1);
}

gcc -o 1 1.c -Wall -g -m32

GNU gdb (GDB) 7.2.50.20100726-cvs
This GDB was configured as "x86_64-unknown-linux-gnu".
gcc-4.4.4-10.fc13.x86_64
kernel-2.6.33.6-147.fc13.x86_64

./gdb -nx -ex start -ex 'p getpid ()' -ex c -ex 'p
$_siginfo._sifields._kill.si_pid' ./1
[...]
$1 = 23172
Continuing.

Program received signal SIGUSR1, User defined signal 1.
0x00110430 in __kernel_vsyscall ()
$2 = 0

$1 and $2 are the same for native x86_64 and for native i686.
$1 and $2 SHOULD be the same even for i686 on x86_64 debugger.

compat_siginfo_from_siginfo and siginfo_from_compat_siginfo are wrong in:
gdb/gdbserver/linux-x86-low.c
gdb/amd64-linux-nat.c

-- 
           Summary: compat_siginfo_from_siginfo and
                    siginfo_from_compat_siginfo are wrong
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: jan dot kratochvil at redhat dot com
                CC: gdb-prs at sourceware dot org
GCC target triplet: x86_64-fedora13-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=11842

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-09-29  9:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-26  9:37 [Bug gdb/11842] New: compat_siginfo_from_siginfo and siginfo_from_compat_siginfo are wrong jan dot kratochvil at redhat dot com
2010-07-26  9:39 ` [Bug gdb/11842] " jan dot kratochvil at redhat dot com
2010-08-06 12:28 ` pedro at codesourcery dot com
2010-08-06 12:41 ` jan dot kratochvil at redhat dot com
2010-08-06 13:31 ` pedro at codesourcery dot com
2010-08-06 13:35 ` jan dot kratochvil at redhat dot com
2010-08-30  8:47 ` jan dot kratochvil at redhat dot com
2010-09-29  9:03 ` pedro at codesourcery dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).