aboutsummaryrefslogtreecommitdiff
path: root/gdb/x86-64-tdep.c
diff options
context:
space:
mode:
authorMichal Ludvig <mludvig@suse.cz>2002-05-27 13:37:39 +0000
committerMichal Ludvig <mludvig@suse.cz>2002-05-27 13:37:39 +0000
commitb1ab997b4172bfacfb75db3242755fd98b485873 (patch)
tree968c5a1fe3b0455bbfe22f2fa82daf0a03e51416 /gdb/x86-64-tdep.c
parent7378e198a59805a4edf671498e01b800b3de5a6d (diff)
downloadgdb-b1ab997b4172bfacfb75db3242755fd98b485873.zip
gdb-b1ab997b4172bfacfb75db3242755fd98b485873.tar.gz
gdb-b1ab997b4172bfacfb75db3242755fd98b485873.tar.bz2
2002-05-24 Michal Ludvig <mludvig@suse.cz>
* x86-64-tdep.c (x86_64_skip_prologue): Remove obsolete note. Let PC point right after the prologue before looking up symbols.
Diffstat (limited to 'gdb/x86-64-tdep.c')
-rw-r--r--gdb/x86-64-tdep.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 94f57a5..a3f8bee 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -859,23 +859,14 @@ x86_64_skip_prologue (CORE_ADDR pc)
read_memory (pc, (char *) prolog_buf, PROLOG_BUFSIZE);
- /* First check, whether pc points to pushq %rbp. If not,
- * print a recommendation to enable frame pointer. */
- if (prolog_expect[0] != prolog_buf[0])
- {
- if (!omit_fp_note_printed)
- {
- printf_filtered
- ("NOTE: This function doesn't seem to have a valid prologue.\n"
- " Consider adding -fno-omit-frame-pointer to your gcc's CFLAGS.\n");
- omit_fp_note_printed++;
- }
- return pc;
- }
- /* Valid prolog continues with movq %rsp,%rbp. */
- for (i = 1; i < PROLOG_BUFSIZE; i++)
+ /* First check, whether pc points to pushq %rbp, movq %rsp,%rbp. */
+ for (i = 0; i < PROLOG_BUFSIZE; i++)
if (prolog_expect[i] != prolog_buf[i])
- return pc + 1; /* First instruction after pushq %rbp. */
+ return pc; /* ... no, it doesn't. Nothing to skip. */
+
+ /* OK, we have found the prologue and want PC of the first
+ non-prologue instruction. */
+ pc += PROLOG_BUFSIZE;
v_function = find_pc_function (pc);
v_sal = find_pc_line (pc, 0);