gdb
* valprint.c (val_print_string): Pass 'encoding' to LA_PRINT_STRING. gdb/testsuite * gdb.python/py-prettyprint.exp (run_lang_tests): Test encoding argument to lazy_string. * gdb.python/py-prettyprint.py (pp_ls_encoding): New global. (pp_ls.to_string): Use it. * gdb.python/py-prettyprint.c (main): Move declarations to top. Add "estring2" local.
This commit is contained in:
parent
ca346ede18
commit
3a772aa44d
6 changed files with 31 additions and 4 deletions
|
@ -213,6 +213,9 @@ main ()
|
|||
/* Clearing by being `static' could invoke an other GDB C++ bug. */
|
||||
struct nullstr nullstr;
|
||||
nostring_type nstype;
|
||||
struct ns ns;
|
||||
struct lazystring estring, estring2;
|
||||
|
||||
nstype.elements = narray;
|
||||
nstype.len = 0;
|
||||
|
||||
|
@ -225,13 +228,14 @@ main ()
|
|||
init_s (&arraystruct.x[0], 23);
|
||||
init_s (&arraystruct.x[1], 24);
|
||||
|
||||
struct ns ns;
|
||||
ns.null_str = "embedded\0null\0string";
|
||||
ns.length = 20;
|
||||
|
||||
struct lazystring estring;
|
||||
estring.lazy_str = "embedded x\201\202\203\204" ;
|
||||
|
||||
/* Incomplete UTF-8, but ok Latin-1. */
|
||||
estring2.lazy_str = "embedded x\302";
|
||||
|
||||
#ifdef __cplusplus
|
||||
S cps;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue