User forums > Using Code::Blocks

About cb's debugger

<< < (3/6) > >>

scarphin:
In pursuit of the 'additional shell commands' bug discussed below, I tried to see if they are actually executed by gdb.
http://forums.codeblocks.org/index.php/topic,19279.0.html
In file 'src/plugins/debuggergdb/gdb_driver.cpp' and inside the 'if' clause at line 285, I don't see any code to execute the 'additional shell commands' although they might be executed somewhere else. Assuming they are not executed elsewhere, this does look like they are not implemented at all and with my limited understanding of debuggers code structure, I don't see a reason why they shouldn't be implemented inside that 'if' clause either. I'll check that out when I find the time but again with my limited knowledge am I in the wrong direction or is there anything else to consider?

oBFusCATed:
I doubt they are executed anywhere else. So if you can provide a tested patch this will be very welcome. I'm not sure when I'll find the time to fix this long standing problem.

scarphin:
I added 'additional shell commands' code, tested and additional shell commands before and after both work fine. Patch is attached. I'm on Win7, I'm pretty sure they will on linux but they might need testing.

ollydbg:
Hi, scarphin.

--- Quote from: scarphin on November 07, 2014, 10:15:45 pm ---Yes, I have different config settings for different architectures that use specific gdbs built for them. But the problem here is not the embedded gdbs but different mingw versions I have. I even use tdm for cb and only for cb. I have only one debugger config for all my mingw installations and I couldn't find a suitable and proper way (that is the least error-prone way) to load the stl pretty-printers for the target compiler version (or type). The reasons behind these many different mingw installations are:

--- End quote ---

You can use the auto-load feature of GDB to load the pretty printer for a specify dll.
For example, I am using OpenCV, and I have a dll named libopencv_core246d.dll. And I have put a file libopencv_core246d.dll-gdb.py in the same folder, so that if you enable the safe auto load path by the gdb command
--- Quote ----iex "set auto-load safe-path /"
--- End quote ---
, the python script can be loaded once the libopencv_core246d.dll is loaded.

I'm not sure it works for a release version of dll, such as libopencv_core246.dll, maybe, when gdb don't find debug information in the dll, it don't search for the associated python scripts.

scarphin:
@ollydbg: Thanks for the info, much appreciated. Out of curiosity what pretty-printers do you use for OpenCV? I didn't know there existed any!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version