stabs vs. dwarf-2 clarification

Jeff Baker jbaker@qnx.com
Thu Mar 31 05:15:00 GMT 2005


I have a (hopefully) quick question about the behaviour of stabs as compared
to dwarf-2.  I have a small sample app that I build with stabs debugging and
link against a static lib that was built with no debugging.  If I use
addr2line to get the line number for anything from inside the static lib
with stabs debugging I will get the line number of whatever the previous
stabs entry is, no matter how far back it has to go.  With dwarf-2 I get
"??:0".  Is this the way stabs is expected to work?

I've attached a testcase that shows what I'm talking about.  Modify the
Makefile to fit your host system, make it and then ask for a line number
from inside func1.  You should get appprofiler_looper.c:126.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: prof_demo.tgz
Type: application/octet-stream
Size: 1575 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20050331/38ba7978/attachment.obj>


More information about the Binutils mailing list