From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16195 invoked by alias); 3 Mar 2009 21:45:29 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 16135 invoked by uid 9674); 3 Mar 2009 21:45:29 -0000 Date: Tue, 03 Mar 2009 21:45:00 -0000 Message-ID: <20090303214529.16120.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer: Merge commit 'origin/archer-jankratochvil-python' into archer X-Git-Refname: refs/heads/archer X-Git-Reftype: branch X-Git-Oldrev: 01fcb90a5cfae1933dd18268f086ba150244d0d4 X-Git-Newrev: fd3ac4e44355bf7ebfd9e2719e67c1b888b87070 X-SW-Source: 2009-q1/txt/msg00241.txt.bz2 List-Id: The branch, archer has been updated via fd3ac4e44355bf7ebfd9e2719e67c1b888b87070 (commit) via f3ec9b4195a8b4b4de2c513841f469553d9f3b38 (commit) via e906c13419e917c520586e8ae04a396bc3018395 (commit) via 75c9f663904378be08bae1172f61204b2c0ec5ca (commit) via 258d034209fdf76c6d9c1508fcabe8e98eab8e97 (commit) from 01fcb90a5cfae1933dd18268f086ba150244d0d4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit fd3ac4e44355bf7ebfd9e2719e67c1b888b87070 Merge: 01fcb90a5cfae1933dd18268f086ba150244d0d4 f3ec9b4195a8b4b4de2c513841f469553d9f3b38 Author: Jan Kratochvil Date: Tue Mar 3 22:45:08 2009 +0100 Merge commit 'origin/archer-jankratochvil-python' into archer ----------------------------------------------------------------------- Summary of changes: gdb/python/python-frame.c | 40 ++++++++++++++++++++++++++++------------ gdb/python/python.c | 17 +++++++++++------ gdb/varobj.c | 17 ++++++++++++++++- 3 files changed, 55 insertions(+), 19 deletions(-) First 500 lines of diff: diff --git a/gdb/python/python-frame.c b/gdb/python/python-frame.c index 7305199..1729717 100644 --- a/gdb/python/python-frame.c +++ b/gdb/python/python-frame.c @@ -612,26 +612,42 @@ gdbpy_initialize_frames (void) static PyMethodDef frame_object_methods[] = { - { "equals", frapy_equal_p, METH_VARARGS, "Compare frames." }, + { "equals", frapy_equal_p, METH_VARARGS, + "equals (frame) -> Boolean.\n\ +Compare this frame to the given frame." }, { "is_valid", frapy_is_valid, METH_NOARGS, - "Return true if this frame is valid, false if not." }, + "is_valid () -> Boolean.\n\ +Return true if this frame is valid, false if not." }, { "name", frapy_name, METH_NOARGS, - "Return the function name of the frame." }, - { "type", frapy_type, METH_NOARGS, "Return the type of the frame." }, + "name () -> String.\n\ +Return the function name of the frame, or None if it can't be determined." }, + { "type", frapy_type, METH_NOARGS, + "type () -> Integer.\n\ +Return the type of the frame." }, { "unwind_stop_reason", frapy_unwind_stop_reason, METH_NOARGS, - "Return the reason why it's not possible to find frames older than this." }, - { "pc", frapy_pc, METH_NOARGS, "Return the frame's resume address." }, - { "block", frapy_block, METH_NOARGS, "Return the frame's code block." }, + "unwind_stop_reason () -> Integer.\n\ +Return the reason why it's not possible to find frames older than this." }, + { "pc", frapy_pc, METH_NOARGS, + "pc () -> Long.\n\ +Return the frame's resume address." }, + { "block", frapy_block, METH_NOARGS, + "block () -> gdb.Block.\n\ +Return the frame's code block." }, { "addr_in_block", frapy_addr_in_block, METH_NOARGS, - "Return an address which falls within the frame's code block." }, + "addr_in_block () -> Long.\n\ +Return an address which falls within the frame's code block." }, { "older", frapy_older, METH_NOARGS, - "Return the frame immediately older (outer) to this frame." }, + "older () -> gdb.Frame.\n\ +Return the frame immediately older (outer) to this frame." }, { "newer", frapy_newer, METH_NOARGS, - "Return the frame immetidaely newer (inner) to this frame." }, + "newer () -> gdb.Frame.\n\ +Return the frame immetidaely newer (inner) to this frame." }, { "find_sal", frapy_find_sal, METH_NOARGS, - "Return the frame's symtab and line." }, + "find_sal () -> gdb.Symtab_and_line.\n\ +Return the frame's symtab and line." }, { "read_var_value", frapy_read_var_value, METH_VARARGS, - "Return the value of the variable in this frame." }, + "read_var_value (variable) -> gdb.Value.\n\ +Return the value of the variable in this frame." }, {NULL} /* Sentinel */ }; diff --git a/gdb/python/python.c b/gdb/python/python.c index 18578f0..554b2bc 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1862,13 +1862,17 @@ static PyMethodDef GdbMethods[] = "Return a sequence of all loaded objfiles." }, { "frames", gdbpy_frames, METH_NOARGS, - "Return a tuple of all frame objects." }, + "frames () -> (gdb.Frame, ...).\n\ +Return a tuple of all frame objects." }, { "newest_frame", gdbpy_newest_frame, METH_NOARGS, - "Return the newest frame object." }, + "newest_frame () -> gdb.Frame.\n\ +Return the newest frame object." }, { "selected_frame", gdbpy_selected_frame, METH_NOARGS, - "Return the selected frame object." }, - { "frame_stop_reason_string", gdbpy_frame_stop_reason_string, - METH_VARARGS, "Return a string explaining unwind stop reason." }, + "selected_frame () -> gdb.Frame.\n\ +Return the selected frame object." }, + { "frame_stop_reason_string", gdbpy_frame_stop_reason_string, METH_VARARGS, + "stop_reason_string (Integer) -> String.\n\ +Return a string explaining unwind stop reason." }, { "lookup_symbol", (PyCFunction) gdbpy_lookup_symbol, METH_VARARGS | METH_KEYWORDS, @@ -1877,7 +1881,8 @@ Return a tuple with the symbol corresponding to the given name (or None) and\n\ a boolean indicating if name is a field of the current implied argument\n\ `this' (when the current language is object-oriented)." }, { "solib_address", gdbpy_solib_address, METH_VARARGS, - "Return shared library holding a given address, or None." }, + "solib_address (Long) -> String.\n\ +Return the name of the shared library holding a given address, or None." }, { "find_pc_function", gdbpy_find_pc_function, METH_VARARGS, "Return the function containing the given pc value, or None." }, diff --git a/gdb/varobj.c b/gdb/varobj.c index d18f6e7..1237c96 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -229,6 +229,8 @@ static void free_variable (struct varobj *var); static struct cleanup *make_cleanup_free_variable (struct varobj *var); +static struct cleanup *make_cleanup_uninstall_variable (struct varobj *var); + static struct type *get_type (struct varobj *var); static struct type *get_value_type (struct varobj *var); @@ -605,6 +607,7 @@ varobj_create (char *objname, do_cleanups (old_chain); return NULL; } + make_cleanup_uninstall_variable (var); } install_default_visualizer (var); @@ -1451,7 +1454,7 @@ install_default_visualizer (struct varobj *var) install_visualizer (var, pretty_printer); do_cleanups (cleanup); #else - error ("Python support required"); + /* No error is right as this function is inserted just as a hook. */ #endif } @@ -1996,6 +1999,18 @@ make_cleanup_free_variable (struct varobj *var) return make_cleanup (do_free_variable_cleanup, var); } +static void +do_uninstall_variable_cleanup (void *var) +{ + uninstall_variable (var); +} + +static struct cleanup * +make_cleanup_uninstall_variable (struct varobj *var) +{ + return make_cleanup (do_uninstall_variable_cleanup, var); +} + /* This returns the type of the variable. It also skips past typedefs to return the real type of the variable. hooks/post-receive -- Repository for Project Archer.