aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>2004-11-25 02:48:27 +0000
committerFred Fish <fnf@specifix.com>2004-11-25 02:48:27 +0000
commitebd98106b23a4d1d64a492cf26977e66c32393ac (patch)
treea23e1d384dd6ef25180e7d1093b899c83c0bd4f6
parent0be9069d288efc5ae2f2ababb6560b8543de00d1 (diff)
downloadgdb-ebd98106b23a4d1d64a492cf26977e66c32393ac.zip
gdb-ebd98106b23a4d1d64a492cf26977e66c32393ac.tar.gz
gdb-ebd98106b23a4d1d64a492cf26977e66c32393ac.tar.bz2
Approved by Kevin Buettner <kevinb@redhat.com>
2004-11-24 Fred Fish <fnf@specifixinc.com> * rs6000-tdep.c (skip_prologue): Use line table info to skip over compiler generated function calls made as part of a prologue.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/rs6000-tdep.c13
2 files changed, 16 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fcdbd92..f5f0574 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-24 Fred Fish <fnf@specifixinc.com>
+
+ * rs6000-tdep.c (skip_prologue): Use line table info to skip over
+ compiler generated function calls made as part of a prologue.
+
2004-11-23 Mark Kettenis <kettenis@gnu.org>
* inf-ttrace.c: New file.
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 54842cd..8b341b2 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1048,9 +1048,18 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
fdata->frameless = 0;
/* Don't skip over the subroutine call if it is not within
- the first three instructions of the prologue. */
+ the first three instructions of the prologue and either
+ we have no line table information or the line info tells
+ us that the subroutine call is not part of the line
+ associated with the prologue. */
if ((pc - orig_pc) > 8)
- break;
+ {
+ struct symtab_and_line prologue_sal = find_pc_line (orig_pc, 0);
+ struct symtab_and_line this_sal = find_pc_line (pc, 0);
+
+ if ((prologue_sal.line == 0) || (prologue_sal.line != this_sal.line))
+ break;
+ }
op = read_memory_integer (pc + 4, 4);