zoukankan      html  css  js  c++  java
  • 使用gdb的watch机制

    测试代码:https://github.com/honpey/codebox/tree/master/dlink

    (gdb) watch *601030
    Hardware watchpoint 2: *601030
    (gdb) watch *0x601030
    Hardware watchpoint 3: *0x601030
    (gdb) r
    The program being debugged has been started already.
    Start it from the beginning? (y or n) y
    Starting program: /home/hon/codebox/dlink/fun
    warning: the debug information found in "/lib64/ld-2.23.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).


    Breakpoint 1, main () at fun.c:4
    4        printf("hello world ");
    (gdb) r
    The program being debugged has been started already.
    Start it from the beginning? (y or n) y
    Starting program: /home/hon/codebox/dlink/fun
    warning: the debug information found in "/lib64/ld-2.23.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).


    Breakpoint 1, main () at fun.c:4
    4        printf("hello world ");
    (gdb) c
    Continuing.
    hello world

    Hardware watchpoint 3: *0x601030

    Old value = 4195910
    New value = -138586046
    _dl_fixup (l=<optimized out>, reloc_arg=<optimized out>)
        at ../elf/dl-runtime.c:149
    149    ../elf/dl-runtime.c: 没有那个文件或目录.
    (gdb) p/x -138586046
    $1 = 0xf7bd5842
    (gdb) p sayhello
    $2 = {<text variable, no debug info>} 0x7ffff7bd5842 <sayhello>
    (gdb)

  • 相关阅读:
    matlab绘制椭圆 ezplot
    matlab绘制函数 y=ln(1+x)
    matlab绘制函数 y=e^(x)
    matlab绘制函数
    matlab绘制函数
    matlab绘制函数
    常用求导公式复习
    积分变换
    复变函数
    概率论与数理统计目录
  • 原文地址:https://www.cnblogs.com/honpey/p/8593167.html
Copyright © 2011-2022 走看看