dwarf

Python libdwarf module

I'm working on a utility which needs to resolve hex addresses to a symbolic function name and source code line number within a binary. The utility will run on Linux on x86, though the binaries it analyzes will be for a MIPS-based embedded system. The MIPS binaries are in ELF format, using DWARF for the symbolic debugging information. I'...

in Java: programmatically determining addresses of C/C++ variables given a COFF/ELF/DWARF executable

This is a situation I run into now and then: For an embedded system which does not use virtual addressing, I have an executable file that was compiled from C or C++ code with debugging information included. It's usually in COFF or ELF/DWARF (I get those two mixed up) format. At runtime, on a PC, I would like to determine the address of...

Reading DWARF file in Mac OSX

Hi All, Can anybody help me writing a program which can read DWARF files and gives me the file name, line number and function name details. Thanks in advance -A ...

Library to read ELF file DWARF debug information

Any recommendations for a good cross-platform library for reading ELF file debug information in DWARF format? I'd like to read the DWARF debug info in a Python program. ...

Info.plist file processing modifies executable

I've been working on an iPhone application had an issue where dSYM file generation was seg faulting on me. GenerateDSYMFile /Users/kaom/Projects/build/Release-iphoneos/NodeAppGen.app.dSYM /Users/kaom/Projects/build/Release-iphoneos/NodeAppGen.app/NodeAppGen cd /Users/kaom/Projects/Apps/NodeAppGen setenv PATH "/Developer/Platforms...

Using ptrace to generate a stack dump

Hello. I am compiling C++ on *nix and I would like to generate a stack dump a) at an arbitrary point in the program, b) during any signal, particularly during SIGSEGV. Google tells me that ptrace is probably the tool for the job, but I can't find any comprehensible examples of walking the stack. Getting the return address, yeah, but wh...

implementing step over, dwarf

Hi, Im working on a source level debugger. The debug info available in elf format. How could be 'step over' implemented? The problem is at 'Point1', anyway I can wait for the next source line (reading it from the .debug_line table). Thanks if (a == 1) x = 1; //Point1 else if (a == 2) x = 1; z = 1; ...

gdb\bfd: get child variable address or size or offset

Hi, I'm using gdb and libbfd to retrieve global variables information from an elf file and show it. I can get the following data from libbfd: Global Variable name, address and size. I retrieve the type of the variables and its children using gdb and gdb\MI (ptype, whatis, -var-create & -var-list-children). How can I get the address\siz...

Suggestions on how to write a debug format conversion tool

I'm looking to write a tool that aims to convert debug symbols of one format to another format that's compatible for use under GDB. This seems like a tedious and potentially complex project so I'm not exactly sure how to tackling it. Intially I'm aiming to convert the Turbo Debug Symbol table(TDS) emitted from borland compilers into so...

Trying to compile libdwarf, gives undefined errors

I'm trying to build the libdwarf api under windows but I'm receiving the following compile errors. in dwarf_elf_access.c undefined type Elf32_Ehdr, undefined symbol EI_CLASS undefined symbol ELFCLASS64 undefined symbol ELFDATA2LSB ... I did a search through all the header files and source files and I couldn't find them defined anywher...

How to get the function name of a C function pointer

I have the following problem: when I get a backtrace in C using the backtrace(3) function the symbols returned the name of the functions is easily determinable with the dwarf library and dladdr(3). The problem is that if I have a simple function pointer (e.g. by passing it &function) the dladdr + dwarf functions can't help. It seems tha...