User forums > Using Code::Blocks
C::B debug (gdb) with breakpoints pending is VERY SLOW ...
kccheng:
--- Quote from: oBFusCATed on June 18, 2011, 01:27:00 am ---
--- Quote from: kccheng on June 17, 2011, 10:25:43 pm ---Attachment is the debug log I recorded.
I guess it's C::B's problem because using gdb 6.8 (mingw version) directly to
run the host application does not slow down much (only ~5 sec which is acceptable).
--- End quote ---
You're saying that if you execute the same commands in a console gdb session, you'll have no delay?
--- End quote ---
YES. In fact, I found some similar discussion via Google
http://cygwin.com/ml/cygwin/2008-12/msg00162.html
http://sourceware.org/ml/gdb/2010-07/msg00080.html
But none have solution. Some claim it's gdb's bug too ... but base on
what I got, I will just say maybe.
--- Quote ---Have you tried newer gdb?
--- End quote ---
Not yet ... I'm using gdb 6.8 from www.mingw.org. Will try 7.2 later ...
--- Quote ---p.s. we're talking about windows, aren't we?
--- End quote ---
Yes we are talking about windows (WinXP, SP3). I try C::B+gdb under
SuSE enterprise 11.0 ... there are no such performance issue.
Regards,
KC
oBFusCATed:
Can you try to find the command that slows it down? (start removing them one by one)
kccheng:
--- Quote from: oBFusCATed on June 18, 2011, 08:51:38 am ---Can you try to find the command that slows it down? (start removing them one by one)
--- End quote ---
I'm trying ... however, it's not easy since the host application is a VERY BIG project !!
BTW, I tested gdb 7.2 (from mingw.org) ... it's worse :-(
But this time it looks like the problem comes from gdb itself, because gdb 7.x slow down
all Gtk2 application on WinXP !!!
KC
ollydbg:
--- Quote ---If I set breakpoints first (pending breakpoints), then click
on Debug->Start ... myApp (multi-threads, gtk2 app) will take about 1min. to start.
But without breakpoints, it only takes couple sec to start.
--- End quote ---
This is 100% true when I try to debug c::b in c::b.
But I think this is by design of gdb :(.
I have meet this kind of problem several months ago, and we have several solutions(work around) in our forum, you can search them. :D
PS:
This post http://sourceware.org/ml/gdb/2010-07/msg00080.html was written by me. :D
kccheng:
--- Quote from: ollydbg on June 18, 2011, 02:22:13 pm ---This post http://sourceware.org/ml/gdb/2010-07/msg00080.html was written by me. :D
--- End quote ---
Hi
After check the post you mentioned and couple discussion I found by Google search,
I think the following step probably is the only solution to avoid the SLOW DOWN
issue at this moment:
1) start the host application without breakpoints
1.a) for Gtk2 (and probably all GUI apps with event loop), break the app from C::B
(send SIGTRAP to app) make sure C::B get the control back.
2) set breakpoints from C::B
3) continue
This is acceptable, but it raises another issue.
What if I have multiple breakpoints which need to be set at one time ?
The solution I got at this moment is send command "source gdb.script"
directly from C::B to gdb. However, C::B does not show
the breakpoints defined inside gdb.script :-(
My question is:
Is there any way to update C::B GUI so it can show all breakpoints
defined in gdb command file or initial file (gdbinit) ?
Another related question ... if I use C::B GUI to define breakpoints
by click on program's source file, how can I export the breakpoints
to external file ? Is this possible ?
Regards,
KC
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version