【问题标题】:GDB backtrace variables valuesGDB 回溯变量值
【发布时间】:2017-06-05 09:59:34
【问题描述】:

gdb回溯不同帧中指针的值:

  • 是变量在执行那一刻的值吗?
  • 或者当错误发生时 GDB 在堆栈中的值是什么?

例如,如果我在第 3 帧和第 4 帧中获得 phy_rad 值(两者都指向同一个地址),我能否检测到从第 3 帧切换到第 4 帧的变化?

#0 0x00419561 in list_del_free_func_ (l=0x76e11b90, f_free_node=0x0, release_func=0x4192d9 ) at src/util/util.c:174 #1 0x00419613 in list_del_free_func (l=0x76e11b90, f_free_node=0x0) at src/util/util.c:192 #2 0x004b3355 in store_scan_info (scan_res=0x9cb060, phy_rad=0x9c7ed4) at bla.c:312 #3 0x004b36fd in get_scan_freq_obj (phy_rad=0x9c7ed4, chans=0x99c134, radio_mac=0x76e11c70 "\004\360!\033\367\247\017") at bla.c:381 #4 0x004b3c63 in WVIC_scan (arg=0x9c7e90) at bla.c:454 #5 0x770b5689 在?? ()

【问题讨论】:

    标签: c gdb


    【解决方案1】:

    同事给我举了个例子,就是失败时的栈状态。

    【讨论】:

      猜你喜欢
      • 2011-07-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-07
      • 1970-01-01
      • 2010-09-11
      • 2018-03-18
      相关资源
      最近更新 更多