Author
Topic: Showing vector elements in debugger (Read 9641 times)

@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...

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.

Logged

If some piece of memory should be reused, turn them to variables (or const variables).If some piece of operations should be reused, turn them to functions.If they happened together, then turn them to classes.

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 ...

If you do NOT consider it worth your time to look at the FAQs; then, I think you never read the rules!

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.

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).

[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: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?

The reason why TDM gdb works for you (as the one from ollydbg) probably isbecause 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 havinginstalled 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.

As TDM gdb (python-enabled) works (more or less) for me (without havinginstalled 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, ...?).

i think it has something to do with your code (you never mentioned that you tested my code) or something with the python scripts. the things what baffle me is the output of your debugger..

I also sometimes get lost with the "enable scripts" versus do not enable the scripts but have a gdb-python pair.

These are going away, soon. I'll just remove them as soon as I find some free time. They are useless anyway.

For gdb troubles: if we ship python enabled gdb then we'll need to ship our own version of python or modify the installer to start an installation of python itself.BTW one of the gdb windows builds had some stub gdb.exe which was modifying env variables and then the only thing it did was to start the real executable. This version doesn't work too well (the pausing command doesn't work)!

p.s. unfortunately I don't have time nor desire to work on c::b on windows.

Logged

(most of the time I ignore long posts)[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

@njiany news on this?I honestly have no idea what is going on on your system... I don't think this has anything to do with codeblocks and its configuration, but something with gdb and compiler combination?

I am using TDM GCC as well and fell for the same... Came across this thread during my search and thought it might be interesting for you.TDM GCC works right out of the box as it seems, there are just some hooks placed wrong in some online tutorials from some years back...