diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-03-01 18:19:28 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-03-01 18:19:28 +0000 |
commit | 088d891f588eb06a92f4fccf6a76e9b6ef2014c2 (patch) | |
tree | e6b371de6b9ec0eb6871f703ff17842e2f55dbeb | |
parent | 3826677692e9e12fb42bc5cded26960d2137faec (diff) | |
download | gdb-088d891f588eb06a92f4fccf6a76e9b6ef2014c2.zip gdb-088d891f588eb06a92f4fccf6a76e9b6ef2014c2.tar.gz gdb-088d891f588eb06a92f4fccf6a76e9b6ef2014c2.tar.bz2 |
* Makefile.in (os9kread.o): Do not compile with WERROR_CFLAGS.
* os9kread.c (os9k_process_one_symbol): Add assert to detect
``loses if sizeof (char *) > sizeof (int)''.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/Makefile.in | 9 | ||||
-rw-r--r-- | gdb/os9kread.c | 2 |
3 files changed, 14 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d3d62be..7714fd6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2001-03-01 Andrew Cagney <ac131313@redhat.com> + * Makefile.in (os9kread.o): Do not compile with WERROR_CFLAGS. + * os9kread.c (os9k_process_one_symbol): Add assert to detect + ``loses if sizeof (char *) > sizeof (int)''. + +2001-03-01 Andrew Cagney <ac131313@redhat.com> + * gdb_assert.h: Document pragmatics behind gdb_assert's case. 2001-03-01 Andrew Cagney <ac131313@redhat.com> diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 01165a0..c619fc5 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1635,10 +1635,13 @@ mdebugread.o: mdebugread.c buildsym.h complaints.h $(bfd_h) $(defs_h) \ mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h) +# os9kread assumes that sizeof(char*) <= sizeof(int). This looses on +# 64 bit targets where often, sizeof(int)=4 but sizeof(char*)=9. os9kread.o: os9kread.c buildsym.h complaints.h $(bfd_h) $(defs_h) \ - $(expression_h) gdb-stabs.h $(gdbcore_h) $(gdbtypes_h) language.h \ - objfiles.h stabsread.h symfile.h $(symtab_h) \ - target.h gdb_string.h + $(expression_h) gdb-stabs.h $(gdbcore_h) $(gdbtypes_h) \ + language.h objfiles.h stabsread.h symfile.h $(symtab_h) \ + target.h gdb_string.h + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $< mem-break.o: mem-break.c $(defs_h) diff --git a/gdb/os9kread.c b/gdb/os9kread.c index 00a5996..a3d67fc 100644 --- a/gdb/os9kread.c +++ b/gdb/os9kread.c @@ -35,6 +35,7 @@ #include "defs.h" #include "gdb_string.h" +#include "gdb_assert.h" #include <stdio.h> #if defined(USG) || defined(__CYGNUSCLIB__) @@ -1509,6 +1510,7 @@ os9k_process_one_symbol (int type, int desc, CORE_ADDR valu, char *name, /* Relocate for dynamic loading and for ELF acc fn-relative syms. */ valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile)); /* FIXME: loses if sizeof (char *) > sizeof (int) */ + gdb_assert (sizeof (name) <= sizeof (int)); record_line (current_subfile, (int) name, valu); break; |