aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-10-06 16:47:32 +0000
committerIan Lance Taylor <ian@airs.com>1994-10-06 16:47:32 +0000
commitb8176214a5bb9810bf6d5244815e9a49c5055dce (patch)
treef85f7b264d7a3748cde6bdf99d131edcaa13da36 /gdb/stabsread.c
parent97d3151a59022d8d76fd29100052645bd8d99c6b (diff)
downloadgdb-b8176214a5bb9810bf6d5244815e9a49c5055dce.zip
gdb-b8176214a5bb9810bf6d5244815e9a49c5055dce.tar.gz
gdb-b8176214a5bb9810bf6d5244815e9a49c5055dce.tar.bz2
* defs.h: If TARGET_BYTE_ORDER_SELECTABLE is defined by tm.h,
define TARGET_BYTE_ORDER as target_byte_order, and declare target_byte_order as an extern int, and define BITS_BIG_ENDIAN as a test of TARGET_BYTE_ORDER. * top.c: Several additions if TARGET_BYTE_ORDER_SELECTABLE is defined: (endianlist, target_byte_order): New variables. (set_endian, set_endian_big, set_endian_little): New functions. (show_endian): New function. (init_cmd_lists): Initialize endianlist. (init_main): Add commands ``set endian big'', ``set endian little'', and ``show endian''. * a29k-pinsn.c: Rewrite uses of TARGET_BYTE_ORDER and BITS_BIG_ENDIAN to switch at run time rather than at compile time. * coffread.c, dwarfread.c, findvar.c, mips-tdep.c: Likewise. * remote-os9k.c, stabsread.c, valarith.c, valprint.c: Likewise. * values.c: Likewise. * mips-tdep.c: Rewrite uses of GDB_TARGET_IS_MIPS64 to switch at run time rather than at compile time.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 5b5fee5..042d450 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -867,11 +867,13 @@ define_symbol (valu, string, desc, type, objfile)
#endif
add_symbol_to_list (sym, &local_symbols);
-#if TARGET_BYTE_ORDER == LITTLE_ENDIAN
- /* On little-endian machines, this crud is never necessary, and,
- if the extra bytes contain garbage, is harmful. */
- break;
-#else /* Big endian. */
+ if (TARGET_BYTE_ORDER != BIG_ENDIAN)
+ {
+ /* On little-endian machines, this crud is never necessary,
+ and, if the extra bytes contain garbage, is harmful. */
+ break;
+ }
+
/* If it's gcc-compiled, if it says `short', believe it. */
if (processing_gcc_compilation || BELIEVE_PCC_PROMOTION)
break;
@@ -950,7 +952,6 @@ define_symbol (valu, string, desc, type, objfile)
#endif /* no BELIEVE_PCC_PROMOTION_TYPE. */
}
#endif /* !BELIEVE_PCC_PROMOTION. */
-#endif /* Big endian. */
case 'P':
/* acc seems to use P to delare the prototypes of functions that