0

Why are none of the addresses from the gdb backtrace output present in the otx (otool) assembly output of this program? I was under the impression that they corresponded to the offsets in my otool asm output... I apologize if this is a silly question.

(gdb) bt
#0  0x9a4e1aa2 in __semwait_signal ()
#1  0x9a4e175e in _pthread_cond_wait ()
#2  0x9a4e12b1 in pthread_cond_timedwait$UNIX2003 ()
#3  0x0d8f3f87 in unregister_ShockwaveFlash ()
#4  0x0d45cf19 in dyld_stub_write$UNIX2003 ()
#5  0x0d6f9d7e in dyld_stub_write$UNIX2003 ()
#6  0x0d72db5a in dyld_stub_write$UNIX2003 ()
#7  0x0d72e24c in dyld_stub_write$UNIX2003 ()
#8  0x0d8eb5a2 in unregister_ShockwaveFlash ()
#9  0x0d95b9c9 in unregister_ShockwaveFlash ()
#10 0x9277df60 in CAOpenGLLayerDraw ()
#11 0x9277e897 in -[CAOpenGLLayer _display] ()
#12 0x92503ef1 in CALayerDisplayIfNeeded ()
#13 0x925032bc in CA::Context::commit_transaction ()
#14 0x92502f04 in CA::Transaction::commit ()
#15 0x958a1dd2 in __CFRunLoopDoObservers ()
#16 0x9585d3ea in CFRunLoopRunSpecific ()
#17 0x9585d1f1 in CFRunLoopRunInMode ()
#18 0x95530e04 in RunCurrentEventLoopInMode ()
#19 0x95530bb9 in ReceiveNextEventCommon ()
#20 0x956b9084 in _AcquireNextEvent ()
#21 0x956aed40 in RunApplicationEventLoop ()
#22 0x100083e2 in fkDecode ()
#23 0x10026167 in fkCall ()
#24 0x100081f6 in fkDecode ()
#25 0x10026167 in fkCall ()
#26 0x100081f6 in fkDecode ()
#27 0x10003be5 in fkRunMain ()
#28 0x00001e84 in main ()</code>
Peter Murphy
  • 351
  • 3
  • 3

1 Answers1

0

The followings may help you :

  • Variables defined in Global and Local Scope may have different address due to Address Space Layout Randomization (ASLR)
  • Heap allocated variables may have different address due to ASLR, if your program is multi-threaded

On Linux GDB is by default disables ASLR. Try it on Mac disabling ASLR.

Md Mahbubur Rahman
  • 2,065
  • 1
  • 24
  • 36