Schaefer Harald schrieb:
>
> > Hi,
> >
> > i want to report an error in the new gdb.
> >
> > I got a core dump (segmentaion violation).
> >
> > machine: Compac Alpha (Digital Unix 4.0d)
> > Compiler: Compac Version 6.2 with -cxx Option
> >
> > gdb is configured for alphaev5-dec-osf4.0d
> >
> > Here is the output of the first analysis of the core dump
> >
> > (gdb) bt 6
> > #0 0x1200cf558 in parse_symbol (sh=0x11fffe4e8, ax=0x14022bcf0,
> > ext_sh=0x14011b820 "", bigend=0, section_offsets=0x1400d73a0)
> > at mdebugread.c:1348
> > #1 0x1200d58ec in psymtab_to_symtab_1 (pst=0x140472388,
> > filename=0x1404723f8 "/usr/include/cxx/rwstderr") at mdebugread.c:3562
> > #2 0x1200d4e70 in psymtab_to_symtab_1 (pst=0x140472260,
> > filename=0x140472320 "/usr/include/cxx/rwstderr~alt~deccxx_6374504B")
> > at mdebugread.c:3319
> > #3 0x1200d4e70 in psymtab_to_symtab_1 (pst=0x140472198,
> > filename=0x140472208 "/usr/include/sys/types.h") at mdebugread.c:3319
> > #4 0x1200d4e70 in psymtab_to_symtab_1 (pst=0x1404720d8,
> > filename=0x140472148 "/usr/include/stdlib.h") at mdebugread.c:3319
> > #5 0x1200d4e70 in psymtab_to_symtab_1 (pst=0x1404dea90,
> > filename=0x1404deb00 "src/zldlib_list.c") at mdebugread.c:3319
> > (More stack frames follow...)
> > (gdb) list
> > 1343
> > 1344 pop_parse_stack (); /* restore previous lexical
> > context */
> > 1345 break;
> > 1346
> > 1347 case stMember: /* member of struct or union */
> > 1348 f = &TYPE_FIELDS
> > (top_stack->cur_type)[top_stack->cur_field++];
> > 1349 FIELD_NAME (*f) = name;
> > 1350 FIELD_BITPOS (*f) = sh->value;
> > 1351 bitsize = 0;
> > 1352 FIELD_TYPE (*f) = parse_type (cur_fd, ax, sh->index,
> > &bitsize, bigend, name);
> > (gdb) p top_stack
> > $1 = (struct parse_stack *) 0x1403c2b40
> > (gdb) p *top_stack
> > $2 = {next = 0x1400b7450, prev = 0x1403c2a50, cur_st = 0x1413897a0,
> > cur_block = 0x1412db2c0, blocktype = 11, maxsyms = 32,
> > cur_type = 0x0, cur_field = 0, procadr = 0, numargs = 0}
> >
> > cur_type is NULL and not be dereferenced !!!!
> >
> > (gdb) p name
> > $3 = 0x140255212 "_RWrwse_StringIndexOutOfRange__8_RWrwstd"
> > (gdb) p sh
> > $4 = (SYMR *) 0x11fffe4e8
> > (gdb) p *sh
> > $5 = {iss = 139, value = 0, st = 9, sc = 11, reserved = 0, index = 12}
The nm -p -a output leading to this error is:
/usr/include/cxx/rwstderr|0000000000000000|File |ref=35
|0000000000000008| 21|Text
_RWrwstd |0000000000000000|Module |ref=34
|0000000000000008| 22|Info
_RWrwstd::create_native_facet(std::numpunct<char>*)|0000004832302848|Proc
|end=5 Class * |0000000000000008| 23|Info
|0000000000000000|Param |Class *
|0000000000000008| 24|Info
_RWrwstd::create_native_facet(std::numpunct<char>*)|0000000000000000|End
|ref=23 |0000000000000000| 25|Info
_RWrwstd::create_native_facet(std::ctype<char>*)|0000004832302848|Proc
|end=8 Class * |0000000000000008| 26|Info
|0000000000000000|Param |Class *
|0000000000000008| 27|Info
_RWrwstd::create_native_facet(std::ctype<char>*)|0000000000000000|End
|ref=26 |0000000000000000| 28|Info
_RWrwstd::_RWrwse_StringIndexOutOfRange|0000000000000000|Member |char
*const |0000000000000008| 29|Info
_RWrwstd::_RWrwse_ResultLenInvalid|0000000000000000|Member |char
*const |0000000000000008| 30|Info
except_msg_string |0000000000000000|Tag |Class
|0000000000000008| 31|Info
|0000000000000014|Typdef |Class
|0000000000000008| 32|Info
_RWrwstd |0000000000000000|End |ref=22
|0000000000000000| 33|Info
/usr/include/cxx/rwstderr|0000000000000000|End |ref=21
|0000000000000000| 34|Text
As a workaround I have added the following code
*** mdebugread.c Mon Sep 4 10:25:57 2000
--- mdebugread.c.orig Mon May 15 03:44:33 2000
***************
*** 1346,1351 ****
case stMember: /* member of struct or union */
- if (top_stack->cur_type == NULL)
- break;
f = &TYPE_FIELDS (top_stack->cur_type)[top_stack->cur_field++];
FIELD_NAME (*f) = name;
--- 1346,1349 ----