User forums > Using Code::Blocks

see content of a vector in debugging

<< < (17/26) > >>

MortenMacFly:

--- Quote from: oBFusCATed on June 15, 2009, 12:39:14 pm ---Don't worry about, that the source command will be executed by the debugger plugin internally or we can add a list with debugger files to be sourced...

--- End quote ---
So...I tried again and... failed. Let me put the output here (this is what happens if I hover over "vv" of the sample):
> whatis vv
type = vector<std::vector<int, std::allocator<int> >,std::allocator<std::vector<int, std::allocator<int> > > >
>>>>>>cb_gdb:
> output &vv
(vector<std::vector<int, std::allocator<int> >,std::allocator<std::vector<int, std::allocator<int> > > > *) 0x22ff10>>>>>>cb_gdb:
> pvector vv
elem[0]: $1008 = {
  <_Vector_base<int,std::allocator<int> >> = {
    _M_impl = {
      <allocator<int>> = {
        <new_allocator<int>> = {<No data fields>}, <No data fields>},
      members of _Vector_base<int,std::allocator<int> >::_Vector_impl:
      _M_start = 0x3f4210,
      _M_finish = 0x3f4214,
      _M_end_of_storage = 0x3f4214
    }
  }, <No data fields>}
elem[1]: $1009 = {
  <_Vector_base<int,std::allocator<int> >> = {
    _M_impl = {
      <allocator<int>> = {
        <new_allocator<int>> = {<No data fields>}, <No data fields>},
      members of _Vector_base<int,std::allocator<int> >::_Vector_impl:
      _M_start = 0x3f4230,
      _M_finish = 0x3f4238,
      _M_end_of_storage = 0x3f4238
    }
  }, <No data fields>}
elem[2]: $1010 = {
  <_Vector_base<int,std::allocator<int> >> = {
    _M_impl = {
      <allocator<int>> = {
        <new_allocator<int>> = {<No data fields>}, <No data fields>},
      members of _Vector_base<int,std::allocator<int> >::_Vector_impl:
      _M_start = 0x3f42e8,
      _M_finish = 0x3f42f4,
      _M_end_of_storage = 0x3f42f4
    }
  }, <No data fields>}
Vector size = 3
Vector capacity = 4
Element type = vector<int,std::allocator<int> > *
>>>>>>cb_gdb:
Script exception: SquirrelFunction<> call failed

I did use the script provided here:
http://forums.codeblocks.org/index.php/topic,10667.msg73171.html#msg73171
And setup the bindings correctly, sourced the gdb script correctly, verified pvector is working and really use wxString_ToLong (which is also present - I checked that, too).

I don't exactly get what function call failed though...

Funnily, in the "watches" window I only get the "old" output...?!

ollydbg:

--- Quote from: killerbot on June 15, 2009, 01:09:52 pm ---

QUESTION : does anyone see a negative side effect of issuing a macro replacement on those debugger init commands ?

--- End quote ---

Nice work, I'm testing it now! I'll give a report then.

Edit:
Works quite well! No side effect :D


@oBFusCATed
This is what I get to view "vv".

oBFusCATed:
Morten: check you script console and show the output here

ollydgb: this is a known bug, I've written about it before and it was decided that we will have the simple version (vector<int>) working first and then we'll extend it.

killerbot:
my "Manager::Get()->GetMacrosManager()->ReplaceMacros(init);"/ "source $DATAPATH/stl-views-1.0.3.gdb" addition works.

However the main question remains to the other developers : does anyone expect side effects.

mandrav:

--- Quote from: killerbot on June 15, 2009, 02:49:55 pm ---However the main question remains to the other developers : does anyone expect side effects.

--- End quote ---

It mostly depends on whether gdb init commands may have valid $something commands that should NOT be expanded by C::B...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version