exp/1998: print command should print wchar_t strings

h.eichmann@gmx.de h.eichmann@gmx.de
Thu Sep 1 17:28:00 GMT 2005

>Number:         1998
>Category:       exp
>Synopsis:       print command should print wchar_t strings
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 25 17:48:04 UTC 2005
>Originator:     Heiner Eichmann
>Release:        GNU gdb 6.1.1 [FreeBSD]
FreeBSD 5.4
If the following program

int main(int argc, char *argv[ ])
	wchar_t * t = L"test";
	char * t2 = "test";

is debugged, the contents of variable t can not be shown:

(gdb) break main
Breakpoint 1 at 0x804fb19: file main.cpp, line 22.
(gdb) run
Starting program: /usr/home/root/develop/st_demo/src/st_demo
[Switching to Thread 1 (LWP 100103)]

Breakpoint 1, main (argc=1, argv=0xbfbfeaf0) at main.cpp:22
22              wchar_t * t = L"test";
(gdb) next
23              char * t2 = "test";
(gdb) next
24              run_tests();
(gdb) print t2
$1 = 0x808b228 "test"
(gdb) print t
$2 = (wchar_t *) 0x808b214

At least all ASCII characters of the wchar_t string should be shown.




More information about the Gdb-prs mailing list