User forums > Nightly builds
The 11 February 2012 build (7790) DEBUGGER BRANCH version is out.
scarphin:
I would if I could but I don't think I can handle it. I hope I will someday. ;)
p2rkw:
Hi,
I just find out that c::b watch scripts doesn't recognize typedefs. It's because 'whatis' gives alias name.
Second 'whatis' is necessary to obtain real type. Part of the log:
--- Code: ---[debug]> whatis vi
[debug]type = std::vector<int, std::allocator<int> >
[debug]>>>>>>cb_gdb:
[debug]> output &vi
[debug](std::vector<int, std::allocator<int> > *) 0x22fea8>>>>>>cb_gdb:
[debug]> pvector vi
[debug]elem[0]: $7 = 4
[debug]elem[1]: $8 = 56
[debug]elem[2]: $9 = 36
[debug]elem[3]: $10 = 843
[debug]elem[4]: $11 = 265
[debug]elem[5]: $12 = 62
[debug]Vector size = 6
[debug]Vector capacity = 8
[debug]Element type = int
[debug]>>>>>>cb_gdb:
[debug]> whatis vi2
[debug]type = IntVector
[debug]>>>>>>cb_gdb:
[debug]> output &vi2
[debug](IntVector *) 0x22fe9c>>>>>>cb_gdb:
[debug]> output vi2
[debug]{
[debug] <std::_Vector_base<int, std::allocator<int> >> = {
[debug] _M_impl = {
[debug] <std::allocator<int>> = {
[debug] <__gnu_cxx::new_allocator<int>> = {<No data fields>}, <No data fields>},
[debug] members of std::_Vector_base<int, std::allocator<int> >::_Vector_impl:
[debug] _M_start = 0x3e27e8,
[debug] _M_finish = 0x3e2800,
[debug] _M_end_of_storage = 0x3e2808
[debug] }
[debug] }, <No data fields>}>>>>>>cb_gdb:
--- End code ---
And what gdb says about IntVector:
--- Code: ---> whatis IntVector
[debug]> whatis IntVector
[debug]type = std::vector<int, std::allocator<int> >
[debug]>>>>>>cb_gdb:
type = std::vector<int, std::allocator<int> >
--- End code ---
What u think about sending second 'whatis' when adding watch?
Currently using 11 February 2012 build (7790) DEBUGGER BRANCH version.
ollydbg:
c::b watch scripts is quite limited, and I suggest you use the python pretty printer. See this as a reference if you use mingw. http://code.google.com/p/qp-gcc/wiki/GDB
p2rkw:
nice stuff, printer works very well, but there is another problem:
After "python" command gdb doesn't recognize "end" command, so there's nothing i can do (gdb just hangs) and must terminate gdb via process explorer.
Thanks for help.
ollydbg:
--- Quote from: p2rkw on February 24, 2012, 02:42:41 am ---ok, got it, printer works very well, but there is another problem:
After "python" command gdb doesn't recognize "end" command
--- End quote ---
I can confirm that enter some command like:
--- Code: ---python
print 3
end
--- End code ---
But it looks like the "end" command does not recognized by gdb. maybe, the "end" command does not send correctly to gdb. so I can't run any command after that.
I just tested gdb under command line, and it works fine, "end" command can successfully end the “python" session, so it looks like something should be fixed in debugger plugin's source. :)
BTW: You don't need to manually run some python script in the command line input in the c::b, you just load the pretty printer when you start debugging, and you should disable the build in watch script in the debugger plugin's option dialog.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version