views:

20

answers:

1

I'm trying to understand what these offsets are in an iphone stack trace:

11  FOO                         0x0005684a +[TTURLRequest requestWithURL:delegate:] + 42
12  FOO                         0x00056840 +[TTURLRequest requestWithURL:delegate:] + 32

What are the hex numbers 0x0005684a and 0x00056840? What are the numbers +42, and +32?

I would have expected the hex numbers to match up to offsets in the binary. Unfortunately, it doesn't seem to have any correspondence:

$ nm build/AdHoc\ Release-iphoneos/FOO.app/FOO | grep 'requestWithURL'
00056820 t +[TTURLRequest requestWithURL:delegate:]
00056810 t +[TTURLRequest requestWithURL:delegate:]
+1  A: 

Memory locations. Offsets from/into the structure.

Ignacio Vazquez-Abrams
Memory locations of where the code is loaded? So that *should* have a correspondence to the symbols in the binary symbol table, right?
smtlaissezfaire
@smtlaissezfaire: it does, `0x0005684a - 42 == 0x00056820`
Hasturkun
Ah. I see - I can't subtract in hex. Thanks Hasturkun.
smtlaissezfaire