Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: Joel Brobecker <brobecker@adacore.com>, 	gdb-patches@sourceware.org
Subject: Re: [patch] Fix a glitch in debugging 32-bit process with 64-bit GDB.
Date: Thu, 11 Dec 2008 08:57:00 -0000	[thread overview]
Message-ID: <jek5a7um1l.fsf@sykes.suse.de> (raw)
In-Reply-To: <8ac60eac0812101520x76366795ieea6afb6d48fb129@mail.gmail.com> 	(Paul Pluzhnikov's message of "Wed, 10 Dec 2008 15:20:37 -0800")

Paul Pluzhnikov <ppluzhnikov@google.com> writes:

> 2008-12-10  Paul Pluzhnikov  <ppluzhnikov@google.com>
>
> 	* dbxread.c (stabs_seek): Sign-extend 32-bit STABS values for
> 	64-bit GDB.
> Index: dbxread.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/dbxread.c,v
> retrieving revision 1.98
> diff -u -p -u -r1.98 dbxread.c
> --- dbxread.c	1 Oct 2008 16:41:27 -0000	1.98
> +++ dbxread.c	10 Dec 2008 22:41:35 -0000
> @@ -855,7 +855,7 @@ stabs_seek (int sym_offset)
>      (intern).n_type = bfd_h_get_8 (abfd, (extern)->e_type);		\
>      (intern).n_other = 0;						\
>      (intern).n_desc = bfd_h_get_16 (abfd, (extern)->e_desc);  		\
> -    if (bfd_get_sign_extend_vma (abfd))					\
> +    if (sizeof (bfd_vma) > 4 || bfd_get_sign_extend_vma (abfd))		\
>        (intern).n_value = bfd_h_get_signed_32 (abfd, (extern)->e_value);	\
>      else								\
>        (intern).n_value = bfd_h_get_32 (abfd, (extern)->e_value);	\

I don't think this does the right thing for genuine addresses beyond
0x80000000.  You can do that only for values that are truely signed,
which stabs has no way to express.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


  reply	other threads:[~2008-12-11  8:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-09  1:33 Paul Pluzhnikov
2008-12-09  2:08 ` Daniel Jacobowitz
2008-12-09  2:43   ` Paul Pluzhnikov
2008-12-09 11:30     ` Peter Schauer
2008-12-09 13:34     ` Daniel Jacobowitz
2008-12-10 11:14       ` Joel Brobecker
2008-12-10 15:59         ` Paul Pluzhnikov
2008-12-10 23:21           ` Paul Pluzhnikov
2008-12-11  8:57             ` Andreas Schwab [this message]
     [not found]               ` <8ac60eac0812111601v20566268h6f7977c71e5b8a8f@mail.gmail.com>
2008-12-12  0:11                 ` Paul Pluzhnikov
2008-12-13 16:02                   ` Joel Brobecker
2008-12-13 18:18                     ` Paul Pluzhnikov
2008-12-15  8:59                       ` Joel Brobecker
2008-12-15 21:47                         ` Paul Pluzhnikov
2008-12-16  4:48                           ` Joel Brobecker
2008-12-11  9:21             ` Mark Kettenis

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=jek5a7um1l.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ppluzhnikov@google.com \
    /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