]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fri Oct 9 08:41:11 1992 Ian Lance Taylor (ian@cygnus.com)
authorIan Lance Taylor <ian@airs.com>
Fri, 9 Oct 1992 15:49:16 +0000 (15:49 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 9 Oct 1992 15:49:16 +0000 (15:49 +0000)
* xm-hppah.h: if __STDC__ is not defined, define
HPPA_COMPILER_BUG.
symtab.c (decode_line_1): avoid a bug in the HP9000/700 native
compiler; see the comment in the file.

Here's the comment from the file:
  /* FIXME: The native HP 9000/700 compiler has a bug which appears
     when optimizing this file with target i960-vxworks.  I haven't
     been able to construct a simple test case.  The problem is that
     in the second call to SKIP_PROLOGUE below, the compiler somehow
     does not realize that the statement val = find_pc_line (...) will
     change the values of the fields of val.  It extracts the elements
     into registers at the top of the block, and does not update the
     registers after the call to find_pc_line.  You can check this by
     inserting a printf at the end of find_pc_line to show what values
     it is returning for val.pc and val.end and another printf after
     the call to see what values the function actually got (remember,
     this is compiling with cc -O, with this patch removed).  You can
     also examine the assembly listing: search for the second call to
     skip_prologue; the LDO statement before the next call to
     find_pc_line loads the address of the structure which
     find_pc_line will return; if there is a LDW just before the LDO,
     which fetches an element of the structure, then the compiler
     still has the bug.  */

gdb/ChangeLog
gdb/xm-hppah.h

index 64e1f1fa31cfab5fed2cc8f526d927c689626f36..8332c157cc974bfcbce135d7967bfa55f2ddeca8 100644 (file)
@@ -1,3 +1,10 @@
+Fri Oct  9 08:41:11 1992  Ian Lance Taylor  (ian@cygnus.com)
+
+       * xm-hppah.h: if __STDC__ is not defined, define
+       HPPA_COMPILER_BUG.
+       symtab.c (decode_line_1): avoid a bug in the HP9000/700 native
+       compiler; see the comment in the file.
+
 Fri Oct  9 04:43:43 1992  John Gilmore (gnu@cygnus.com)
 
        First cut at support for all BSD variants on 386.
index bdb0b950290ebd08cd137ce2194d27e7367c9e90..462d0888fb8d2275b45c8cdd7c57f045485060c0 100644 (file)
@@ -32,6 +32,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define USG
 #endif
 
+#ifndef __STDC__
+/* This define is discussed in decode_line_1 in symtab.c  */
+#define HPPA_COMPILER_BUG
+#endif
+
 #define HAVE_TERMIO
 
 #define KERNEL_U_ADDR 0