how to read stackdump

Igor Pechtchanski pechtcha@cs.nyu.edu
Mon May 12 01:58:00 GMT 2003


On 2003年5月11日, Charles D. Russell wrote:
> Some time back, someone asked in this mailing list how to read the stackdump
> and was told to man addr2line. I can't seem to get addr2line to work,
> though. Perhaps I don't understand the syntax, and man and info give no
> examples. When you type in the "address", should it be the number under
> "Frame", the number under "Function", or what? I have tried either and
> both, and nothing works (I always get ??:0) I also tried
>> addr2line -e testprog.exe <testprog.stackdump
>> which gives me a whole column of ??:0. I'm compiling with g77 using -g.
> What am I doing wrong?

Charles,
addr2line expects addresses of functions. It also expects its input
executables to be compiled with debugging support enabled.
Try the following:
 awk '/^[0-9]/{print 2ドル}' testprog.exe.stackdump | addr2line -f -e testprog.exe
If testprog.exe was compiled with the "-g" gcc flag, this should work and
give you the names of the functions *in testprog.exe*. Functions that
came from DLLs will need a separate invocation of addr2line (I don't think
you can specify several -e targets in one command), and will require DLLs
with debugging information, AFAIK.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
 |\ _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_		igor@watson.ibm.com
 |,4- ) )-,_. ,\ ( `'-'		Igor Pechtchanski
 '---''(_/--' `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Knowledge is an unending adventure at the edge of uncertainty.
 -- Leto II
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /