Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How to debug a vector
How to debug a vector [message #155287] Wed, 28 September 2005 11:04 Go to next message
Eclipse User
Originally posted by: mendoza.anafocus.com

Hello.
I just can't view the contents of a vector when debugging. I just see
something like this:

{<_Vector_base<int,std::allocator<int> >> = {_M_impl = {<allocator<int>> =
{<new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start =
0x3fd140, _M_finish = 0x3fd258, _M_end_of_storage = 0x3fd340}}, <No data
fields>}

Is this a bug or is it something that I'm missing?.
Thanks
Re: How to debug a vector [message #155388 is a reply to message #155287] Thu, 29 September 2005 13:08 Go to previous messageGo to next message
Eclipse User
Originally posted by: mendoza.anafocus.com

Hello again.
Seen that nobody answered my question, I don't know whether this question
is very simple or very complex.
Can anybody please reply just to say that?
Re: How to debug a vector [message #155413 is a reply to message #155287] Thu, 29 September 2005 13:35 Go to previous messageGo to next message
Eclipse User
Originally posted by: mikhailk.qnx.com

The CDT debugger is using gdb as backend. Probably, gdb can not handle the
vector types c9orrectly.
If you post a simple test case I can give you the details.

"Carlos" <mendoza@anafocus.com> wrote in message
news:6338fc4f048d9bfc087d9f08ae8b861d$1@www.eclipse.org...
> Hello.
> I just can't view the contents of a vector when debugging. I just see
> something like this:
>
> {<_Vector_base<int,std::allocator<int> >> = {_M_impl = {<allocator<int>> =
> {<new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start =
> 0x3fd140, _M_finish = 0x3fd258, _M_end_of_storage = 0x3fd340}}, <No data
> fields>}
>
> Is this a bug or is it something that I'm missing?.
> Thanks
>
Re: How to debug a vector [message #155502 is a reply to message #155413] Fri, 30 September 2005 04:14 Go to previous messageGo to next message
Eclipse User
Originally posted by: mendoza.anafocus.com

Ok. Here you are a very simple test case:

int main()
{
vector<int> OneVector(10);
for(int i=0;i<10;i++)
OneVector.push_back(i);

return 0;
}

If I stop the debugger at "return 0;" and select "OneVector" in the
Variables view, I get:

{<_Vector_base<int,std::allocator<int> >> = {_M_impl = {<allocator<int>> =
{<new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start =
0x3f2760, _M_finish = 0x3f27b0, _M_end_of_storage = 0x3f27b0}}, <No data
fields>}

By the way, I can add watch expressions like "OneVector.at(0)", but I
would like to see the whole vector contents at a glance.

Mikhail Khodjaiants wrote:

> The CDT debugger is using gdb as backend. Probably, gdb can not handle the
> vector types c9orrectly.
> If you post a simple test case I can give you the details.

> "Carlos" <mendoza@anafocus.com> wrote in message
> news:6338fc4f048d9bfc087d9f08ae8b861d$1@www.eclipse.org...
>> Hello.
>> I just can't view the contents of a vector when debugging. I just see
>> something like this:
>>
>> {<_Vector_base<int,std::allocator<int> >> = {_M_impl = {<allocator<int>> =
>> {<new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start =
>> 0x3fd140, _M_finish = 0x3fd258, _M_end_of_storage = 0x3fd340}}, <No data
>> fields>}
>>
>> Is this a bug or is it something that I'm missing?.
>> Thanks
>>
Re: How to debug a vector [message #155526 is a reply to message #155502] Fri, 30 September 2005 16:48 Go to previous messageGo to next message
Eclipse User
Originally posted by: mikhailk.qnx.com

What is your environment? The example works fine for me (CDT 3.0, CygWin,
Windows 2000).

"Carlos" <mendoza@anafocus.com> wrote in message
news:23d00a7e2e8c831c63f37266934e69e9$1@www.eclipse.org...
> Ok. Here you are a very simple test case:
>
> int main()
> {
> vector<int> OneVector(10);
> for(int i=0;i<10;i++)
> OneVector.push_back(i);
>
> return 0;
> }
>
> If I stop the debugger at "return 0;" and select "OneVector" in the
> Variables view, I get:
>
> {<_Vector_base<int,std::allocator<int> >> = {_M_impl = {<allocator<int>> =
> {<new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start =
> 0x3f2760, _M_finish = 0x3f27b0, _M_end_of_storage = 0x3f27b0}}, <No data
> fields>}
>
> By the way, I can add watch expressions like "OneVector.at(0)", but I
> would like to see the whole vector contents at a glance.
>
> Mikhail Khodjaiants wrote:
>
>> The CDT debugger is using gdb as backend. Probably, gdb can not handle
>> the vector types c9orrectly.
>> If you post a simple test case I can give you the details.
>
>> "Carlos" <mendoza@anafocus.com> wrote in message
>> news:6338fc4f048d9bfc087d9f08ae8b861d$1@www.eclipse.org...
>>> Hello.
>>> I just can't view the contents of a vector when debugging. I just see
>>> something like this:
>>>
>>> {<_Vector_base<int,std::allocator<int> >> = {_M_impl = {<allocator<int>>
>>> = {<new_allocator<int>> = {<No data fields>}, <No data fields>},
>>> _M_start = 0x3fd140, _M_finish = 0x3fd258, _M_end_of_storage =
>>> 0x3fd340}}, <No data fields>}
>>>
>>> Is this a bug or is it something that I'm missing?.
>>> Thanks
>>>
>
>
Re: How to debug a vector [message #155653 is a reply to message #155526] Tue, 04 October 2005 08:16 Go to previous messageGo to next message
Eclipse User
Originally posted by: mendoza.anafocus.com

I'm working under Windows XP Pro, CDT 3.0, Cygwin.
Please, could you tell me what do you see in the Variables view?. Maybe
I'm asking to much.


Mikhail Khodjaiants wrote:

> What is your environment? The example works fine for me (CDT 3.0, CygWin,
> Windows 2000).

> "Carlos" <mendoza@anafocus.com> wrote in message
> news:23d00a7e2e8c831c63f37266934e69e9$1@www.eclipse.org...
>> Ok. Here you are a very simple test case:
>>
>> int main()
>> {
>> vector<int> OneVector(10);
>> for(int i=0;i<10;i++)
>> OneVector.push_back(i);
>>
>> return 0;
>> }
>>
>> If I stop the debugger at "return 0;" and select "OneVector" in the
>> Variables view, I get:
>>
>> {<_Vector_base<int,std::allocator<int> >> = {_M_impl = {<allocator<int>> =
>> {<new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start =
>> 0x3f2760, _M_finish = 0x3f27b0, _M_end_of_storage = 0x3f27b0}}, <No data
>> fields>}
>>
>> By the way, I can add watch expressions like "OneVector.at(0)", but I
>> would like to see the whole vector contents at a glance.
>>
>> Mikhail Khodjaiants wrote:
>>
>>> The CDT debugger is using gdb as backend. Probably, gdb can not handle
>>> the vector types c9orrectly.
>>> If you post a simple test case I can give you the details.
>>
>>> "Carlos" <mendoza@anafocus.com> wrote in message
>>> news:6338fc4f048d9bfc087d9f08ae8b861d$1@www.eclipse.org...
>>>> Hello.
>>>> I just can't view the contents of a vector when debugging. I just see
>>>> something like this:
>>>>
>>>> {<_Vector_base<int,std::allocator<int> >> = {_M_impl = {<allocator<int>>
>>>> = {<new_allocator<int>> = {<No data fields>}, <No data fields>},
>>>> _M_start = 0x3fd140, _M_finish = 0x3fd258, _M_end_of_storage =
>>>> 0x3fd340}}, <No data fields>}
>>>>
>>>> Is this a bug or is it something that I'm missing?.
>>>> Thanks
>>>>
>>
>>
Re: How to debug a vector [message #155695 is a reply to message #155653] Tue, 04 October 2005 14:01 Go to previous message
Eclipse User
Originally posted by: mikhailk.qnx.com

I see a similar output in the Detail pane of the Variables view, but the
tree looks fine.

"Carlos" <mendoza@anafocus.com> wrote in message
news:b771088b74562efb89fab384aaede0e0$1@www.eclipse.org...
> I'm working under Windows XP Pro, CDT 3.0, Cygwin.
> Please, could you tell me what do you see in the Variables view?. Maybe
> I'm asking to much.
>
>
> Mikhail Khodjaiants wrote:
>
>> What is your environment? The example works fine for me (CDT 3.0, CygWin,
>> Windows 2000).
>
>> "Carlos" <mendoza@anafocus.com> wrote in message
>> news:23d00a7e2e8c831c63f37266934e69e9$1@www.eclipse.org...
>>> Ok. Here you are a very simple test case:
>>>
>>> int main()
>>> {
>>> vector<int> OneVector(10);
>>> for(int i=0;i<10;i++)
>>> OneVector.push_back(i);
>>>
>>> return 0;
>>> }
>>>
>>> If I stop the debugger at "return 0;" and select "OneVector" in the
>>> Variables view, I get:
>>>
>>> {<_Vector_base<int,std::allocator<int> >> = {_M_impl = {<allocator<int>>
>>> =
>>> {<new_allocator<int>> = {<No data fields>}, <No data fields>}, _M_start
>>> =
>>> 0x3f2760, _M_finish = 0x3f27b0, _M_end_of_storage = 0x3f27b0}}, <No data
>>> fields>}
>>>
>>> By the way, I can add watch expressions like "OneVector.at(0)", but I
>>> would like to see the whole vector contents at a glance.
>>>
>>> Mikhail Khodjaiants wrote:
>>>
>>>> The CDT debugger is using gdb as backend. Probably, gdb can not handle
>>>> the vector types c9orrectly.
>>>> If you post a simple test case I can give you the details.
>>>
>>>> "Carlos" <mendoza@anafocus.com> wrote in message
>>>> news:6338fc4f048d9bfc087d9f08ae8b861d$1@www.eclipse.org...
>>>>> Hello.
>>>>> I just can't view the contents of a vector when debugging. I just see
>>>>> something like this:
>>>>>
>>>>> {<_Vector_base<int,std::allocator<int> >> = {_M_impl =
>>>>> {<allocator<int>>
>>>>> = {<new_allocator<int>> = {<No data fields>}, <No data fields>},
>>>>> _M_start = 0x3fd140, _M_finish = 0x3fd258, _M_end_of_storage =
>>>>> 0x3fd340}}, <No data fields>}
>>>>>
>>>>> Is this a bug or is it something that I'm missing?.
>>>>> Thanks
>>>>>
>>>
>>>
>
>


  • Attachment: vector.jpg
    (Size: 142.86KB, Downloaded 282 times)
Previous Topic:GNU Autotool-Based Projects: Best Practices?
Next Topic:undefined reference to "somefunction"
Goto Forum:
  


Current Time: Tue Jul 22 09:34:50 EDT 2014

Powered by FUDForum. Page generated in 0.04620 seconds