]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
testsuite: Update py-mi-objfile to expect console format print
authorCatalin Udma <catalin.udma@freescale.com>
Tue, 5 Apr 2016 09:55:14 +0000 (12:55 +0300)
committerCatalin Udma <catalin.udma@freescale.com>
Wed, 6 Apr 2016 06:39:16 +0000 (09:39 +0300)
Starting with this commit:

  commit e7ea3ec7c623be0b9be1eaf4929794652a84be11
  Author: Catalin Udma <catalin.udma@freescale.com>
  Date:   Mon Feb 29 16:16:19 2016 +0200

    python: Use console format for output of gdb.execute command

the python script would use console format for gdb.execute output.
This patch fixes py-mi-objfile to expect the console format when is
checking for gdb.execute printing.

gdb/testsuite/ChangeLog:
2016-04-05  Catalin Udma  <catalin.udma@freescale.com>

        * gdb.python/py-mi-objfile-gdb.py: Use "list main" command.
        * gdb.python/py-mi-objfile.exp: Match "list main" output
        in console format.

Signed-off-by: Catalin Udma <catalin.udma@freescale.com>
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-mi-objfile-gdb.py
gdb/testsuite/gdb.python/py-mi-objfile.exp

index 222e2f5970ac9b2ae35f65ea771f44d0dad95ec3..27806a06eb7902c4db1af661962246335404010c 100644 (file)
@@ -1,3 +1,9 @@
+2016-04-05  Catalin Udma  <catalin.udma@freescale.com>
+
+       * gdb.python/py-mi-objfile-gdb.py: Use "list main" command.
+       * gdb.python/py-mi-objfile.exp: Match "list main" output
+       in console format.
+
 2016-04-05  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * gdb.arch/ftrace-insn-reloc.exp: Check for IPA basename instead of
index 492d71cadc69af0ecd6a980e79401430e04fcdaa..2c7f96d8bda66df25163f6a6f5be43bb468f7256 100644 (file)
@@ -22,6 +22,5 @@ import gdb
 # This will create one for to_string=True and then another for the
 # parameter change notification.
 gdb.execute("set width 101", to_string=True)
-# And finally a command that will use the original MI stream, which in a
-# buggy gdb will use just-freed data.
-gdb.execute("list")
+# And finally a command that will use the console stream without redirection
+gdb.execute("list main")
index 073e4d9184d4c220b814729d66039026524f2b20..bfa43a215e72d8030476f549222cef2716f8e44f 100644 (file)
@@ -53,5 +53,6 @@ if [is_remote host] {
 
 # PR 18833.  This will cause an unpatched gdb to crash.
 mi_gdb_test "-file-exec-and-symbols ${filename}" \
-    ".*\\^done,line=.*${srcfile}\"" \
+    ".*main \\(.*void\\).*\
+    return 0;.*\\^done" \
     "file-exec-and-symbols operation"