[Dwarf-Discuss] Why "DW_LNS_advance_pc" is needed and when it be generated ?

Yu Zhenyang yuzhenyang@gmail.com
Thu Aug 7 02:25:59 GMT 2008

Hi, all,

I am working a compiler bug that relative to DW_LNS_advance_pc. In the piece
of C language code of "switch/case", when I send "next" to gdb for the
compiled binaray (with -g option) on statement "switch (n)", the PC move to
next function that defined next to the "switch/case" function.

When I compare the line number information with the gcc output. I found
there are extra "Advance PC by 36 to 214170" statement in Line Number
Statements at the end of the "switch/case" function.

I wonder when and why the statement is generated.  As far as I know, the
compiler only generate ".loc " in ".s" file. Then how and when the "as"
translates it. Also, why "DW_LNS_advance_pc" is needed and when it be

Can somebody give some advice? Thanks !

Best regards,

Output is principal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dwarfstd.org/private.cgi/dwarf-discuss-dwarfstd.org/attachments/20080807/fd4bb716/attachment.htm>

More information about the Dwarf-discuss mailing list