mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-03 13:23:00 +08:00
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:
@ -139,6 +139,8 @@ class pp_ns:
|
||||
def display_hint (self):
|
||||
return 'string'
|
||||
|
||||
pp_ls_encoding = None
|
||||
|
||||
class pp_ls:
|
||||
"Print a std::basic_string of some kind"
|
||||
|
||||
@ -146,7 +148,10 @@ class pp_ls:
|
||||
self.val = val
|
||||
|
||||
def to_string(self):
|
||||
return self.val['lazy_str'].lazy_string()
|
||||
if pp_ls_encoding is not None:
|
||||
return self.val['lazy_str'].lazy_string(encoding = pp_ls_encoding)
|
||||
else:
|
||||
return self.val['lazy_str'].lazy_string()
|
||||
|
||||
def display_hint (self):
|
||||
return 'string'
|
||||
|
Reference in New Issue
Block a user