public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 2/3] gdb/testsuite: Make test names unique in gdb.python/py-prettyprint.exp
  2019-03-23 23:04 [PATCH 0/3] Pretty Printing Whitespace And Python Pretty Printing API Andrew Burgess
@ 2019-03-23 23:04 ` Andrew Burgess
  2019-03-25 15:18   ` Tom Tromey
  2019-03-23 23:04 ` [PATCH 1/3] gdb: Avoid trailing whitespace when pretty printing Andrew Burgess
  2019-03-23 23:05 ` [PATCH 3/3] gdb: Make python display_hint None handling defined behaviour Andrew Burgess
  2 siblings, 1 reply; 8+ messages in thread
From: Andrew Burgess @ 2019-03-23 23:04 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

This makes the test names unique in gdb.python/py-prettyprint.exp, it
also switches to use gdb_breakpoint and gdb_continue_to_breakpoint
more so that we avoid test names with the source line number in - this
is bad if the test source ever changes as the test names will then
change.

One final change is to switch from using gdb_py_test_silent_cmd to use
gdb_test_no_output, the former should be used for running python
commands and can catch any thrown exception.  However, in this case
the command being run is not a python command, its just a normal GDB
CLI command that produces no output, so lets use the appropriate
wrapper function.

gdb/testsuite/ChangeLog:

	* gdb.python/py-prettyprint.exp: Use gdb_breakpoint and
	gdb_continue_to_breakpoint more throughout this test.
	(run_lang_tests) Supply unique test names, and use
	gdb_test_no_output.
---
 gdb/testsuite/ChangeLog                     |  7 +++++++
 gdb/testsuite/gdb.python/py-prettyprint.exp | 26 ++++++++++++++------------
 2 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp
