Linux | c&cpp | Email | github | QQ群:425043908 关注本站

itarticle.cc

您现在的位置是:网站首页 -> 程序设计 文章内容

GDB加载调试共享库-itarticl.cc-IT技术类文章记录&分享

发布时间: 6年前程序设计 106人已围观返回

(gdb) break main

Breakpoint 1 at 0x80484ed: file main.cpp, line 7.

(gdb) run

Starting program: /home/testuser/libtest/testApp


Breakpoint 1, main () at main.cpp:7

7 printf("In main()\n");

(gdb) info sources

Source files for which symbols have been read in:


/home/testuser/libtest/main.cpp


Source files for which symbols will be read in on demand:



(gdb) info sharedlibrary

From To Syms Read Shared Object Library

0xb7fde820 0xb7ff6b9f No /lib/ld-linux.so.2

0xb7fd83a0 0xb7fd84c8 No /home/testuser/libtest/libTest.so

0xb7e30f10 0xb7f655cc No /lib/i386-linux-gnu/libc.so.6

(gdb) sharedlibrary libTest

Reading symbols from /home/testuser/libtest/libTest.so...done.

Loaded symbols for /home/testuser/libtest/libTest.so

(gdb) info sources

Source files for which symbols have been read in:


/home/testuser/libtest/main.cpp


Source files for which symbols will be read in on demand:


/home/testuser/libtest/lib.cpp

(gdb) break lib.cpp:5

Breakpoint 2 at 0xb7fd846e: file lib.cpp, line 5.

(gdb) continue

Continuing.

In main()


Breakpoint 2, func () at lib.cpp:5

5 printf("In func()\n");

发布时间: 6年前程序设计106人已围观返回回到顶端

很赞哦! (1)

文章评论

  • 请先说点什么
    热门评论
    105人参与,0条评论

站点信息

  • 建站时间:2016-04-01
  • 文章统计:728条
  • 文章评论:82条
  • QQ群二维码:扫描二维码,互相交流