About breakpoint in gdb
gan_xiao_jun@yahoo.com
gan_xiao_jun@yahoo.com
Thu Jun 23 15:05:00 GMT 2005
Hi,
When use gdb to debug in linux, some breakpoint can't
be stop when it is really run through,
Some friend introduce that use
b ClassB::function()
instead of
b ClassB.cpp:1234
For later way would do addicational work same as
addr2line do which may introduce some error.
It is a good way, but I encounter some exception these
days:
1)My example is when
set a breakpoint at
ClassB::function()
it can't be stop
but set a breakpoint at
(ClassB * )obj->function();
Then press s can step into ClassB::function()
I am not sure it is true for other case or it can't
stop for other reason.
2)I am not sure if there exist a c function like int3.
I can add this function to ClassB::function(), after
compile&run, gdb can stop as I want.
Does someone use this way?
Thanks for any comment about 1) or 2)
gan
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Gdb
mailing list