public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "jan dot kratochvil at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/11842] New: compat_siginfo_from_siginfo and siginfo_from_compat_siginfo are wrong
Date: Mon, 26 Jul 2010 09:37:00 -0000	[thread overview]
Message-ID: <20100726093712.11842.jan.kratochvil@redhat.com> (raw)

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.


             reply	other threads:[~2010-07-26  9:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-26  9:37 jan dot kratochvil at redhat dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100726093712.11842.jan.kratochvil@redhat.com \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).