Bug 12461 - gdb unable to print char* values in Solaris-10/i386
Summary: gdb unable to print char* values in Solaris-10/i386
Status: RESOLVED OBSOLETE
Alias: None
Product: gdb
Classification: Unclassified
Component: c++ (show other bugs)
Version: 7.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-03 21:44 UTC by yuri
Modified: 2022-12-23 19:30 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yuri 2011-02-03 21:44:34 UTC
I can't print in gdb the value of std::string: normally in linux it prints ok, but on Solaris I see this:

> p var._M_dataplus._M_p
> $14 = 0x9e7120c <error reading variable>

But when I try to read the first part of it as pointer it prints value corresponding to characters:

> p *(int**)var._M_dataplus._M_p
> $16 = (int *) 0x74706f2f
Comment 1 yuri 2011-02-03 21:45:48 UTC
I need to add that I compiled gdb from sources -- not from package.
Also the easiest way to run Solaris 10 is to download Solaris VirtualBox appliance from oracle.com.
Comment 2 Tom Tromey 2011-08-19 15:49:14 UTC
Could you possibly try gdb 7.3, or CVS gdb?
Some changes were made to iconv configury that might
possibly affect this.
Comment 3 Tom Tromey 2022-12-23 19:30:18 UTC
No response in 10 years.