summaryrefslogtreecommitdiff
path: root/gdb/language.h
diff options
context:
space:
mode:
authorpmuldoon <pmuldoon>2009-07-10 10:35:15 +0000
committerpmuldoon <pmuldoon>2009-07-10 10:35:15 +0000
commit96df3fafc693a90fb7fc0d530422ce1eec2f2c16 (patch)
tree492c4acec1fb79b0ad3144ca73430cd407064400 /gdb/language.h
parent54eacc51ed984623084db6f256b6679e6c172273 (diff)
downloadgdb-96df3fafc693a90fb7fc0d530422ce1eec2f2c16.tar.gz
2009-07-10 Phil Muldoon <pmuldoon@redhat.com>
* python/python-internal.h (apply_varobj_pretty_printer): Update definition. (python_string_to_target_python_string): Add definition. * python/python-utils.c (unicode_to_encoded_python_string) (unicode_to_target_python_string) (python_string_to_target_python_string): New Functions. * python/python-prettyprint.c (pretty_print_one_value): Likewise. (print_string_repr): Refactor to logic to account for PyObject returned strings. (apply_varobj_pretty_printer): Likewise. * python/python-value.c (valpy_string): Parse length keyword. Use length keyword in LA_GET_STRING. * varobj.c (value_get_print_value): Refactor logic to account for PyObject returned strings. * c-lang.c (c_get_string): If the length parameter is specified, use that. Return value in characters. Update comments. * language.h: Update c_get_string prototype comments. 2009-07-10 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Values From Inferior): Add length parameter description. 2009-07-10 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/python-prettyprint.c: Add counted null string structure. * gdb.python/python-prettyprint.exp: Print null string. Test for embedded nulls. * gdb.python/python-prettyprint.py (pp_ns): New Function. * gdb.python/python-value.exp (test_value_in_inferior): Add variable length string fetch tests. * gdb.python/python-value.c (main): Add strings for string fetch tests.
Diffstat (limited to 'gdb/language.h')
-rw-r--r--gdb/language.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/language.h b/gdb/language.h
index e5f80abfd71..ba37faa3379 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -284,10 +284,15 @@ struct language_defn
int (*la_pass_by_reference) (struct type *type);
/* Obtain a string from the inferior, storing it in a newly allocated
- buffer in BUFFER, which should be freed by the caller. LENGTH will
- hold the size in bytes of the string (only actual characters, excluding
- an eventual terminating null character). CHARSET will hold the encoding
- used in the string. */
+ buffer in BUFFER, which should be freed by the caller. If the
+ in- and out-parameter *LENGTH is specified at -1, the string is
+ read until a null character of the appropriate width is found -
+ otherwise the string is read to the length of characters specified.
+ On completion, *LENGTH will hold the size of the string in characters.
+ If a *LENGTH of -1 was specified it will count only actual
+ characters, excluding any eventual terminating null character.
+ Otherwise *LENGTH will include all characters - including any nulls.
+ CHARSET will hold the encoding used in the string. */
void (*la_get_string) (struct value *value, gdb_byte **buffer, int *length,
const char **charset);