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