This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Printing of strings with special characters


>>>>> "Anton" == Anton Kunze <ak@technosis.de> writes:

Anton> i'am using gdb 7.0.1 with python and pretty printing on suse linux. If I
Anton> try to print string with german special characters I get only strings as
Anton> '\nnn'.

Anton> My gdbinit file contains following:
Anton> set charset ISO-8859-1
Anton> set target-wide-charset ISO-8859-1

This is almost certainly wrong.  You probably want `set
target-wide-charset UTF-32' -- which is the default on Linux.  At least,
that will be what you want if your code is using wchar_t.

Also, I recommend against using "set charset"; use target-charset
instead.  'set charset' sets the host charset in addition to the target
charset, but on systems with a decent locale implementation, you
basically will always want to use the result reported by the locale.

Anton> sys.path.insert(0, '/home/anton/projects/debug/printers')

Without the source to this we can't be completely sure about the
problem.

Anton> Within my debug session I use the following commonds on gdb console:

Anton> set print sevenbit-strings off
Anton> print qsHtml
Anton> $4 = "h\366h\366h\366"

What type is a qsHtml?  Specifically, what is the underlying character
type it uses?

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]