Domanda

During the work I faced with the following problem:

I need to parse GDB debug info.

Separate debug info file is a binary, so I can not read it without knowing a format.

So, here is the question:

Is there any ready parser for GDB info, or at least document describing it?

È stato utile?

Soluzione

Is there any ready parser for GDB info

There is no such thing. There are various debug info formats (DWARF, STABS, etc.) and multiple consumers of these debug formats (GDB is one such consumer).

If you are on Linux, the default debug format is DWARF, documented here.

I need to parse ... debug info

Depending on your actual needs, readelf -w or already mentioned libdwarf may be appropriate. Or you could write your own parser from scratch, though it's unlikely to be the optimal solution.

Altri suggerimenti

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top