public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* RFA bug fix -- x86-64 stabs and deprecated fp register
@ 2014-11-21 20:58 David Taylor
  2014-11-30 15:20 ` Joel Brobecker
  2014-12-03  3:43 ` Doug Evans
  0 siblings, 2 replies; 11+ messages in thread
From: David Taylor @ 2014-11-21 20:58 UTC (permalink / raw)
  To: gdb-patches

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.

diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index e69da01..5a68c33 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -3006,6 +3006,8 @@ amd64_init_abi (struct gdbarch_info info, struct gdbarch *
gdbarch)
   set_gdbarch_ps_regnum (gdbarch, AMD64_EFLAGS_REGNUM); /* %eflags */
   set_gdbarch_fp0_regnum (gdbarch, AMD64_ST0_REGNUM); /* %st(0) */
 
+  set_gdbarch_deprecated_fp_regnum (gdbarch, AMD64_RBP_REGNUM); /* %rbp */
+
   /* The "default" register numbering scheme for AMD64 is referred to
      as the "DWARF Register Number Mapping" in the System V psABI.
      The preferred debugging format for all known AMD64 targets is

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

end of thread, other threads:[~2014-12-05 13:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-21 20:58 RFA bug fix -- x86-64 stabs and deprecated fp register David Taylor
2014-11-30 15:20 ` Joel Brobecker
2014-11-30 18:59   ` Mark Kettenis
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

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).