This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Hi,

On 20/11/14 21:19, Corinna Vinschen wrote:
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

Yep. That does the trick at least on x86. Unfortunately, I'm getting no
love on x86_64, but that's because the stackdump file actually contains
no frame lines at all:

Exception: STATUS_ACCESS_VIOLATION at rip=00000000000
rax=0000000000000000 rbx=000000000023AAF0 rcx=0000000000000001
rdx=0000000000000000 rsi=0000000600058EC0 rdi=000000000023AB32
r8 =00007FFAC1FE0000 r9 =00000000002325A0 r10=00007FFAC21152E0
r11=00000000002327F0 r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=000000000023AB32
rbp=000000000023AAA0 rsp=000000000023AA78
program=c:\Users\Public\Temp\cygwin64\foo2.exe, pid 15200, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame        Function    Args
End of stack trace

It's not an urgent issue or anything, but I'd be grateful if someone
confirm it happens to them too, bonus for why.

--
Regards,
Shaddy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]