From b5ddc1014c557cb2b69bccc3144c680fb0c81686 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 9 Oct 1992 15:49:16 +0000 Subject: [PATCH] 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. 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 | 7 +++++++ gdb/xm-hppah.h | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 64e1f1fa31c..8332c157cc9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/xm-hppah.h b/gdb/xm-hppah.h index bdb0b950290..462d0888fb8 100644 --- a/gdb/xm-hppah.h +++ b/gdb/xm-hppah.h @@ -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 -- 2.30.2