Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Debugging gdb回溯输出和otx(OTOL)输出?_Debugging_Assembly_Gdb_Otool - Fatal编程技术网

Debugging gdb回溯输出和otx(OTOL)输出?

Debugging gdb回溯输出和otx(OTOL)输出?,debugging,assembly,gdb,otool,Debugging,Assembly,Gdb,Otool,为什么这个程序的otx(otool)程序集输出中没有gdb回溯输出的地址?我的印象是它们对应于我耳道asm输出的偏移量。。。如果这是一个愚蠢的问题,我道歉。 (gdb)英国电信 #0 0x9a4e1aa2输入信号() #1 0x9A4 E175E处于线程状态等待() #pthread_cond_timedwait$UNIX2003()中的2 0x9A4 E12B1 #3 0x0d8f3f87在取消注册\u ShockwaveFlash()中 #4 0x0d45cf19在dyld存根中写入$UN

为什么这个程序的otx(otool)程序集输出中没有gdb回溯输出的地址?我的印象是它们对应于我耳道asm输出的偏移量。。。如果这是一个愚蠢的问题,我道歉。

(gdb)英国电信 #0 0x9a4e1aa2输入信号() #1 0x9A4 E175E处于线程状态等待() #pthread_cond_timedwait$UNIX2003()中的2 0x9A4 E12B1 #3 0x0d8f3f87在取消注册\u ShockwaveFlash()中 #4 0x0d45cf19在dyld存根中写入$UNIX2003() #5 0x0d6f9d7e在dyld存根中写入$UNIX2003() #6 0x0d72db5a在dyld存根中写入$UNIX2003() #7 0x0d72e24c在dyld存根中写入$UNIX2003() #8 0x0d8eb5a2在未注册的冲击波中() #9 0x0d95b9c9在未注册的冲击波中() #CAOPENGLALAYERDRAW中的10 0x9277df60() #11 0x9277e897英寸-[CAOPENGLayer(显示)]() #CalayerDisplayIfRequired()中的12 0x92503ef1 #13 CA::Context::commit_事务()中的0x925032bc #CA::Transaction::commit()中的14 0x92502f04 #15 0x958a1dd2在\uuu cfrunloopdoobserver()中 #CFRunLoopRunSpecific()中的16 0x9585d3ea #CFRunLoopRunInMode()中的17 0x9585d1f1 #RunCurrentEventLoopInMode()中的18 0x95530e04 #19 0x95530bb9位于ReceiveNextEventCommon()中 #20 0x956b9084 in_AcquireNextEvent() #运行ApplicationEventLoop()中的21 0x956aed40 #fkDecode()中的22 0x100083e2 #fkCall()中的23 0x10026167 #fkDecode()中的24 0x100081f6 #fkCall()中的25 0x10026167 #fkDecode()中的26 0x100081f6 #fkRunMain中的27 0x10003be5() #28 0x00001e84在主目录中()

以下内容可能会对您有所帮助:

  • 由于地址空间布局随机化(ASLR),全局和局部范围中定义的变量可能具有不同的地址
  • 如果程序是多线程的,则由于ASLR,堆分配的变量可能具有不同的地址
在Linux上,GDB默认禁用ASLR。在Mac上尝试禁用ASLR

(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>