This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] testsuite: Update py-mi-objfile to expect console format print
- From: Catalin Udma <catalin dot udma at freescale dot com>
- To: <gdb-patches at sourceware dot org>
- Cc: Catalin Udma <catalin dot udma at freescale dot com>
- Date: Tue, 5 Apr 2016 13:14:50 +0300
- Subject: [PATCH] testsuite: Update py-mi-objfile to expect console format print
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none;freescale.mail.onmicrosoft.com; dmarc=none action=none header.from=freescale.com;
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-gdb.exp: Match "list main"
output in console format.
Signed-off-by: Catalin Udma <catalin.udma@freescale.com>
---
gdb/testsuite/gdb.python/py-mi-objfile-gdb.py | 2 +-
gdb/testsuite/gdb.python/py-mi-objfile.exp | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.python/py-mi-objfile-gdb.py b/gdb/testsuite/gdb.python/py-mi-objfile-gdb.py
index 492d71c..ff1d983 100644
--- a/gdb/testsuite/gdb.python/py-mi-objfile-gdb.py
+++ b/gdb/testsuite/gdb.python/py-mi-objfile-gdb.py
@@ -24,4 +24,4 @@ import gdb
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")
+gdb.execute("list main")
diff --git a/gdb/testsuite/gdb.python/py-mi-objfile.exp b/gdb/testsuite/gdb.python/py-mi-objfile.exp
index 073e4d9..bfa43a2 100644
--- a/gdb/testsuite/gdb.python/py-mi-objfile.exp
+++ b/gdb/testsuite/gdb.python/py-mi-objfile.exp
@@ -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"
--
1.9.2