From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14705 invoked by alias); 9 Dec 2008 00:33:29 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 14678 invoked by uid 306); 9 Dec 2008 00:33:27 -0000 Date: Tue, 09 Dec 2008 00:33:00 -0000 Message-ID: <20081209003327.14663.qmail@sourceware.org> From: tromey@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-tromey-python: gdb X-Git-Refname: refs/heads/archer-tromey-python X-Git-Reftype: branch X-Git-Oldrev: 66e2f97a188e1dd6d34e0c912323cad35f47f593 X-Git-Newrev: cc40738cd87a1a27c9843fc1e53c7b69ff98b72b X-SW-Source: 2008-q4/txt/msg00191.txt.bz2 List-Id: The branch, archer-tromey-python has been updated via cc40738cd87a1a27c9843fc1e53c7b69ff98b72b (commit) from 66e2f97a188e1dd6d34e0c912323cad35f47f593 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit cc40738cd87a1a27c9843fc1e53c7b69ff98b72b Author: Tom Tromey Date: Mon Dec 8 17:32:38 2008 -0700 gdb * value.c (value_free): Handle value==0. * gdbtypes.c (create_array_type): Use range_type as parent. * cli/cli-cmds.c (init_cli_cmds): Disambiguate help text. gdb/doc * gdb.base/help.exp: Update. ----------------------------------------------------------------------- Summary of changes: gdb/ChangeLog | 8 ++++++++ gdb/cli/cli-cmds.c | 6 +++--- gdb/gdbtypes.c | 2 +- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.base/help.exp | 2 +- gdb/value.c | 9 ++++++--- 6 files changed, 23 insertions(+), 8 deletions(-) First 500 lines of diff: diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 097c121..7aa60c9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2008-12-08 Tom Tromey + + * value.c (value_free): Handle value==0. + + * gdbtypes.c (create_array_type): Use range_type as parent. + + * cli/cli-cmds.c (init_cli_cmds): Disambiguate help text. + 2008-12-05 Tom Tromey * python/python-symbol.c (symbol_object_methods) : Fix diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index e1dc88a..806a68a 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -1310,10 +1310,10 @@ Commands defined in this way may have up to ten arguments.")); Read commands from a file named FILE.\n\ Optional -v switch (before the filename) causes each command in\n\ FILE to be echoed as it is executed.\n\ -Optional -p switch (before the filename) causes FILE to be evaluated\n\ -as Python code.\n\ Note that the file \"%s\" is read automatically in this way\n\ -when GDB is started."), gdbinit); +when GDB is started.\n\ +Optional -p switch (before the filename) causes FILE to be evaluated\n\ +as Python code."), gdbinit); c = add_cmd ("source", class_support, source_command, source_help_text, &cmdlist); set_cmd_completer (c, filename_completer); diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 96a15f5..1d9bc2d 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -844,7 +844,7 @@ create_array_type (struct type *result_type, if (result_type == NULL) { - result_type = alloc_type (TYPE_OBJFILE (range_type), element_type); + result_type = alloc_type (TYPE_OBJFILE (range_type), range_type); } else { diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b23947a..e491bc6 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-12-08 Tom Tromey + + * gdb.base/help.exp: Update. + 2008-12-03 Thiago Jung Bauermann * gdb.python/python-template.exp: Use `gdb.history' instead of diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp index 65cb546..ca59ac9 100644 --- a/gdb/testsuite/gdb.base/help.exp +++ b/gdb/testsuite/gdb.base/help.exp @@ -602,7 +602,7 @@ gdb_test "help stepi" "Step one instruction exactly\.\[\r\n\]+Argument N means d gdb_test "help signal" "Continue program giving it signal.*" "help signal" # test help source # vxgdb reads .vxgdbinit -gdb_test "help source" "Read commands from a file named FILE\.\[\r\n\]+Optional -v switch \\(before the filename\\) causes each command in\[\r\n\]+FILE to be echoed as it is executed\.\[\r\n\]+Note that the file \"\[^\"\]*\" is read automatically in this way\[\r\n\]+when GDB is started\." "help source" +gdb_test "help source" "Read commands from a file named FILE\.\[\r\n\]+Optional -v switch \\(before the filename\\) causes each command in\[\r\n\]+FILE to be echoed as it is executed\.\[\r\n\]+Note that the file \"\[^\"\]*\" is read automatically in this way\[\r\n\]+when GDB is started\.\[\r\n\]+Optional -p switch \\(before the filename\\) causes FILE to be evaluated\[\r\n\]+as Python code\." "help source" # test help stack test_class_help "stack" { "Examining the stack\..*\[\r\n\]+" diff --git a/gdb/value.c b/gdb/value.c index d5b047f..9642878 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -275,9 +275,12 @@ allocate_value (struct type *type) void value_free (struct value *value) { - type_decref (value->type); - type_decref (value->enclosing_type); - xfree (value); + if (value) + { + type_decref (value->type); + type_decref (value->enclosing_type); + xfree (value); + } } /* Allocate a value that has the correct length hooks/post-receive -- Repository for Project Archer.