]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2002-06-07 Michal Ludvig <mludvig@suse.cz>
authorMichal Ludvig <mludvig@suse.cz>
Fri, 7 Jun 2002 12:33:56 +0000 (12:33 +0000)
committerMichal Ludvig <mludvig@suse.cz>
Fri, 7 Jun 2002 12:33:56 +0000 (12:33 +0000)
Merge from mainline:

2002-05-27  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.

gdb/ChangeLog
gdb/x86-64-tdep.c

index d0e55978d78bdb9e2d2564ffbe9630ab34a7c623..82128658b2ab33013e25491fe2b9886aa7c7732d 100644 (file)
@@ -1,3 +1,13 @@
+2002-06-07  Michal Ludvig  <mludvig@suse.cz>
+
+       Merge from mainline:
+
+       2002-05-27  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.
+
 2002-05-28  Theodore A. Roth  <troth@verinet.com>
 
        * Makefile.in: Add support for AVR target.
index bdf08f578eb83199b100d1fb94bb6126128b5633..3ebc1b2594ab2acff0190166b3b9bca2f5e0e336 100644 (file)
@@ -814,23 +814,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"
-            "      Try to add -fno-omit-frame-pointer tou 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);