aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-10-15 18:54:13 +0000
committerTom Tromey <tromey@redhat.com>2010-10-15 18:54:13 +0000
commit09ca9e2e34b93e8e12d6a0a4bad469b2b4c2f415 (patch)
tree27415ab68602f61368e4773b277271eda76fb144 /gdb/valprint.c
parent92163a10dcb34785a2fc74a05c3e890fbe700731 (diff)
downloadgdb-09ca9e2e34b93e8e12d6a0a4bad469b2b4c2f415.zip
gdb-09ca9e2e34b93e8e12d6a0a4bad469b2b4c2f415.tar.gz
gdb-09ca9e2e34b93e8e12d6a0a4bad469b2b4c2f415.tar.bz2
PR python/11948:
* varobj.c (value_get_print_value): Use val_print_string to print lazy strings. * python/py-prettyprint.c (print_string_repr): Use val_print_string to print lazy strings. Fix cleanup logic. (print_children): Likewise. * python/python-internal.h (gdbpy_extract_lazy_string): Update. * python/py-lazy-string.c (gdbpy_extract_lazy_string): Rewrite. Change return type to 'void', add 'addr' argument. * value.h (val_print_string): Update. * valprint.c (val_print_string): Add 'encoding' argument. * printcmd.c (print_formatted): Update. * p-valprint.c (pascal_val_print): Update. * m2-valprint.c (print_unpacked_pointer): Update. (m2_print_array_contents): Likewise. * jv-valprint.c (java_value_print): Update. * f-valprint.c (f_val_print): Update. * c-valprint.c (c_val_print): Update. * auxv.c (fprint_target_auxv): Update.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index ad6268e..4b3789e 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -1414,10 +1414,13 @@ read_string (CORE_ADDR addr, int len, int width, unsigned int fetchlimit,
characters, of WIDTH bytes a piece, to STREAM. If LEN is -1, printing
stops at the first null byte, otherwise printing proceeds (including null
bytes) until either print_max or LEN characters have been printed,
- whichever is smaller. */
+ whichever is smaller. ENCODING is the name of the string's
+ encoding. It can be NULL, in which case the target encoding is
+ assumed. */
int
-val_print_string (struct type *elttype, CORE_ADDR addr, int len,
+val_print_string (struct type *elttype, const char *encoding,
+ CORE_ADDR addr, int len,
struct ui_file *stream,
const struct value_print_options *options)
{