public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: brobecker@adacore.com
Cc: dtaylor@emc.com, gdb-patches@sourceware.org
Subject: Re: RFA bug fix -- x86-64 stabs and deprecated fp register
Date: Sun, 30 Nov 2014 18:59:00 -0000	[thread overview]
Message-ID: <201411301859.sAUIxFTU016422@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <20141130152036.GC4882@adacore.com> (message from Joel Brobecker	on Sun, 30 Nov 2014 19:20:36 +0400)

> Date: Sun, 30 Nov 2014 19:20:36 +0400
> From: Joel Brobecker <brobecker@adacore.com>
> 
> David,
> 
> On Fri, Nov 21, 2014 at 03:58:04PM -0500, David Taylor wrote:
> > Sometimes when using STABS on x86-64 GNU/Linux, GDB does not know which
> > register to use for the frame pointer and as a result offsets from the
> > frame pointer are treated as absolute addresses rather than as
> > offsets...
> > 
> > This patch provides a default for when the debug information doesn't
> > specify which register to use.
> > 
> > We have seen this problem when debugging problems with a previous
> > release of our software (I believe it was built with GCC 4.5.x, if that
> > matters).
> > 
> > There were no regressions on x86-64 GNU/Linux.
> > 
> > 2014-11-21  David Taylor  <dtaylor@emc.com>
> > 
> > 	* amd64-tdep.c (amd64_init_abi): Set default frame pointer.
> 
> I don't think your patch is correct, as it is going to affect
> the outcome of...
> 
>     (gdb) print $fp
> 
> ... for frameless functions compiled with DWARF2. See
> std-regs.c:value_of_builtin_frame_fp_reg.
> 
> If we were to apply your patch, it would unconditionally print
> the contents of the %rbp register as the result, which is not
> what we've been printing so far.
> 
> I wish I could suggest another approach but I haven't had to touch
> stabs support in several years, now. If you provided a bit more details
> as to what actually happened in the debugger and where, I might be
> able to help you better.

But any effort is much better spent on switching to DWARF2.  STABS
support ws already considered obsolete when AMD64 support was added to
GDB more than a decade ago.

  reply	other threads:[~2014-11-30 18:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21 20:58 David Taylor
2014-11-30 15:20 ` Joel Brobecker
2014-11-30 18:59   ` Mark Kettenis [this message]
2014-12-01 16:42     ` David Taylor
2014-12-03  3:19       ` Joel Brobecker
2014-12-01 16:30   ` David Taylor
2014-12-03  3:50     ` Joel Brobecker
2014-12-03 17:31       ` Doug Evans
2014-12-04  3:20         ` Joel Brobecker
2014-12-05 13:38     ` Mark Kettenis
2014-12-03  3:43 ` Doug Evans

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=201411301859.sAUIxFTU016422@glazunov.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=brobecker@adacore.com \
    --cc=dtaylor@emc.com \
    --cc=gdb-patches@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).