User forums > General (but related to Code::Blocks)
Feature Request/Help: GDB Vector, nested vector, and strut viewing.[SOLVED]
oBFusCATed:
For me it works by default (gentoo+gcc-4.7+gdb-7.4)
PureBlackSin:
Okay, I'm really struggling to get these scripts to be found and run by gdb. I really have tried to follow the instructions. Can someone give me an idiots guide to getting this set up. Commands to type, config files to make and menu settings to select. I've honestly tried and need help... Can someone give me a step by step here?
ollydbg:
--- Quote from: PureBlackSin on July 21, 2012, 12:56:21 am ---Okay, I'm really struggling to get these scripts to be found and run by gdb. I really have tried to follow the instructions. Can someone give me an idiots guide to getting this set up. Commands to type, config files to make and menu settings to select. I've honestly tried and need help... Can someone give me a step by step here?
--- End quote ---
I re-read the log message here:
http://forums.codeblocks.org/index.php/topic,16607.msg112768.html#msg112768
It seems that I can see any command to load the pretty printer for std c++.
You need to add a command: (There is an option in Codeblocks' debugger setting dialog)
--- Code: ---source /path/to/some.gdb
--- End code ---
Note:
The file "/path/to/some.gdb" should contains the script mentioned here:
http://sourceware.org/gdb/wiki/STLSupport
oBFusCATed:
ollydbg: this is not needed, becase gdb supports auto loading them...
pureblacksin: try this command in a terminal
--- Code: ---$ ldd /usr/bin/gdb | grep pyt
--- End code ---
It will tell you if gdb is compiled with python support, if the output is empty, then you have no luck.
But I'm pretty sure it will be non-empty.
Also you can search for the printer files, they are python scripts.
See what do I have on my system:
--- Code: ---/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.0/python/libstdcxx/__init__.py
/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.0/python/libstdcxx/v6/__init__.py
/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.0/python/libstdcxx/v6/printers.py
/usr/share/gdb/auto-load/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.0/32/libstdc++.so.6.0.17-gdb.py
/usr/share/gdb/auto-load/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.0/libstdc++.so.6.0.17-gdb.py
--- End code ---
I have these for all three supported compiles I have (4.5, 4.6 and 4.7).
PureBlackSin:
Right first bit had an output of:
--- Code: ---james@ubuntu:~/python$ ldd /usr/bin/gdb | grep pyt
libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0x00007fd03bcfc000)
--- End code ---
I have the first three files in a couple of folders which I downloaded, they are not in those directories, I don't have those directories.
The last two, the closest I can get to that path is:
--- Code: ---/usr/share/gdb/gdb/auto-load
--- End code ---
This directory terminates, has two .gdb files in it neither of which look like yours.
I tried to run make in the checked out folder where the first three files were, make didn't work. I did this to see if it would generate any files...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version