User forums > Using Code::Blocks
Showing vector elements in debugger
ollydbg:
--- Quote from: BlueHazzard on June 23, 2017, 12:08:57 pm ---@ollydbg:
does it make sense to provide the python dll within your gdb download? Are there dependencies to other dlls (from python27.dll to other) too?
What if there is a python27.dll in the bin folder and one in the system folder? What version gets picked?
I see the frustration of the OP and i would like to do something against it...
--- End quote ---
Copying only a dll file is not enough, you have to copy all the folders(such as the folder named "Lib" under python installed folder) to your GDB's bin folder. This will make the distribution a lot bigger, my personally python have a lot of non-standard packages installed in the "Lib" folder, so I don't want to to distribute the python, installing python is quite simple under Windows, just download the official python installer.
stahta01:
--- Quote from: nji on June 24, 2017, 06:39:05 pm ---Banned? :-\
Will you come with me?
Usually I don't explain my points ...
But for you I will do an exception:
Yes, I will take you for serious ...
... as soon as you do mature.
I always tried to explain/ to give reason for what I wrote above.
I can't imagine of anything more revealing weakness than the threat of a bann.
Oh man ...
--- End quote ---
If you do NOT consider it worth your time to look at the FAQs; then, I think you never read the rules!
Reading the rules after you are banned is NOT very useful.
Tim S.
nji:
@stahta01:
I couldn't have expressed it better. :)
--- Quote from: ollydbg on June 25, 2017, 03:51:37 pm ---Copying only a dll file is not enough, you have to copy all the folders(such as the folder named "Lib" under python installed folder) to your GDB's bin folder. This will make the distribution a lot bigger, my personally python have a lot of non-standard packages installed in the "Lib" folder, so I don't want to to distribute the python, installing python is quite simple under Windows, just download the official python installer.
--- End quote ---
Does this mean that using the gdb binaries (v.7.9.1) from http://tdm-gcc.tdragon.net/download (at the bottom) will never be sufficient (although "includes Python support")?
I took this and copied everything into the existing structure ... and it works ... nearly (see description above).
BlueHazzard:
i tested now with the gdb from the tdm site and here are my results:
--- Code: ---Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: ****rerreer\
Adding source dir: ****rerreer\
Adding file: ****rerreer\bin\Debug\rerreer.exe
Changing directory to: ****rerreer/.
Set variable: PATH=.####
[debug]Command-line: TDM-GCC-32\bin\gdb.exe -fullname -quiet -nx -args ****rerreer/bin/Debug/rerreer.exe
[debug]Working dir : ****rerreer
Starting debugger: TDM-GCC-32\bin\gdb.exe -fullname -quiet -nx -args ****rerreer/bin/Debug/rerreer.exe
done
[debug]> set prompt >>>>>>cb_gdb:
[debug]Skip initializing the scripting!
Setting breakpoints
[debug]Reading symbols from ****rerreer/bin/Debug/rerreer.exe...
[debug]done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.9.1
[debug]Copyright (C) 2015 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law. Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 7.9.1
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 200
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source TDM-GCC-32\bin\stl.gdb
source TDM-GCC-32\share\gcc-4.9.2\python\wx\wx_print.py
[debug]>>>>>>cb_gdb:register wxWudgets printer
[debug]> directory ****rerreer/
[debug]>>>>>>cb_gdb:
[debug]> break "****rerreer/main.cpp:10"
[debug]Source directories searched: ****rerreer;$cdir;$cwd
[debug]>>>>>>cb_gdb:Breakpoint 2 at 0x4013b2: file ****rerreer\main.cpp, line 10.
Source directories searched: ****rerreer;$cdir;$cwd
[debug]> run
[debug]>>>>>>cb_gdb:
[debug]> info frame
[debug]Starting program: ****rerreer\bin\Debug\rerreer.exe
Child process PID: 7072
[debug][New Thread 7072.0x11a0]
[debug]Breakpoint 2, main () at ****rerreer\main.cpp:10
[debug]****rerreer\main.cpp:10:137:beg:0x4013b2
[debug]>>>>>>cb_gdb:Stack level 0, frame at 0x28ff30:
At ****rerreer\main.cpp:10
[debug]> bt 30
[debug] eip = 0x4013b2 in main (****rerreer\main.cpp:10); saved eip = 0x4010fd
[debug] source language c++.
[debug] Arglist at 0x28ff18, args:
[debug] Locals at 0x28ff18, Previous frame's sp is 0x28ff30
[debug] Saved registers:
[debug] ebx at 0x28ff0c, ebp at 0x28ff18, esi at 0x28ff10, edi at 0x28ff14, eip at 0x28ff2c
[debug]>>>>>>cb_gdb:#0 main () at ****rerreer\main.cpp:10
[debug]>>>>>>cb_gdb:
[debug]> whatis test
[debug]type = std::vector<double>
[debug]>>>>>>cb_gdb:
[debug]> output test
[debug]std::vector of length 1, capacity 1 = {22.440000000000001}>>>>>>cb_gdb:
[debug]> next
[debug]****rerreer\main.cpp:12:187:beg:0x4013ce
[debug]>>>>>>cb_gdb:
At ****rerreer\main.cpp:12
[debug]> whatis test
[debug]type = std::vector<double>
[debug]>>>>>>cb_gdb:
[debug]> output test
[debug]std::vector of length 2, capacity 2 = {22.440000000000001, 1.3795933261199322e-306}>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0 main () at ****rerreer\main.cpp:12
[debug]>>>>>>cb_gdb:
[debug]> whatis test[0]
[debug]type = double
[debug]>>>>>>cb_gdb:
[debug]> output test[0]
[debug]22.440000000000001>>>>>>cb_gdb:
[debug]> whatis test[1]
[debug]type = double
[debug]>>>>>>cb_gdb:
[debug]> output test[1]
[debug]1.3795933261199322e-306>>>>>>cb_gdb:
--- End code ---
so all is working for me... I don't understand why it is not working for you...
Can you try do redo all my steps i posted above but use the tdm gdb?
Also can you create a new project and try my sample code i posted above?
nji:
Maybe there is a kind of confusion beginning to creep in now.
I already tested both versions of gdb:
The one from TDM
https://sourceforge.net/projects/tdm-gcc/files/GDB/gdb32-7.9.1-tdm-1.zip/download
works ("humbling") for me too, as I posted here
http://forums.codeblocks.org/index.php/topic,21998.msg149717.html#msg149717
And the one from ollydbg
http://sourceforge.net/projects/gdbmingw/files/gdb2016-01-30.zip/download
lets miss the python27.dll
see
http://forums.codeblocks.org/index.php/topic,21998.msg149741.html#msg149741
The reason why TDM gdb works for you (as the one from ollydbg) probably is
because you installed python separately.
[Edit:
If you would de-install your python distr, maybe (... maybe) you would have the same effect than I.]
BTW:
As TDM gdb (python-enabled) works (more or less) for me (without having
installed python anywhere) I do doubt that it is necessary to install python separately.
For me it looks like a kind of "cooperation problem" (IDE, gdb, ...?).
And the way I did now (just copying the binaries into the existing structure)
for sure is no good.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version