public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: tromey@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  archer-tromey-python: gdb
Date: Thu, 23 Oct 2008 21:28:00 -0000	[thread overview]
Message-ID: <20081023212803.18649.qmail@sourceware.org> (raw)

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 <tromey@redhat.com>
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  <tromey@redhat.com>
+
+	* python/python.c (find_pretty_printer): Strip type qualifiers.
+
 2008-10-22  Tom Tromey  <tromey@redhat.com>
 
 	* 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  <tromey@redhat.com>
+
+	* 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  <tromey@redhat.com>
 
 	* 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.


             reply	other threads:[~2008-10-23 21:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23 21:28 tromey [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-04-07 20:28 tromey
2009-03-24 17:27 tromey
2009-02-05 19:56 tromey
2008-12-17 23:10 tromey
2008-12-15 22:38 tromey
2008-12-13  0:37 tromey
2008-12-12 23:54 tromey
2008-12-10 15:28 tromey
2008-12-09  0:33 tromey
2008-12-02 21:29 tromey
2008-12-01 19:10 tromey
2008-11-25 21:17 tromey
2008-11-21 18:25 tromey
2008-11-18 18:52 tromey
2008-11-18 15:54 tromey
2008-11-17 15:45 tromey
2008-11-16 22:18 tromey
2008-11-16 16:56 tromey
2008-11-12  1:54 tromey
2008-11-10 14:15 tromey
2008-11-06 21:11 tromey
2008-11-06 19:58 tromey
2008-10-23 22:27 tromey
2008-10-22 18:18 tromey
2008-10-21 18:32 tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081023212803.18649.qmail@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=archer-commits@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).