index 5ec5fdb2b8b..335908279c9 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.exp
+++ b/gdb/testsuite/gdb.python/py-prettyprint.exp
@@ -49,9 +49,9 @@ proc run_lang_tests {exefile lang} {
 
     gdb_test_no_output "set print pretty on"
 
-    gdb_test "b [gdb_get_line_number {break to inspect} ${testfile}.c ]" \
-	".*Breakpoint.*"
-    gdb_test "continue" ".*Breakpoint.*"
+    gdb_breakpoint [gdb_get_line_number "break to inspect" ${testfile}.c]
+    gdb_continue_to_breakpoint "break to inspect" ".*break to inspect.*"
+
 
     set remote_python_file [gdb_remote_download host \
 				${srcdir}/${subdir}/${testfile}.py]
@@ -78,12 +78,15 @@ proc run_lang_tests {exefile lang} {
 	gdb_test "print ref" "= a=<15> b=< a=<8> b=<$hex>>"
 	gdb_test "print derived" \
 	    " = \{.*<Vbase1> = pp class name: Vbase1.*<Vbase2> = \{.*<VirtualTest> = pp value variable is: 1,.*members of Vbase2:.*_vptr.Vbase2 = $hex.*<Vbase3> = \{.*members of Vbase3.*members of Derived:.*value = 2.*"
-	gdb_test "print ns " "\"embedded\\\\000null\\\\000string\""
-	gdb_py_test_silent_cmd "set print elements 3" "" 1
-	gdb_test "print ns" "emb\.\.\.."
-	gdb_py_test_silent_cmd "set print elements 10" "" 1
-	gdb_test "print ns" "embedded\\\\000n\.\.\.."
-	gdb_py_test_silent_cmd "set print elements 200" "" 1
+	gdb_test "print ns " "\"embedded\\\\000null\\\\000string\"" \
+	    "print ns with default element limit"
+	gdb_test_no_output "set print elements 3"
+	gdb_test "print ns" "emb\.\.\.." \
+	    "print ns with element limit of 3"
+	gdb_test_no_output "set print elements 10"
+	gdb_test "print ns" "embedded\\\\000n\.\.\.." \
+	    "print ns with element limit of 10"
+	gdb_test_no_output "set print elements 200"
     }
 
     if { ![is_address_zero_readable] } {
@@ -168,9 +171,8 @@ gdb_continue_to_breakpoint "eval-break" ".* eval-break .*"
 
 gdb_test "info locals" "eval9 = eval=<123456789>"
 
-gdb_test "b [gdb_get_line_number {break to inspect} ${testfile}.c ]" \
-    ".*Breakpoint.*"
-gdb_test "continue" ".*Breakpoint.*"
+gdb_breakpoint [gdb_get_line_number "break to inspect" ${testfile}.c ]
+gdb_continue_to_breakpoint "break to inspect" ".*break to inspect.*"
 
 gdb_test "print ss" " = a=< a=<1> b=<$hex>> b=< a=<2> b=<$hex>>" \
     "print ss enabled #1"
-- 
2.14.5

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 0/3] Pretty Printing Whitespace And Python Pretty Printing API
@ 2019-03-23 23:04 Andrew Burgess
  2019-03-23 23:04 ` [PATCH 2/3] gdb/testsuite: Make test names unique in gdb.python/py-prettyprint.exp Andrew Burgess
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andrew Burgess @ 2019-03-23 23:04 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

A couple of changes and clean ups related to pretty printing and the
python pretty printer API.

---

Andrew Burgess (3):
  gdb: Avoid trailing whitespace when pretty printing
  gdb/testsuite: Make test names unique in gdb.python/py-prettyprint.exp
  gdb: Make python display_hint None handling defined behaviour

 gdb/ChangeLog                               |  5 +++
 gdb/cp-valprint.c                           |  8 +++-
 gdb/doc/ChangeLog                           |  5 +++
 gdb/doc/python.texi                         |  5 ++-
 gdb/testsuite/ChangeLog                     | 22 +++++++++++
 gdb/testsuite/gdb.base/finish-pretty.exp    |  2 +-
 gdb/testsuite/gdb.base/pretty-print.c       | 53 ++++++++++++++++++++++++++
 gdb/testsuite/gdb.base/pretty-print.exp     | 58 +++++++++++++++++++++++++++++
 gdb/testsuite/gdb.python/py-prettyprint.c   |  2 +
 gdb/testsuite/gdb.python/py-prettyprint.exp | 41 +++++++++++++-------
 gdb/testsuite/gdb.python/py-prettyprint.py  |  6 +++
 11 files changed, 190 insertions(+), 17 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/pretty-print.c
 create mode 100644 gdb/testsuite/gdb.base/pretty-print.exp

-- 
2.14.5

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] gdb: Avoid trailing whitespace when pretty printing
  2019-03-23 23:04 [PATCH 0/3] Pretty Printing Whitespace And Python Pretty Printing API Andrew Burgess
  2019-03-23 23:04 ` [PATCH 2/3] gdb/testsuite: Make test names unique in gdb.python/py-prettyprint.exp Andrew Burgess
@ 2019-03-23 23:04 ` Andrew Burgess
  2019-03-25 15:17   ` Tom Tromey
  2019-03-23 23:05 ` [PATCH 3/3] gdb: Make python display_hint None handling defined behaviour Andrew Burgess
  2 siblings, 1 reply; 8+ messages in thread
From: Andrew Burgess @ 2019-03-23 23:04 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

While writing a new test for 'set print pretty on' I spotted that GDB
will sometimes add a trailing whitespace character when pretty
printing.  This commit removes the trailing whitespace and updates the
expected results in one tests where this was an issue.

I've added an extra test for 'set print pretty on' as it doesn't seem
to have much testing.

gdb/ChangeLog:

	* cp-valprint.c (cp_print_value_fields): Don't print trailing
	whitespace when pretty printing is on.

gdb/testsuite/ChangeLog:

	* gdb.base/finish-pretty.exp: Update expected results.
	* gdb.base/pretty-print.c: New file.
	* gdb.base/pretty-print.exp: New file.
---
 gdb/ChangeLog                            |  5 +++
 gdb/cp-valprint.c                        |  8 +++--
 gdb/testsuite/ChangeLog                  |  6 ++++
 gdb/testsuite/gdb.base/finish-pretty.exp |  2 +-
 gdb/testsuite/gdb.base/pretty-print.c    | 53 +++++++++++++++++++++++++++++
 gdb/testsuite/gdb.base/pretty-print.exp  | 58 ++++++++++++++++++++++++++++++++
 6 files changed, 129 insertions(+), 3 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/pretty-print.c
 create mode 100644 gdb/testsuite/gdb.base/pretty-print.exp

diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 7124da42ec9..443c3b06dac 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -235,7 +235,11 @@ cp_print_value_fields (struct type *type, struct type *real_type,
 	    continue;
 
 	  if (fields_seen)
-	    fprintf_filtered (stream, ", ");
+	    {
+	      fputs_filtered (",", stream);
+	      if (!options->prettyformat)
+		fputs_filtered (" ", stream);
+	    }
 	  else if (n_baseclasses > 0)
 	    {
 	      if (options->prettyformat)
@@ -244,7 +248,7 @@ cp_print_value_fields (struct type *type, struct type *real_type,
 		  print_spaces_filtered (2 + 2 * recurse, stream);
 		  fputs_filtered ("members of ", stream);
 		  fputs_filtered (TYPE_NAME (type), stream);
-		  fputs_filtered (": ", stream);
+		  fputs_filtered (":", stream);
 		}
 	    }
 	  fields_seen = 1;
diff --git a/gdb/testsuite/gdb.base/finish-pretty.exp b/gdb/testsuite/gdb.base/finish-pretty.exp
index c558d22b576..b1530cda591 100644
--- a/gdb/testsuite/gdb.base/finish-pretty.exp
+++ b/gdb/testsuite/gdb.base/finish-pretty.exp
@@ -30,7 +30,7 @@ proc finish_pretty { } {
     gdb_test_no_output "set print pretty" \
 	"pretty printing switched on"
     gdb_test "finish" \
-	{.*Value returned is \$1 = \{\r\n  a = 1, \r\n  b = 2\r\n\}} \
+	{.*Value returned is \$1 = \{\r\n  a = 1,\r\n  b = 2\r\n\}} \
 	"finish foo prettyprinted function result"
 }
 
diff --git a/gdb/testsuite/gdb.base/pretty-print.c b/gdb/testsuite/gdb.base/pretty-print.c
new file mode 100644
index 00000000000..9e241f8c678
--- /dev/null
+++ b/gdb/testsuite/gdb.base/pretty-print.c
@@ -0,0 +1,53 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2019 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+struct s1_t
+{
+  int one;
+  int two;
+
+  struct
+  {
+    union {
+      int three : 3;
+      int four : 4;
+    };
+
+    union {
+      int five : 3;
+      int six : 4;
+    };
+  } data;
+} s1 = { .one = 1, .two = 2, .data = { .three = 3, .five = 5 } };
+
+struct s2_t
+{
+  int one;
+  int two;
+
+  struct
+  {
+    int three;
+    int four;
+  };
+} s2 = { .one = 1, .two = 2, .three = 3, .four = 4 };
+
+int
+main ()
+{
+  return 0;
+}
diff --git a/gdb/testsuite/gdb.base/pretty-print.exp b/gdb/testsuite/gdb.base/pretty-print.exp
new file mode 100644
index 00000000000..91e685e17ca
--- /dev/null
+++ b/gdb/testsuite/gdb.base/pretty-print.exp
@@ -0,0 +1,58 @@
+# Copyright 2019 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test pretty printing of structures and unions.
+
+standard_testfile
+
+if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+    untested $testfile.exp
+    return -1
+}
+
+if ![runto_main] {
+    untested $testfile.exp
+    return -1
+}
+
+gdb_test_no_output "set print pretty on"
+
+gdb_test "print s1" \
+    [multi_line \
+	 " = {" \
+	 "  one = 1," \
+	 "  two = 2," \
+	 "  data = {" \
+	 "    {" \
+	 "      three = 3," \
+	 "      four = 3" \
+	 "    }," \
+	 "    {" \
+	 "      five = -3," \
+	 "      six = 5" \
+	 "    }" \
+	 "  }" \
+	 "}" ]
+
+gdb_test "print s2" \
+    [multi_line \
+	 " = {" \
+	 "  one = 1," \
+	 "  two = 2," \
+	 "  {" \
+	 "    three = 3," \
+	 "    four = 4" \
+	 "  }" \
+	 "}" ]
-- 
2.14.5

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 3/3] gdb: Make python display_hint None handling defined behaviour
  2019-03-23 23:04 [PATCH 0/3] Pretty Printing Whitespace And Python Pretty Printing API Andrew Burgess
  2019-03-23 23:04 ` [PATCH 2/3] gdb/testsuite: Make test names unique in gdb.python/py-prettyprint.exp Andrew Burgess
  2019-03-23 23:04 ` [PATCH 1/3] gdb: Avoid trailing whitespace when pretty printing Andrew Burgess
@ 2019-03-23 23:05 ` Andrew Burgess
  2019-03-24 16:07   ` Eli Zaretskii
  2019-03-25 15:20   ` Tom Tromey
  2 siblings, 2 replies; 8+ messages in thread
From: Andrew Burgess @ 2019-03-23 23:05 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

The documentation say that the display_hint method must return a
string to serve as a display hint, and then goes on to list some
acceptable strings.

However, if we don't supply the display_hint method then we get a
default display style behaviour and there's currently no way (in the
python api) to force this default behaviour.

