aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/sparc
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-06-13 02:26:18 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-06-13 02:26:18 +0000
commit8357834fbec086011dbb4b445f63c03c9f4c6c1e (patch)
treede5570f2392c28e24da93c819fcdae0d28c42b03 /gdb/config/sparc
parent361daf65acef2c17cb07034715ee57f7168a444f (diff)
downloadgdb-8357834fbec086011dbb4b445f63c03c9f4c6c1e.zip
gdb-8357834fbec086011dbb4b445f63c03c9f4c6c1e.tar.gz
gdb-8357834fbec086011dbb4b445f63c03c9f4c6c1e.tar.bz2
* dbxread.c (process_one_symbol): Set n_opt_found based on whether
a non-gcc N_OPT symbol is found. Make SUN_FIXED_LBRAC_BUG a macro which returns 0 or 1 to say whether to do it. * config/sparc/sun4{sol2,os4}.h (SUN_FIXED_LBRAC_BUG,VARIABLES_INSIDE_BLOCK): Use n_opt_found so the right thing happens for both acc and SunOS4 /bin/cc.
Diffstat (limited to 'gdb/config/sparc')
-rw-r--r--gdb/config/sparc/tm-sun4os4.h16
-rw-r--r--gdb/config/sparc/tm-sun4sol2.h19
2 files changed, 28 insertions, 7 deletions
diff --git a/gdb/config/sparc/tm-sun4os4.h b/gdb/config/sparc/tm-sun4os4.h
index 613ed77..52d2d13 100644
--- a/gdb/config/sparc/tm-sun4os4.h
+++ b/gdb/config/sparc/tm-sun4os4.h
@@ -20,6 +20,22 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "sparc/tm-sparc.h"
#include "tm-sunos.h"
+/* Do variables in the debug stabs occur after the N_LBRAC or before it?
+ acc: after, gcc: before, SunOS4 /bin/cc: before. */
+
+#define VARIABLES_INSIDE_BLOCK(desc, gcc_p) (!(gcc_p) && n_opt_found)
+
+/* For acc, there's no need to correct LBRAC entries by guessing how
+ they should work. In fact, this is harmful because the LBRAC
+ entries now all appear at the end of the function, not intermixed
+ with the SLINE entries.
+
+ For binary from SunOS4 /bin/cc, need to correct LBRAC's.
+
+ For gcc, doesn't matter, attempting the correction is harmless. */
+
+#define SUN_FIXED_LBRAC_BUG (n_opt_found)
+
/* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
comment in <machine/setjmp.h>! */
diff --git a/gdb/config/sparc/tm-sun4sol2.h b/gdb/config/sparc/tm-sun4sol2.h
index 25434f8..0cf9320 100644
--- a/gdb/config/sparc/tm-sun4sol2.h
+++ b/gdb/config/sparc/tm-sun4sol2.h
@@ -23,16 +23,21 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef IN_SOLIB_TRAMPOLINE
#define IN_SOLIB_TRAMPOLINE(pc, name) in_solib_trampoline((pc), (name))
-/* Variables in the debug stabs occur after the N_LBRAC, not before it,
- in code generated by Sun C. */
+/* Do variables in the debug stabs occur after the N_LBRAC or before it?
+ acc: after, gcc: before, SunOS4 /bin/cc: before. */
-#define VARIABLES_INSIDE_BLOCK(desc, gcc_p) (!(gcc_p))
+#define VARIABLES_INSIDE_BLOCK(desc, gcc_p) (!(gcc_p) && n_opt_found)
-/* There's no need to correct LBRAC entries by guessing how they should
- work. In fact, this is harmful because the LBRAC entries now all appear
- at the end of the function, not intermixed with the SLINE entries. */
+/* For acc, there's no need to correct LBRAC entries by guessing how
+ they should work. In fact, this is harmful because the LBRAC
+ entries now all appear at the end of the function, not intermixed
+ with the SLINE entries.
-#define SUN_FIXED_LBRAC_BUG
+ For binary from SunOS4 /bin/cc, need to correct LBRAC's.
+
+ For gcc, like acc, don't correct. */
+
+#define SUN_FIXED_LBRAC_BUG (n_opt_found || processing_gcc_compilation)
#if 0 /* FIXME Setjmp/longjmp are not as well doc'd in SunOS 5.x yet */