Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

configure file to debug codecompletion plugin

<< < (4/4)

ollydbg:
By the way, there are some gdb command to show how long the gdb command will response. ( this can measure the wxString showing delay problem several months ago I posted  :D)

Maintenance Commands - Debugging with GDB

Here is the debugger log:

--- Quote --->>>>>>cb_gdb:
> maint time
"maintenance time" takes a numeric argument.
>>>>>>cb_gdb:
> maint time 1
Command execution time: 0.000000
>>>>>>cb_gdb:
> next
E:\code\cb\cc_branch\src\src\main.cpp:479:24053:beg:0x416c17
Command execution time: 0.000000
>>>>>>cb_gdb:
> next
[New Thread 2780.0xa04]
[New Thread 2780.0xbb4]
E:\code\cb\cc_branch\src\src\main.cpp:482:24131:beg:0x416c4b
Command execution time: 0.140000
>>>>>>cb_gdb:
> break "E:/code/cb/cc_branch/src/plugins/codecompletion/parser/parserthread.cpp:472"
No source file named E:/code/cb/cc_branch/src/plugins/codecompletion/parser/parserthread.cpp.
Breakpoint 2 ("E:/code/cb/cc_branch/src/plugins/codecompletion/parser/parserthread.cpp:472) pending.
Command execution time: 4.453000
>>>>>>cb_gdb:
> break "E:/code/cb/cc_branch/src/plugins/codecompletion/parser/parserthread.cpp:474"
No source file named E:/code/cb/cc_branch/src/plugins/codecompletion/parser/parserthread.cpp.
Breakpoint 3 ("E:/code/cb/cc_branch/src/plugins/codecompletion/parser/parserthread.cpp:474) pending.
Command execution time: 3.875000
>>>>>>cb_gdb:

--- End quote ---

It will take several seconds to let gdb to set a pending breakpoint... too slow... :(

Edit: which means after a new dll is loaded, gdb need to check if a pending breakpoint can be convert to a normal breakpoint, but it seems one check need about 4 seconds, So, if we have 30 dll to loade, the checking time should be 4*30= 120 seconds..... Oh my God!!

ollydbg:

--- Quote from: ollydbg on July 21, 2010, 02:35:04 am ---
1, copy the  E:\code\cb\cc_branch\src\devel\share\CodeBlocks\plugins\codecompletion.dll to
                  E:\code\cb\cc_branch\src\output\share\CodeBlocks\plugins
   so that the debug information can be reserved.

--- End quote ---

We even don't need to manually copy the dll file, we can just set the path of the generated dll file.

You need to change the "devel" to "output".

Than, every thing works fine!  :D

ollydbg:

--- Quote from: Pecan on July 21, 2010, 03:29:26 pm ---I find when debugging CB devel with CB output that loading is extreemly slow when a breakpoint is set.
So, instead of a breakpoint, I place an "asm("int3")" statement at the point I want to begin debugging. CB then loads within 4-10 seconds.
When the int 3 is hit, I then set more breakpoints.

--- End quote ---
Sorry for bump the old thread.
Hi, All and Pecan.
There are good news on this issue, the gdb guys supply a patch to fix this issue.
See my comments here:
http://sourceware.org/ml/gdb-patches/2011-11/msg00141.html

I have test this patch, and found that CB/gdb start up extremely fast with pending breakpoints under WinXP. This will make debugging plugins much faster and more happy.  :D :D

oBFusCATed:
Hm, this sounds great, I hope it is not windows only.
My app at work has even more shared libraries than C::B and when I set breakpoint somewhere it takes more than a minute to start it, which is very annoying

Navigation

[0] Message Index

[*] Previous page

Go to full version