public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-tromey-python: minor sync with master to remove spurious changes
@ 2011-01-07 14:47 tromey
0 siblings, 0 replies; only message in thread
From: tromey @ 2011-01-07 14:47 UTC (permalink / raw)
To: archer-commits
The branch, archer-tromey-python has been updated
via 189a4e65863195f3c65b7dfe825bc3375871169b (commit)
from c9185e91a51fbb0fe2588cdd298a1854adcdf8aa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 189a4e65863195f3c65b7dfe825bc3375871169b
Author: Tom Tromey <tromey@redhat.com>
Date: Fri Jan 7 07:46:09 2011 -0700
minor sync with master to remove spurious changes
-----------------------------------------------------------------------
Summary of changes:
gdb/python/py-cmd.c | 3 ++-
gdb/python/py-prettyprint.c | 15 +++++++++++----
gdb/python/python-internal.h | 19 ++-----------------
3 files changed, 15 insertions(+), 22 deletions(-)
First 500 lines of diff:
diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c
index 6a7a20b..3de3af2 100644
--- a/gdb/python/py-cmd.c
+++ b/gdb/python/py-cmd.c
@@ -49,7 +49,8 @@ static struct cmdpy_completer completers[] =
#define N_COMPLETERS (sizeof (completers) / sizeof (completers[0]))
-/* A gdb command. */
+/* A gdb command. For the time being only ordinary commands (not
+ set/show commands) are allowed. */
struct cmdpy_object
{
PyObject_HEAD
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c
index 85f3940..7532aa5 100644
--- a/gdb/python/py-prettyprint.c
+++ b/gdb/python/py-prettyprint.c
@@ -227,10 +227,10 @@ pretty_print_one_value (PyObject *printer, struct value **out_value)
&& result != Py_None)
{
*out_value = convert_value_from_python (result);
- if (PyErr_Occurred ())
- *out_value = NULL;
- Py_DECREF (result);
- result = NULL;
+ if (PyErr_Occurred ())
+ *out_value = NULL;
+ Py_DECREF (result);
+ result = NULL;
}
}
}
@@ -763,7 +763,14 @@ gdbpy_get_varobj_pretty_printer (struct value *value)
{
PyObject *val_obj;
PyObject *pretty_printer = NULL;
+ volatile struct gdb_exception except;
+ TRY_CATCH (except, RETURN_MASK_ALL)
+ {
+ value = value_copy (value);
+ }
+ GDB_PY_HANDLE_EXCEPTION (except);
+
val_obj = value_to_value_object (value);
if (! val_obj)
return NULL;
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 0040403..80d0763 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -88,11 +88,10 @@ struct language_defn;
struct program_space;
extern PyObject *gdb_module;
-extern PyTypeObject block_object_type;
extern PyTypeObject value_object_type;
+extern PyTypeObject block_object_type;
extern PyTypeObject symbol_object_type;
-/* Used in python-inferior.c. */
typedef struct
{
PyObject_HEAD
@@ -134,10 +133,6 @@ PyObject *block_to_block_object (struct block *block, struct objfile *objfile);
PyObject *value_to_value_object (struct value *v);
PyObject *type_to_type_object (struct type *);
PyObject *frame_info_to_frame_object (struct frame_info *frame);
-PyObject *frame_info_to_frame_object (struct frame_info *frame);
-thread_object *create_thread_object (struct thread_info *tp);
-thread_object *find_thread_object (ptid_t ptid);
-PyObject *find_inferior_object (int pid);
PyObject *pspace_to_pspace_object (struct program_space *);
PyObject *pspy_get_printers (PyObject *, void *);
@@ -158,9 +153,7 @@ struct symtab *symtab_object_to_symtab (PyObject *obj);
struct symtab_and_line *sal_object_to_symtab_and_line (PyObject *obj);
void gdbpy_initialize_auto_load (void);
-
void gdbpy_initialize_values (void);
-void gdbpy_initialize_breakpoints (void);
void gdbpy_initialize_frames (void);
void gdbpy_initialize_symtabs (void);
void gdbpy_initialize_commands (void);
@@ -168,7 +161,6 @@ void gdbpy_initialize_symbols (void);
void gdbpy_initialize_symtabs (void);
void gdbpy_initialize_blocks (void);
void gdbpy_initialize_types (void);
-void gdbpy_initialize_blocks (void);
void gdbpy_initialize_functions (void);
void gdbpy_initialize_pspace (void);
void gdbpy_initialize_objfile (void);
@@ -186,12 +178,6 @@ struct cleanup *ensure_python_env (struct gdbarch *gdbarch,
extern struct gdbarch *python_gdbarch;
extern const struct language_defn *python_language;
-char *gdbpy_parse_command_name (char *text,
- struct cmd_list_element ***base_list,
- struct cmd_list_element **start_list);
-
-PyObject *gdbpy_parameter_value (enum var_types, void *);
-
/* Use this after a TRY_EXCEPT to throw the appropriate Python
exception. */
#define GDB_PY_HANDLE_EXCEPTION(Exception) \
@@ -239,14 +225,13 @@ PyObject *apply_varobj_pretty_printer (PyObject *print_obj,
struct value **replacement,
struct ui_file *stream);
PyObject *gdbpy_get_varobj_pretty_printer (struct value *value);
-PyObject *gdbpy_instantiate_printer (PyObject *cons, PyObject *value);
char *gdbpy_get_display_hint (PyObject *printer);
PyObject *gdbpy_default_visualizer (PyObject *self, PyObject *args);
+extern PyObject *gdbpy_doc_cst;
extern PyObject *gdbpy_children_cst;
extern PyObject *gdbpy_to_string_cst;
extern PyObject *gdbpy_display_hint_cst;
-extern PyObject *gdbpy_doc_cst;
extern PyObject *gdbpy_enabled_cst;
/* Exception types. */
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-07 14:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-07 14:47 [SCM] archer-tromey-python: minor sync with master to remove spurious changes tromey
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).