diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1994-01-07 20:59:35 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1994-01-07 20:59:35 +0000 |
commit | 9d51b3c5f4cffb73634deb26d68c741e8e800f93 (patch) | |
tree | 2b27d7103755a2a2c3ce0aa9f1ce5289d912f4ad /gdb/mdebugread.c | |
parent | d44b2ddb59ec76d8530cf20e7c44e3abfe8be529 (diff) | |
download | gdb-9d51b3c5f4cffb73634deb26d68c741e8e800f93.zip gdb-9d51b3c5f4cffb73634deb26d68c741e8e800f93.tar.gz gdb-9d51b3c5f4cffb73634deb26d68c741e8e800f93.tar.bz2 |
* config/i386/tm-i386v.h, config/m68k/tm-m68k.h, config/mips/tm-mips.h,
config/vax/tm-vax.h (CALL_DUMMY_BREAKPOINT_OFFSET): Define.
* mdebugread.c (parse_symbol): Handle enum sh.type produced by
DEC c89.
* mdebugread.c (add_line): Handle zero linenos produced by DEC c89.
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r-- | gdb/mdebugread.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index bbeb66d..c23dac0 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -1010,6 +1010,15 @@ parse_symbol (sh, ax, ext_sh, bigend) if (type_code == TYPE_CODE_ENUM) { /* This is a non-empty enum. */ + + /* c89 has the number of enumerators in the sh.value field, + not the type length, so we have to compensate for that + incompatibility quirk. + This might do the wrong thing for an enum with one or two + enumerators and gcc -gcoff -fshort-enums, but these cases + are hopefully rare enough. */ + if (TYPE_LENGTH (t) == TYPE_NFIELDS (t)) + TYPE_LENGTH (t) = TARGET_INT_BIT / HOST_CHAR_BIT; for (ext_tsym = ext_sh + external_sym_size; ; ext_tsym += external_sym_size) @@ -3222,6 +3231,10 @@ add_line (lt, lineno, adr, last) CORE_ADDR adr; int last; { + /* DEC c89 sometimes produces zero linenos which confuse gdb. + Change them to something sensible. */ + if (lineno == 0) + lineno = 1; if (last == 0) last = -2; /* make sure we record first line */ |