From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18689 invoked by alias); 23 Oct 2008 21:28:05 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 18664 invoked by uid 306); 23 Oct 2008 21:28:03 -0000 Date: Thu, 23 Oct 2008 21:28:00 -0000 Message-ID: <20081023212803.18649.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: cf3e56721383f4e8480f049a20eaa25b7e76d753 X-Git-Newrev: 830c5c95aa64f4918c81388f19e080063ea24649 X-SW-Source: 2008-q4/txt/msg00042.txt.bz2 List-Id: The branch, archer-tromey-python has been updated via 830c5c95aa64f4918c81388f19e080063ea24649 (commit) from cf3e56721383f4e8480f049a20eaa25b7e76d753 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 830c5c95aa64f4918c81388f19e080063ea24649 Author: Tom Tromey Date: Thu Oct 23 15:27:47 2008 -0600 gdb * python/python.c (find_pretty_printer): Strip type qualifiers. gdb/testsuite * gdb.python/python-prettyprint.exp (run_lang_tests): Test printing 'cstring'. * gdb.python/python-prettyprint.c (main): New local 'cstring'. ----------------------------------------------------------------------- Summary of changes: gdb/ChangeLog | 4 ++++ gdb/python/python.c | 2 ++ gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.python/python-prettyprint.c | 1 + gdb/testsuite/gdb.python/python-prettyprint.exp | 1 + 5 files changed, 14 insertions(+), 0 deletions(-) First 500 lines of diff: diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3a112c4..7eaf2f5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2008-10-23 Tom Tromey + + * python/python.c (find_pretty_printer): Strip type qualifiers. + 2008-10-22 Tom Tromey * python/python.c (_initialize_python) <_format_children>: Handle diff --git a/gdb/python/python.c b/gdb/python/python.c index 83bce4d..c6395fb 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -632,6 +632,8 @@ find_pretty_printer (struct type *type, PyObject **dictp, char *dict_name) /* Get the name of the type. */ TRY_CATCH (except, RETURN_MASK_ALL) { + /* Strip off any qualifiers from the type. */ + type = make_cv_type (0, 0, type, NULL); type_name = get_type (type); } if (except.reason < 0) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index cb86eca..1047286 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-10-23 Tom Tromey + + * gdb.python/python-prettyprint.exp (run_lang_tests): Test + printing 'cstring'. + * gdb.python/python-prettyprint.c (main): New local 'cstring'. + 2008-10-22 Tom Tromey * lib/mi-support.exp (mi_list_varobj_children_range): New proc. diff --git a/gdb/testsuite/gdb.python/python-prettyprint.c b/gdb/testsuite/gdb.python/python-prettyprint.c index 8e7473a..1336d91 100644 --- a/gdb/testsuite/gdb.python/python-prettyprint.c +++ b/gdb/testsuite/gdb.python/python-prettyprint.c @@ -114,6 +114,7 @@ main () struct ss ssa[2]; string x = make_string ("this is x"); zzz_type c = make_container ("container"); + const struct string_repr cstring = { { "const string" } }; init_ss(&ss, 1, 2); init_ss(ssa+0, 3, 4); diff --git a/gdb/testsuite/gdb.python/python-prettyprint.exp b/gdb/testsuite/gdb.python/python-prettyprint.exp index 1deac49..7c654a4 100644 --- a/gdb/testsuite/gdb.python/python-prettyprint.exp +++ b/gdb/testsuite/gdb.python/python-prettyprint.exp @@ -74,6 +74,7 @@ proc run_lang_tests {lang} { } gdb_test "print x" " = $hex \"this is x\"" + gdb_test "print cstring" " = $hex \"const string\"" set nl "\[\r\n\]+" gdb_test "print c" " = container $hex \"container\" with 2 elements$nl *.0. = 23$nl *.1. = 72" hooks/post-receive -- Repository for Project Archer.