This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
DWARF2 PE/COFF port and parsing ?
- From: Brian Ford <ford at vss dot fsi dot com>
- To: gdb at sources dot redhat dot com
- Date: Tue, 20 May 2003 16:14:32 -0500 (CDT)
- Subject: DWARF2 PE/COFF port and parsing ?
I'm still slowly trying to add DWARF2 support for PE/COFF targets. I have
the following problem that confuses me and I was hoping for some expert
guidance about how to proceed. gdb's symbol table code is completely
foreign to me.
If I load an executable into gdb that contains one object file with DWARF2
information (all the rest stabs), I get a segfault here:
1431 if (!do_linear_search
1432 && (SYMBOL_LANGUAGE (*center) == language_java))
1433 {
1434 do_linear_search = 1;
1435 }
(gdb) p *center
$1 = (struct partial_symbol *) 0x20
(gdb) bt
#0 0x004479b8 in lookup_partial_symbol (pst=0x1052a0a0, name=0x44bf51
"main",
linkage_name=0x0, global=1, domain=VAR_DOMAIN)
at ../../gcc/gdb/symtab.c:1431
#1 0x004480b9 in find_main_psymtab () at ../../gcc/gdb/symtab.c:1608
#2 0x0041c11e in set_initial_language () at ../../gcc/gdb/symfile.c:1278
#3 0x0041bac0 in symbol_file_add_main (args=0x22ff1e
"v9win/tap/vital.sym",
from_tty=0) at ../../gcc/gdb/symfile.c:1017
#4 0x00417978 in do_captured_command (data=0x22fa90)
at ../../gcc/gdb/top.c:521
#5 0x004178e1 in do_catch_errors (uiout=0x101240a0, data=0x22fa70)
at ../../gcc/gdb/top.c:492
#6 0x004177a0 in catcher (func=0x4178d0 <do_catch_errors>,
func_uiout=0x101240a0, func_args=0x22fa70, func_val=0x22fa6c,
func_caught=0x22fa68, errstring=0x41798d "", mask=6)
at ../../gcc/gdb/top.c:424
#7 0x0041793a in catch_errors (func=0x417960 <do_captured_command>,
func_args=0x22fa90, errstring=0x41798d "", mask=6)
at ../../gcc/gdb/top.c:504
#8 0x004179ca in catch_command_errors (
command=0x41baa0 <symbol_file_add_main>,
arg=0x22ff1e "v9win/tap/vital.sym", from_tty=0, mask=6)
at ../../gcc/gdb/top.c:541
#9 0x00401eeb in captured_main (data=0x22fda8) at
../../gcc/gdb/main.c:654
#10 0x004178e1 in do_catch_errors (uiout=0x5ef090, data=0x22fd60)
at ../../gcc/gdb/top.c:492
#11 0x004177a0 in catcher (func=0x4178d0 <do_catch_errors>,
func_uiout=0x5ef090, func_args=0x22fd60, func_val=0x22fd5c,
func_caught=0x22fd58, errstring=0x401211 "", mask=6)
at ../../gcc/gdb/top.c:424
#12 0x0041793a in catch_errors (func=0x401420 <captured_main>,
func_args=0x22fda8, errstring=0x401211 "", mask=6)
at ../../gcc/gdb/top.c:504
#13 0x00402331 in gdb_main (args=0x22fda8) at ../../gcc/gdb/main.c:813
#14 0x004010da in main (argc=2, argv=0x10101d08) at ../../gcc/gdb/gdb.c:35
#15 0x610068ea in _libuser32_a_iname ()
#16 0x61006b73 in _libuser32_a_iname ()
#17 0x005eca12 in cygwin_crt0 ()
#18 0x0040103c in mainCRTStartup ()
#19 0x77f1bbb5 in _libuser32_a_iname ()
The strange thing is that if I load the object file by itself, all is
well (ie. info types runs to completion).
Any pointers would be greatly appreciated. Thanks.
--
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax: 314-551-8444