public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-pmuldoon-pretty-printers-lookup: Delete get_type. Delete value argument in apply_varobj_pretty_printer. Fix redundant if check. Print stacktrace on error on apply_val_pretty_print.
@ 2009-02-24 10:47 pmuldoon
0 siblings, 0 replies; only message in thread
From: pmuldoon @ 2009-02-24 10:47 UTC (permalink / raw)
To: archer-commits
The branch, archer-pmuldoon-pretty-printers-lookup has been updated
via cb51cacb5792ad694bff94e43bcadb004f71e7c8 (commit)
from 219a4656534db9037967f36e4fd3c2eebed502b7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit cb51cacb5792ad694bff94e43bcadb004f71e7c8
Author: Phil Muldoon <pmuldoon@redhat.com>
Date: Tue Feb 24 10:46:22 2009 +0000
Delete get_type. Delete value argument in apply_varobj_pretty_printer. Fix redundant if check. Print stacktrace on error on apply_val_pretty_print.
-----------------------------------------------------------------------
Summary of changes:
gdb/python/python-internal.h | 2 +-
gdb/python/python.c | 29 +++++------------------------
gdb/varobj.c | 2 +-
3 files changed, 7 insertions(+), 26 deletions(-)
First 500 lines of diff:
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index c370af1..12422af 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -161,7 +161,7 @@ int gdbpy_is_value_object (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 *value,
+char *apply_varobj_pretty_printer (PyObject *print_obj,
struct value **replacement);
PyObject *gdbpy_get_varobj_pretty_printer (struct value *value);
PyObject *gdbpy_instantiate_printer (PyObject *cons, PyObject *value);
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 20b09ec..4d104c2 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1055,27 +1055,6 @@ gdbpy_objfiles (PyObject *unused1, PyObject *unused2)
\f
-/* Return a string representing TYPE. */
-static char *
-get_type (struct type *type)
-{
- struct cleanup *old_chain;
- struct ui_file *stb;
- char *thetype;
- long length;
-
- stb = mem_fileopen ();
- old_chain = make_cleanup_ui_file_delete (stb);
-
- CHECK_TYPEDEF (type);
-
- type_print (type, "", stb, -1);
-
- thetype = ui_file_xstrdup (stb, &length);
- do_cleanups (old_chain);
- return thetype;
-}
-
/* Helper function for find_pretty_printer which iterates over a
list, calls each function and inspects output. */
static PyObject *
@@ -1101,7 +1080,7 @@ search_pp_list (PyObject *list, PyObject *value)
else if (printer != Py_None)
return printer;
- Py_DECREF(Py_None);
+ Py_DECREF (printer);
}
Py_RETURN_NONE;
@@ -1136,7 +1115,7 @@ find_pretty_printer (PyObject *value)
return NULL;
}
- if (function && function != Py_None)
+ if (function != Py_None)
goto done;
/* In this loop, if function is not an instantiation of a
@@ -1563,6 +1542,8 @@ apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr,
done:
+ if (PyErr_Occurred ())
+ gdbpy_print_stack ();
do_cleanups (cleanups);
return result;
}
@@ -1576,7 +1557,7 @@ apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr,
value, and this function returns NULL. On error, *REPLACEMENT is
set to NULL and this function also returns NULL. */
char *
-apply_varobj_pretty_printer (PyObject *printer_obj, struct value *value,
+apply_varobj_pretty_printer (PyObject *printer_obj,
struct value **replacement)
{
char *result;
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 150d8f8..8b32c59 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -2274,7 +2274,7 @@ value_get_print_value (struct value *value, enum varobj_display_formats format,
xfree (hint);
}
- thevalue = apply_varobj_pretty_printer (value_formatter, value,
+ thevalue = apply_varobj_pretty_printer (value_formatter,
&replacement);
if (thevalue && !string_print)
{
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-24 10:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-24 10:47 [SCM] archer-pmuldoon-pretty-printers-lookup: Delete get_type. Delete value argument in apply_varobj_pretty_printer. Fix redundant if check. Print stacktrace on error on apply_val_pretty_print pmuldoon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).