public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Add missing parentheses on 'print' (gdb.python/py-progspace.exp)
@ 2019-11-20 21:33 Sergio Durigan Junior
  0 siblings, 0 replies; only message in thread
From: Sergio Durigan Junior @ 2019-11-20 21:33 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4f22c3f42ea5824134aaba555e5ad5bd82a36b36

commit 4f22c3f42ea5824134aaba555e5ad5bd82a36b36
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date:   Wed Nov 20 16:31:35 2019 -0500

    Add missing parentheses on 'print' (gdb.python/py-progspace.exp)
    
    Commit 33d569b709886a1208145806da80b689d9cae9da ("gdb/python: Return
    None from Progspace.block_for_pc on error") added a few tests on
    gdb.python/py-progspace.exp which use 'print', but forgot to use
    parentheses when passing the arguments to be printed.  This fails on
    Python 3.
    
    This commit adds these missing parentheses.  Pushed as obvious.
    
    gdb/testsuite/ChangeLog:
    2019-11-20  Sergio Durigan Junior  <sergiodj@redhat.com>
    
    	* gdb.python/py-progspace.exp: Add missing parentheses on some
    	'print' commands.
    
    Change-Id: Iac0a7578855d128bbee3b98e7ea5888dae55fc00

Diff:
---
 gdb/testsuite/ChangeLog                   | 5 +++++
 gdb/testsuite/gdb.python/py-progspace.exp | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 32dc308..f47ed17 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-11-20  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* gdb.python/py-progspace.exp: Add missing parentheses on some
+	'print' commands.
+
 2019-11-19  Tom Tromey  <tom@tromey.com>
 
 	* gdb.tui/winheight.exp: New file.
diff --git a/gdb/testsuite/gdb.python/py-progspace.exp b/gdb/testsuite/gdb.python/py-progspace.exp
index d1bcb81..4619441 100644
--- a/gdb/testsuite/gdb.python/py-progspace.exp
+++ b/gdb/testsuite/gdb.python/py-progspace.exp
@@ -61,14 +61,14 @@ if {![runto_main]} {
 set pc_val [get_integer_valueof "\$pc" 0]
 gdb_py_test_silent_cmd "python blk = gdb.current_progspace ().block_for_pc (${pc_val})" \
     "get block for the current \$pc" 1
-gdb_test "python print blk.start <= ${pc_val}" "True" \
+gdb_test "python print (blk.start <= ${pc_val})" "True" \
     "block start is before \$pc"
-gdb_test "python print blk.end >= ${pc_val}" "True" \
+gdb_test "python print (blk.end >= ${pc_val})" "True" \
     "block end is after \$pc"
 
 # Check what happens when we ask for a block of an invalid address.
 if ![is_address_zero_readable] {
-    gdb_test "python print gdb.current_progspace ().block_for_pc (0)" "None"
+    gdb_test "python print (gdb.current_progspace ().block_for_pc (0))" "None"
 }
 
 # With a single inferior, progspace.objfiles () and gdb.objfiles () should


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-20 21:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-20 21:33 [binutils-gdb] Add missing parentheses on 'print' (gdb.python/py-progspace.exp) Sergio Durigan Junior

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