The guile api allows #f to be used in order to force the default
display style behaviour, and this is documented.

Currently, using None in the python api also forces the default
display behaviour.

This commit extends the documentation to make returning None from the
display_hint method and official mechanism by which the user can get
the default display style.

I've extended one of the existing tests to cover this case.

gdb/doc/ChangeLog:

	* python.texi (Pretty Printing API): Document use of None for the
	display_hint.

gdb/testsuite/ChangeLog:

	* gdb.python/py-prettyprint.c (struct container) <is_map_p>: New
	field.
	(make_container): Initialise new field.
	* gdb.python/py-prettyprint.exp: Add new tests.
	* gdb.python/py-prettyprint.py (class ContainerPrinter)
	<display_hint>: New method.
---
 gdb/doc/ChangeLog                           |  5 +++++
 gdb/doc/python.texi                         |  5 ++++-
 gdb/testsuite/ChangeLog                     |  9 +++++++++
 gdb/testsuite/gdb.python/py-prettyprint.c   |  2 ++
 gdb/testsuite/gdb.python/py-prettyprint.exp | 15 ++++++++++++++-
 gdb/testsuite/gdb.python/py-prettyprint.py  |  6 ++++++
 6 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index 6fadaffa371..56c925d4dd2 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -1294,7 +1294,7 @@
 printed.
 
 This method is optional.  If it does exist, this method must return a
