由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - gdb stl 调试问题
相关主题
用vim + gdb 调试的人牛屄轰轰的请教一个GDB/DWARF2的问题
VS下有Lib(C++)如何调试?调试版链接时间特别长
in what case you still want to use process instead of threa (转载)感慨一下,XCODE的DEBUG真恶心阿
php有源码,c#只会留个dll给后来者。一个vc问题
大家在linux下面用什么C++的IDE呢?[合集] 大家是怎么调试带STL模板类的c++程序的?
exe built by visual studio 2005,cannot run?请推荐linux下的IDE能调试STL的
C源程序能不能知道gcc的优化选项呢?mysql debugging 真麻烦
难道make没有调试器吗?求教linux下debug的问题
相关话题的讨论汇总
话题: stl话题: so话题: gdb话题: debug话题: strip
进入Programming版参与讨论
1 (共1页)
h***r
发帖数: 726
1
如果一个函数的参数是vector等stl的东西时,
在gdb用s (step into)就会进入stl源代码。
如何避免进入源代码?
用nm + strip还是不能解决问题,有些东西strip不掉.
谢谢!
d****p
发帖数: 685
2
If you strip ur obj file, how can you debug?

【在 h***r 的大作中提到】
: 如果一个函数的参数是vector等stl的东西时,
: 在gdb用s (step into)就会进入stl源代码。
: 如何避免进入源代码?
: 用nm + strip还是不能解决问题,有些东西strip不掉.
: 谢谢!

h***r
发帖数: 726
3
I am not strip all debug info but only those in the c++ library.
But some of them can not be stripped away. (Some can)

【在 d****p 的大作中提到】
: If you strip ur obj file, how can you debug?
d****p
发帖数: 685
4
STL include both libs and sources which are built into your object files. So
you cannot remove all of them.
If you compile under release mode, some of these soruce codes will be
inlined and there will be no debug info. However, that means you cannot
debug.

【在 h***r 的大作中提到】
: I am not strip all debug info but only those in the c++ library.
: But some of them can not be stripped away. (Some can)

h***r
发帖数: 726
5
那有没有办法在调试时不进入stl source code?

So

【在 d****p 的大作中提到】
: STL include both libs and sources which are built into your object files. So
: you cannot remove all of them.
: If you compile under release mode, some of these soruce codes will be
: inlined and there will be no debug info. However, that means you cannot
: debug.

d****p
发帖数: 685
6
So that happens when you step into your function? Guess that's because the
parameters of the function involve STL code. In that case just set break
points inside your function.
A GUI frondend helps in this case: try DDD. If you are on great Mac however,
Xcode will set everything for you.

So

【在 d****p 的大作中提到】
: STL include both libs and sources which are built into your object files. So
: you cannot remove all of them.
: If you compile under release mode, some of these soruce codes will be
: inlined and there will be no debug info. However, that means you cannot
: debug.

h***r
发帖数: 726
7
unfornately, setting break points and using ddd are not good solution for me:
1. Getting out from stl is *usually* faster than setting the break points (
which invols getting to the function, setting break points and possible
disable it later on)
2. I am working remotely 99% time. I do not use ddd.
I still believe this can be solved.

however,

【在 d****p 的大作中提到】
: So that happens when you step into your function? Guess that's because the
: parameters of the function involve STL code. In that case just set break
: points inside your function.
: A GUI frondend helps in this case: try DDD. If you are on great Mac however,
: Xcode will set everything for you.
:
: So

h***r
发帖数: 726
8
interesting, someone is working on a patch to gdb. He started it May 1, 2010
, and this is the patch
http://sourceware.org/bugzilla/attachment.cgi?id=4810&action=view
Certainly I can not use it for my work because I can not patch my remote
machine, but I will be happy to try it out on my home machine.

me:

【在 h***r 的大作中提到】
: unfornately, setting break points and using ddd are not good solution for me:
: 1. Getting out from stl is *usually* faster than setting the break points (
: which invols getting to the function, setting break points and possible
: disable it later on)
: 2. I am working remotely 99% time. I do not use ddd.
: I still believe this can be solved.
:
: however,

1 (共1页)
进入Programming版参与讨论
相关主题
求教linux下debug的问题大家在linux下面用什么C++的IDE呢?
问个调试minified js的问题exe built by visual studio 2005,cannot run?
感觉免费的visual studio是Windows最强IDEC源程序能不能知道gcc的优化选项呢?
我觉得Swift开不开源关系不大难道make没有调试器吗?
用vim + gdb 调试的人牛屄轰轰的请教一个GDB/DWARF2的问题
VS下有Lib(C++)如何调试?调试版链接时间特别长
in what case you still want to use process instead of threa (转载)感慨一下,XCODE的DEBUG真恶心阿
php有源码,c#只会留个dll给后来者。一个vc问题
相关话题的讨论汇总
话题: stl话题: so话题: gdb话题: debug话题: strip