This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: DWARF2 and COFF?
- To: snowball3 at bigfoot dot com
- Subject: Re: DWARF2 and COFF?
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 2 Dec 2000 10:26:58 -0800
- CC: binutils at sources dot redhat dot com
- References: <3A28C156.19040.367215@localhost>
From: "Mark E." <snowball3@bigfoot.com>
Date: Sat, 2 Dec 2000 09:31:02 -0500
I've seen some messages from those involved with GDB that they will add
support for C++ debugging with the gcc 3.0 abi first with DWARF2 then stabs.
This got me wondering if dwarf2 could work with COFF (or at least the djgpp
flavor of COFF). At first, I only had to make a few tweaks, but then I ran
into problems with bfd/dwarf2.c which makes use of 'elf_tdata (abfd)-
>dwarf2_find_line_info' which obviously doesn't work in a COFF environment.
It is my understanding that while dwarf2 happens to be used by environments
that use ELF, it is not dependant on ELF. Assuming my understanding is
correct, can bfd/dwarf2.c be made generic or should I just give up?
Supporting dwarf2 for COFF should work. The code in dwarf2.c should
not be using elf_tdata. Instead, the address of the find_line_info
struct should be passed in by the caller. See
_bfd_stab_section_find_nearest_line for the right way to do it.
Ian