-string.
+string or the special value @code{None}.
 
 Some display hints are predefined by @value{GDBN}:
 
@@ -1317,6 +1317,9 @@
 adding quotation marks, possibly escaping some characters, respecting
 @code{set print elements}, and the like.
 @end table
+
+The special value @code{None} causes @value{GDBN} to apply the default
+display rules.
 @end defun
 
 @defun pretty_printer.to_string (self)
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.c b/gdb/testsuite/gdb.python/py-prettyprint.c
index 01fdf8a96e6..1b9aeb4b679 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.c
+++ b/gdb/testsuite/gdb.python/py-prettyprint.c
@@ -175,6 +175,7 @@ struct container
   string name;
   int len;
   int *elements;
+  int is_map_p;
 };
 
 typedef struct container zzz_type;
@@ -195,6 +196,7 @@ make_container (const char *s)
   result.name = make_string (s);
   result.len = 0;
   result.elements = 0;
+  result.is_map_p = 0;
 
   return result;
 }
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp
index 335908279c9..82e7e650316 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.exp
+++ b/gdb/testsuite/gdb.python/py-prettyprint.exp
@@ -109,7 +109,12 @@ proc run_lang_tests {exefile lang} {
     gdb_test_no_output "set python print-stack full"
     gdb_test "print hint_error" "Exception: hint failed\r\nhint_error_val"
 
-    gdb_test "print c" " = container \"container\" with 2 elements = {$nl *.0. = 23,$nl *.1. = 72$nl}"
+    gdb_test "print c" " = container \"container\" with 2 elements = {$nl *.0. = 23,$nl *.1. = 72$nl}" \
+	"print c, pretty printing on, default display hint"
+
+    gdb_test_no_output "set variable c.is_map_p=1"
+    gdb_test "print c" " = container \"container\" with 2 elements = \{$nl  \\\[23\\\] = 72$nl\}" \
+	"print c, pretty printing on, display hint is now map"
 
     gdb_test "print nstype" " = {$nl *.0. = 7,$nl *.1. = 42$nl}"
 
@@ -117,6 +122,14 @@ proc run_lang_tests {exefile lang} {
     gdb_test "print nstype" " = {.0. = 7, .1. = 42}" \
 	"print nstype on one line"
 
+    # Now we have pretty printing turned off, try printing 'c' again.
+    gdb_test "print c" " = container \"container\" with 2 elements = \{\\\[23\\\] = 72\}" \
+	"print c, pretty printing off, display hint is now map"
+
+    gdb_test_no_output "set variable c.is_map_p=0"
+    gdb_test "print c" " = container \"container\" with 2 elements = \{\\\[0\\\] = 23, \\\[1\\\] = 72\}" \
+	"print c, pretty printing off, default display hint"
+
     # Check that GDB doesn't lose typedefs when looking for a printer.
     gdb_test "print an_int" " = -1"
     gdb_test "print (int) an_int" " = -1"
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.py b/gdb/testsuite/gdb.python/py-prettyprint.py
index 92fe81525b1..43727f7231d 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.py
+++ b/gdb/testsuite/gdb.python/py-prettyprint.py
@@ -56,6 +56,12 @@ class ContainerPrinter (object):
     def children(self):
         return _iterator(self.val['elements'], self.val['len'])
 
+    def display_hint (self):
+        if (self.val['is_map_p']):
+            return 'map'
+        else:
+            return None
+
 # Treats a container as array.
 class ArrayPrinter (object):
     def __init__(self, val):
-- 
2.14.5

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] gdb: Make python display_hint None handling defined behaviour
  2019-03-23 23:05 ` [PATCH 3/3] gdb: Make python display_hint None handling defined behaviour Andrew Burgess
@ 2019-03-24 16:07   ` Eli Zaretskii
  2019-03-25 15:20   ` Tom Tromey
  1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2019-03-24 16:07 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: gdb-patches

> From: Andrew Burgess <andrew.burgess@embecosm.com>
> Cc: Andrew Burgess <andrew.burgess@embecosm.com>
> Date: Sat, 23 Mar 2019 23:04:44 +0000
> 
> The documentation say that the display_hint method must return a
> string to serve as a display hint, and then goes on to list some
> acceptable strings.
> 
> However, if we don't supply the display_hint method then we get a
> default display style behaviour and there's currently no way (in the
> python api) to force this default behaviour.
> 
> The guile api allows #f to be used in order to force the default
> display style behaviour, and this is documented.
> 
> Currently, using None in the python api also forces the default
> display behaviour.
> 
> This commit extends the documentation to make returning None from the
> display_hint method and official mechanism by which the user can get
> the default display style.
> 
> I've extended one of the existing tests to cover this case.
> 
> gdb/doc/ChangeLog:
> 
> 	* python.texi (Pretty Printing API): Document use of None for the
> 	display_hint.
> 
> gdb/testsuite/ChangeLog:
> 
> 	* gdb.python/py-prettyprint.c (struct container) <is_map_p>: New
> 	field.
> 	(make_container): Initialise new field.
> 	* gdb.python/py-prettyprint.exp: Add new tests.
> 	* gdb.python/py-prettyprint.py (class ContainerPrinter)
> 	<display_hint>: New method.

The documentation part is OK.

Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] gdb: Avoid trailing whitespace when pretty printing
  2019-03-23 23:04 ` [PATCH 1/3] gdb: Avoid trailing whitespace when pretty printing Andrew Burgess
@ 2019-03-25 15:17   ` Tom Tromey
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Tromey @ 2019-03-25 15:17 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: gdb-patches

>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> While writing a new test for 'set print pretty on' I spotted that GDB
Andrew> will sometimes add a trailing whitespace character when pretty
Andrew> printing.  This commit removes the trailing whitespace and updates the
Andrew> expected results in one tests where this was an issue.

Thanks, this is ok.

Tom

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] gdb/testsuite: Make test names unique in gdb.python/py-prettyprint.exp
  2019-03-23 23:04 ` [PATCH 2/3] gdb/testsuite: Make test names unique in gdb.python/py-prettyprint.exp Andrew Burgess
@ 2019-03-25 15:18   ` Tom Tromey
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Tromey @ 2019-03-25 15:18 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: gdb-patches

>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> This makes the test names unique in gdb.python/py-prettyprint.exp, it
Andrew> also switches to use gdb_breakpoint and gdb_continue_to_breakpoint
Andrew> more so that we avoid test names with the source line number in - this
Andrew> is bad if the test source ever changes as the test names will then
Andrew> change.

Thanks for doing this.  This looks good to me.

Tom

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] gdb: Make python display_hint None handling defined behaviour
  2019-03-23 23:05 ` [PATCH 3/3] gdb: Make python display_hint None handling defined behaviour Andrew Burgess
  2019-03-24 16:07   ` Eli Zaretskii
@ 2019-03-25 15:20   ` Tom Tromey
  1 sibling, 0 replies; 8+ messages in thread
From: Tom Tromey @ 2019-03-25 15:20 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: gdb-patches

>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:

Andrew> gdb/doc/ChangeLog:

Andrew> 	* python.texi (Pretty Printing API): Document use of None for the
Andrew> 	display_hint.

Andrew> gdb/testsuite/ChangeLog:

Andrew> 	* gdb.python/py-prettyprint.c (struct container) <is_map_p>: New
Andrew> 	field.
Andrew> 	(make_container): Initialise new field.
Andrew> 	* gdb.python/py-prettyprint.exp: Add new tests.
Andrew> 	* gdb.python/py-prettyprint.py (class ContainerPrinter)
Andrew> 	<display_hint>: New method.

This seems like a good idea to me.  Thanks for doing it.
This is OK.

Tom

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-03-25 15:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-23 23:04 [PATCH 0/3] Pretty Printing Whitespace And Python Pretty Printing API Andrew Burgess
2019-03-23 23:04 ` [PATCH 2/3] gdb/testsuite: Make test names unique in gdb.python/py-prettyprint.exp Andrew Burgess
2019-03-25 15:18   ` Tom Tromey
2019-03-23 23:04 ` [PATCH 1/3] gdb: Avoid trailing whitespace when pretty printing Andrew Burgess
2019-03-25 15:17   ` Tom Tromey
2019-03-23 23:05 ` [PATCH 3/3] gdb: Make python display_hint None handling defined behaviour Andrew Burgess
2019-03-24 16:07   ` Eli Zaretskii
2019-03-25 15:20   ` Tom Tromey

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).