-----Original Message-----
From: Oded Arbel [mailto:[EMAIL PROTECTED]

> But they don't. instead they have memory addresses and the function name. so 
> I've been thinking - suppose I have a binary with debugging information, and 
> the source code and a stack trace - shouldn't I be able to extrapolate from 
> it in what line in the code each frame in the stack is ?
> 
> Note: I don't have a core dump - just a textual stack trace.

Well, from what I recall from Compiler Theory 101, if you have enough debug 
information to enable a good IDE to give you visual step-by-step debugging, you should 
have enough info to correlate addresses with lines. Given that, all you have to do is 
correlate the address on the stack with the appropriate line, and go one line back 
(because the stack trace always gives you the line after the call). I think you need 
to adjust the values in the binary with the process load address if you want to do 
that.

Maybe the main() address on the stack (provided you get it) can give you the load 
address if you use it right, and then you can work out the rest.

-- Arik


**********************************************************************
This email and attachments have been scanned for
potential proprietary or sensitive information leakage. 

PortAuthority(TM)  Server 
Keeping Information Inside
Vidius, Inc. 
www.vidius.com
**********************************************************************


================================================================To unsubscribe, send 
mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to