Viewing Variable Values Using CDT [message #181978] |
Tue, 09 January 2007 11:18  |
Eclipse User |
|
|
|
Originally posted by: manofthedesert.hotmail.com
Hello,
I am new to eclipse, and I love the platform! I'm C++ developer
exclusively. In many of our applications, we use the ICU4C UnicodeString
library to hold textual information, and I'm trying to find a way to view
the contents of these objects in human readable format.
To date, I have been unable to do so. When I examine the contents of the
internal buffer, (short unsigned int[]) of course all I see is the first
element of the array, displayed numerically. I have tried entering a watch
expression and casting it to a wchar_t and various other things, to no
avail.
I recently moved over from MS Windows development, and the Visual Studio
IDE has no problem with this. Click on the variable and display it, in
readable format. I I would like to do the same in Eclipse - this is
actually a deal-breaker for me. I can't concentrate on understanding what
the code is doing when I constantly have to fight the IDE trying to
display things.
My code is compiled with gcc 4.1, and has symbols. It seems to know how
the UnicodeString type is constructed, but just won't let me easily see
what's in there.
I have searched the net for hours, and I can find nothing that addresses
this. I figure it's either so obvious that everyone takes it for granted,
or there is no way to do it. I can't believe other developers don't have a
need to perform this rudimentary debugging task.
Can you help an Eclipse newbie not have to load Windows again?
Thanks
Robert
|
|
|
|
|
Re: Viewing Variable Values Using CDT [message #182195 is a reply to message #181978] |
Fri, 12 January 2007 14:26   |
Eclipse User |
|
|
|
Originally posted by: cjashfor.linux.ibm.com
Robert Reineri wrote:
> Hello,
>
> I am new to eclipse, and I love the platform! I'm C++ developer
> exclusively. In many of our applications, we use the ICU4C UnicodeString
> library to hold textual information, and I'm trying to find a way to
> view the contents of these objects in human readable format.
>
> To date, I have been unable to do so. When I examine the contents of the
> internal buffer, (short unsigned int[]) of course all I see is the first
> element of the array, displayed numerically. I have tried entering a
> watch expression and casting it to a wchar_t and various other things,
> to no avail.
>
> I recently moved over from MS Windows development, and the Visual Studio
> IDE has no problem with this. Click on the variable and display it, in
> readable format. I I would like to do the same in Eclipse - this is
> actually a deal-breaker for me. I can't concentrate on understanding
> what the code is doing when I constantly have to fight the IDE trying to
> display things.
>
> My code is compiled with gcc 4.1, and has symbols. It seems to know how
> the UnicodeString type is constructed, but just won't let me easily see
> what's in there.
>
> I have searched the net for hours, and I can find nothing that addresses
> this. I figure it's either so obvious that everyone takes it for
> granted, or there is no way to do it. I can't believe other developers
> don't have a need to perform this rudimentary debugging task.
>
> Can you help an Eclipse newbie not have to load Windows again?
>
> Thanks
>
> Robert
>
I think what you'd like to be able to do is use the Memory monitor
window (Window -> Show View -> Other... -> Debug -> Memory)
Once that window comes up, right click in the left window pane of the
Memory view and select "Add Memory Monitor". In that dialog, enter the
expression you want to look at (the variable name in this case). Then
on the right hand side, there's a green "+". Click on that and then
select ASCII.
Unfortunately, I believe this is 7- or 8-bit ASCII, and probably won't
display your wchar_t's correctly. It seems Eclipse may be missing the
rendering that you need.
If that doesn't work, and I suspect it won't, you should post this to
the cdt-dev@eclipse.org mailing list.
- Corey
--
Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR
503-578-3507
cjashfor@us.ibm.com
|
|
|
|
Powered by
FUDForum. Page generated in 0.13017 seconds