This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[RFA] coffread.c: support dwarf2 info


Hello folks,
A few months ago I successfully added coff support for dwarf2 info to 
binutils so djgpp debuggers could use it. And the new version of gcc has been 
configured to generate dwarf2 info. GDB just needs a small change to (almost) 
complete the chain.

I've altered coffread.c to read in dwarf2 info just like in elfread.c. Please 
consider commiting the following patch:

gdb/Changelog

2001-06-23  Mark Elbrecht  <snowball@bigfoot.com>

	* coffread.c (coff_symfile_read): Parse DWARF2 info if present.

*** coffread.c.orig	Tue May 29 06:45:10 2001
--- coffread.c	Fri Jun 22 17:02:56 2001
*************** coff_symfile_read (struct objfile *objfi
*** 689,694 ****
--- 689,699 ----
  			       info->stabsects,
  			       info->stabstrsect->filepos, stabstrsize);
      }
+   if (dwarf2_has_info (abfd))
+     {
+       /* DWARF 2 sections */
+       dwarf2_build_psymtabs (objfile, mainline);
+     }
  
    do_cleanups (back_to);
  }

After that, only one obstacle remains. The dwarf2 reader uses 
'bfd_get_sign_extended_vma' from the bfd library. For whatever reason, that 
function only works with the elf format. But that's not a program that you 
folks can fix since it's in the bfd library. After I hacked it to return a 
legit value, I was able to set breakpoints and step through programs 
containing dwarf2 info.

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]