Manipulate debug info in ELF file

"Adwait Sathe" <adwait@iit.edu>
12 Nov 2002 14:14:33 -0500

          From comp.compilers

Related articles
Manipulate debug info in ELF file adwait@iit.edu (Adwait Sathe) (2002-11-12)
Re: Manipulate debug info in ELF file vbdis@aol.com (VBDis) (2002-11-13)
| List of all articles for this month |
From: "Adwait Sathe" <adwait@iit.edu>
Newsgroups: comp.compilers
Date: 12 Nov 2002 14:14:33 -0500
Organization: http://groups.google.com/
Keywords: debug, question, linker
Posted-Date: 12 Nov 2002 14:14:33 EST

The single step debugger we use has a size limitation of 260 MB. We
are facing problems with corrupt symbol tables as our *.ou1 file is
bigger than 260 MB. We cannot event strip the debug info from our
images.
I am trying to remove selected debug records from ELF file and create
a new file that we can use to create *.ou1. This is what I did.
1. Parse .debug section( It's in Dwarf V1 format).
2. Process DW_TAG_COMPILE_UNIT tag. and look for source file name.
3. Remove the record if debug info for that file in not required.
4. Remove corresponding entry from .debug_srcinfo and .line sections.
5. Update line offset in .debug_srcinfo.
6. Update attributes associated with DW_TAG_COMPILE_UNIT viz.
DW_AT_STMT_LIST for line info offset and 0x8106 ( I couldn't see any
attributes defined for this in dwarf.h)for source offset.


I still get errors while running fromelf(Diab). Can someone please
help me out with this. Am I doing the right thing?


Thanks in advance,


Adwait


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.