Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Andreas Schwab <schwab@suse.de>,
	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: Fri, 12 Dec 2008 00:11:00 -0000	[thread overview]
Message-ID: <8ac60eac0812111603r68ffa49exd7cb0ce403d07310@mail.gmail.com> (raw)
In-Reply-To: <8ac60eac0812111601v20566268h6f7977c71e5b8a8f@mail.gmail.com>

On Thu, Dec 11, 2008 at 12:57 AM, Andreas Schwab <schwab@suse.de> wrote:

> Paul Pluzhnikov <ppluzhnikov@google.com> writes:
...
>> -    if (bfd_get_sign_extend_vma (abfd))                                      \
>> +    if (sizeof (bfd_vma) > 4 || bfd_get_sign_extend_vma (abfd))              \
>
> 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.

Hmm, I guess if a STABS executable is linked at above 0x80000000,
this could happen.

So, the choices appear to be:

- leave GDB broken and wait for newer glibc :(
- do sign extension, but only for N_LSYM and N_PSYM symbols as
 a heuristic.
- pre-scan the objfile to determine highest link address, and
 do sign extension if that address is (well) below 0x80000000

Suggestions?

Thanks,
--
Paul Pluzhnikov

[Andreas, sorry for the repeat: clicked reply instead of reply-all]


  parent reply	other threads:[~2008-12-12  0:11 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
     [not found]               ` <8ac60eac0812111601v20566268h6f7977c71e5b8a8f@mail.gmail.com>
2008-12-12  0:11                 ` Paul Pluzhnikov [this message]
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=8ac60eac0812111603r68ffa49exd7cb0ce403d07310@mail.gmail.com \
    --to=ppluzhnikov@google.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=schwab@suse.de \
    /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