From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13194 invoked by alias); 30 Nov 2012 13:17:19 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 13151 invoked by uid 9514); 30 Nov 2012 13:17:17 -0000 Date: Fri, 30 Nov 2012 13:17:00 -0000 Message-ID: <20121130131717.13135.qmail@sourceware.org> From: pmuldoon@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-pmuldoon-python-backtrace: Fix/polish X-Git-Refname: refs/heads/archer-pmuldoon-python-backtrace X-Git-Reftype: branch X-Git-Oldrev: ff146700b0c59a031ec65b4b5ed216bc0626b297 X-Git-Newrev: a1564736aae8ee72abb45b4d561d066391b17aa5 X-SW-Source: 2012-q4/txt/msg00022.txt.bz2 List-Id: The branch, archer-pmuldoon-python-backtrace has been updated via a1564736aae8ee72abb45b4d561d066391b17aa5 (commit) from ff146700b0c59a031ec65b4b5ed216bc0626b297 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit a1564736aae8ee72abb45b4d561d066391b17aa5 Author: Phil Muldoon Date: Fri Nov 30 13:16:57 2012 +0000 Fix/polish ----------------------------------------------------------------------- Summary of changes: gdb/python/py-objfile.c | 5 ++++- gdb/python/py-progspace.c | 5 ++++- gdb/stack.c | 4 +--- gdb/testsuite/gdb.python/py-frame.c | 6 ------ gdb/testsuite/gdb.python/py-frame.exp | 4 ++-- 5 files changed, 11 insertions(+), 13 deletions(-) First 500 lines of diff: diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c index 16680bc..228b71b 100644 --- a/gdb/python/py-objfile.c +++ b/gdb/python/py-objfile.c @@ -95,6 +95,8 @@ objfpy_new (PyTypeObject *type, PyObject *args, PyObject *keywords) self->type_printers = PyList_New (0); if (!self->type_printers) { + Py_DECREF (self->printers); + Py_DECREF (self->frame_filters); Py_DECREF (self); return NULL; } @@ -285,11 +287,12 @@ objfile_to_objfile_object (struct objfile *objfile) object->type_printers = PyList_New (0); if (!object->type_printers) { + Py_DECREF (object->printers); + Py_DECREF (object->frame_filters); Py_DECREF (object); return NULL; } - set_objfile_data (objfile, objfpy_objfile_data_key, object); } } diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c index 8bb20b7..9a26f39 100644 --- a/gdb/python/py-progspace.c +++ b/gdb/python/py-progspace.c @@ -39,7 +39,6 @@ typedef struct PyObject *frame_filters; /* The type-printer list. */ PyObject *type_printers; - } pspace_object; static PyTypeObject pspace_object_type; @@ -104,6 +103,8 @@ pspy_new (PyTypeObject *type, PyObject *args, PyObject *keywords) self->type_printers = PyList_New (0); if (!self->type_printers) { + Py_DECREF (self->printers); + Py_DECREF (self->frame_filters); Py_DECREF (self); return NULL; } @@ -282,6 +283,8 @@ pspace_to_pspace_object (struct program_space *pspace) object->type_printers = PyList_New (0); if (!object->type_printers) { + Py_DECREF (object->printers); + Py_DECREF (object->frame_filters); Py_DECREF (object); return NULL; } diff --git a/gdb/stack.c b/gdb/stack.c index a5ef5d2..c33dc65 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -758,7 +758,6 @@ do_gdb_disassembly (struct gdbarch *gdbarch, void print_frame_info (struct frame_info *frame, int print_level, enum print_what print_what, int print_args) - { struct gdbarch *gdbarch = get_frame_arch (frame); struct symtab_and_line sal; @@ -780,7 +779,7 @@ print_frame_info (struct frame_info *frame, int print_level, to list for this frame. */ if (print_level) { - ui_out_text (uiout, "#"); + ui_out_text (uiout, "#"); ui_out_field_fmt_int (uiout, 2, ui_left, "level", frame_relative_level (frame)); } @@ -1654,7 +1653,6 @@ frame_info (char *addr_exp, int from_tty) static void backtrace_command_1 (char *count_exp, int show_locals, int raw, int from_tty) - { struct frame_info *fi; int count; diff --git a/gdb/testsuite/gdb.python/py-frame.c b/gdb/testsuite/gdb.python/py-frame.c index 9674576..82db341 100644 --- a/gdb/testsuite/gdb.python/py-frame.c +++ b/gdb/testsuite/gdb.python/py-frame.c @@ -1,11 +1,5 @@ -int f3 (int b) -{ - return b; -} - int f2 (int a) { - f3 (a); return ++a; } diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp index 83ff8fe..993e774 100644 --- a/gdb/testsuite/gdb.python/py-frame.exp +++ b/gdb/testsuite/gdb.python/py-frame.exp @@ -18,8 +18,8 @@ load_lib gdb-python.exp -set testfile "py-frame" -set srcfile ${testfile}.c +standard_testfile + if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } { return -1 } hooks/post-receive -- Repository for Project Archer.