This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [pushed/ob master+8.0] Fix gdb.python/py-record-btrace-threads.exp with Python 3


Ah, thank you. I found that issue yesterday in the evening, too and was about to fix it myself but eventually ran out of time.

Regards,
Tim

> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Pedro Alves
> Sent: Thursday, May 4, 2017 5:06 PM
> To: gdb-patches@sourceware.org
> Subject: [pushed/ob master+8.0] Fix gdb.python/py-record-btrace-
> threads.exp with Python 3
> 
> Fix several instances of:
> 
>  ...
>  python print not f1calls
>    File "<string>", line 1
>      print not f1calls
> 		     ^
>  SyntaxError: Missing parentheses in call to 'print'
>  Error while executing Python code.
>  (gdb) FAIL: gdb.python/py-record-btrace-threads.exp: thread=1: checking
> thread 1: python print not f1calls
>  ...
> 
> gdb/testsuite/ChangeLog:
> 2017-05-04  Pedro Alves  <palves@redhat.com>
> 
> 	* gdb.python/py-record-btrace-threads.exp (check_insn_for_thread):
> 	Add parens to print call for Python 3.
> ---
>  gdb/testsuite/ChangeLog                               | 5 +++++
>  gdb/testsuite/gdb.python/py-record-btrace-threads.exp | 4 ++--
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
> index 30b1b5d..b1f9694 100644
> --- a/gdb/testsuite/ChangeLog
> +++ b/gdb/testsuite/ChangeLog
> @@ -1,3 +1,8 @@
> +2017-05-04  Pedro Alves  <palves@redhat.com>
> +
> +	* gdb.python/py-record-btrace-threads.exp (check_insn_for_thread):
> +	Add parens to print call for Python 3.
> +
>  2017-05-04  Tim Wiederhake  <tim.wiederhake@intel.com>
> 
>  	* gdb.python/py-record-btrace.exp: Rename prev_sibling and
> next_sibling
> diff --git a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
> b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
> index 17fb5d0..2be73eb 100644
> --- a/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
> +++ b/gdb/testsuite/gdb.python/py-record-btrace-threads.exp
> @@ -69,8 +69,8 @@ proc check_insn_for_thread { self other } {
>      gdb_test_no_output "python f1calls = \{x for x in fch if x.symbol and
> x.symbol.name == \"func1\"\}"
>      gdb_test_no_output "python f2calls = \{x for x in fch if x.symbol and
> x.symbol.name == \"func2\"\}"
> 
> -    gdb_test "python print not f${self}calls" "False"
> -    gdb_test "python print not f${other}calls" "True"
> +    gdb_test "python print(not f${self}calls)" "False"
> +    gdb_test "python print(not f${other}calls)" "True"
>    }
>  }
> 
> --
> 2.5.5

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]