diff options
author | Phil Muldoon <pmuldoon@redhat.com> | 2009-07-10 10:35:17 +0000 |
---|---|---|
committer | Phil Muldoon <pmuldoon@redhat.com> | 2009-07-10 10:35:17 +0000 |
commit | fbb8f2990ccfa180274ab4a578818fe247823540 (patch) | |
tree | 3cadb912a530bab6a1332d62cdc8deafa7375bde /gdb/python/python-internal.h | |
parent | 041de40dc8e221039d7a983d489c6dcacd446e36 (diff) | |
download | gdb-fbb8f2990ccfa180274ab4a578818fe247823540.zip gdb-fbb8f2990ccfa180274ab4a578818fe247823540.tar.gz gdb-fbb8f2990ccfa180274ab4a578818fe247823540.tar.bz2 |
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/python/python-internal.h')
-rw-r--r-- | gdb/python/python-internal.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index 39d37e1..67a78af 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -113,14 +113,15 @@ void gdbpy_print_stack (void); PyObject *python_string_to_unicode (PyObject *obj); char *unicode_to_target_string (PyObject *unicode_str); char *python_string_to_target_string (PyObject *obj); +PyObject *python_string_to_target_python_string (PyObject *obj); char *python_string_to_host_string (PyObject *obj); PyObject *target_string_to_unicode (const gdb_byte *str, int length); int gdbpy_is_string (PyObject *obj); /* Note that these are declared here, and not in python.h with the other pretty-printer functions, because they refer to PyObject. */ -char *apply_varobj_pretty_printer (PyObject *print_obj, - struct value **replacement); +PyObject *apply_varobj_pretty_printer (PyObject *print_obj, + struct value **replacement); PyObject *gdbpy_get_varobj_pretty_printer (struct value *value); char *gdbpy_get_display_hint (PyObject *printer); PyObject *gdbpy_default_visualizer (PyObject *self, PyObject *args); |