aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2015-05-26 16:13:04 -0700
committerDoug Evans <dje@google.com>2015-05-26 16:13:04 -0700
commit4ea6efe9365f8a87723fe01a2dd8ddf5cdec1498 (patch)
tree4b7f62a729813fe82e914f2144df6815ddecb4aa /gdb/python
parentb93fd21dccc2cfa9a335ddba7435a341b49330ae (diff)
downloadgdb-4ea6efe9365f8a87723fe01a2dd8ddf5cdec1498.zip
gdb-4ea6efe9365f8a87723fe01a2dd8ddf5cdec1498.tar.gz
gdb-4ea6efe9365f8a87723fe01a2dd8ddf5cdec1498.tar.bz2
PR python/18438
gdb/ChangeLog: * python/py-lazy-string.c (stpy_convert_to_value): Use gdbpy_gdb_memory_error not PyExc_MemoryError. (gdbpy_create_lazy_string_object): Ditto. gdb/testsuite/ChangeLog: * gdb.python/py-lazy-string.c: New file. * gdb.python/py-lazy-string.exp: New file. * gdb.python/py-prettyprint.c (lazystring) <len>: New member. (main): Update. Add estring3. * gdb.python/py-prettyprint.exp: Add tests for strings at address 0. * gdb.python/py-prettyprint.py (pp_ls): Handle length.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-lazy-string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/python/py-lazy-string.c b/gdb/python/py-lazy-string.c
index c9774ab..97bc9cb 100644
--- a/gdb/python/py-lazy-string.c
+++ b/gdb/python/py-lazy-string.c
@@ -99,7 +99,7 @@ stpy_convert_to_value (PyObject *self, PyObject *args)
if (self_string->address == 0)
{
- PyErr_SetString (PyExc_MemoryError,
+ PyErr_SetString (gdbpy_gdb_memory_error,
_("Cannot create a value from NULL."));
return NULL;
}
@@ -133,7 +133,7 @@ gdbpy_create_lazy_string_object (CORE_ADDR address, long length,
if (address == 0 && length != 0)
{
- PyErr_SetString (PyExc_MemoryError,
+ PyErr_SetString (gdbpy_gdb_memory_error,
_("Cannot create a lazy string with address 0x0, " \
"and a non-zero length."));
return NULL;