VC8-compatible debugging in the works!

Peter Johnson peter at tortall.net
Wed Mar 22 00:53:38 PST 2006


On Wed, 22 Mar 2006, Vikas Kumar wrote:
> On 3/21/06, Michael Urman <mu at tortall.net> wrote:
>>
>> Dwarf2 support is primarily for gas-parser gcc pass-through at this
>> point; I'm not sure if it guesses variables and/or functions, but it
>> will generate line information even when pass-through is unavailable.
>> This is definitely the format of choice for elf output down the road.
>
> Does this mean, if I use NASM syntax instead of Gas syntax DWARF2 will
> not be supported ? Not that I need it, for debugging assembly I find
> it best to use various features of gdb rather than anything else... In
> any case there will be a very fine line in defining data vs code ...
> data can be defined anywhere as can code.. or maybe you meant
> compiling a C program and then using yasm instead of Gas to assemble
> it  ?

DWARF supports two use cases:
1) Debug info passthrough (e.g. line numbers as given by a C compiler)
2) Debug info generation (line numbers from assembly source file)

#1 is only currently supported in GAS syntax (mostly due to lack of a 
couple of lines of code in the NASM parser), and yes, the main intention 
of such support is for compiler backends.

#2, on the other hand, is supported in *both* NASM and GAS syntaxes.

In short, Yasm *will* generate DWARF2 assembly source line numbers for all 
code sections; just specify "-g dwarf2" on the Yasm command line to enable 
generation.  Then you can enjoy source-level assembly debugging in gdb :).

The only feature still somewhat missing is the ability to add hints to 
generate additional debug information, like marking certain labels as 
functions, marking data in certain ways, etc.

Peter


More information about the yasm-devel mailing list