addr2line not returning anything useful (maybe just for me?)

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Nov 20 10:19:00 GMT 2014


On Nov 20 17:35, Shaddy Baddah wrote:
> Hi,
> 
> I can't get addr2line to give me anything useful on any stackdump files.
> 
> I haven't used it for a while, so perhaps the following snippet will
> show my incorrect use?
> 
> <snip>
> $ cat > /tmp/foo.c << EOF
> > int main() { ((void (*)(void))0)(); }
> > EOF
> $ gcc -g -o /tmp/foo2 /tmp/foo2.c
> $ /tmp/foo2
> Segmentation fault (core dumped)
> $ addr2line -f -e /tmp/foo2.exe < foo2.exe.stackdump
> ??
> ??:0

That doesn't work.  Did you inspect the stackdump file with an editor?
Try something like

$ awk '/^[0-9]/{print $2;}' foo2.exe.stackdump | addr2line -f -e /tmp/foo2.exe


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20141120/ea176995/attachment.sig>


More information about the Cygwin mailing list