From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFC] Add another "Are you sure..." case to gdb_unload in lib/gdb.exp
Date: Sat, 14 Jul 2007 01:41:00 -0000 [thread overview]
Message-ID: <20070713182535.3af63443@ironwood.lan> (raw)
During my recent testing of a mep-elf toolchain, I ran across a problem
in gdb.base/opaque.exp (and perhaps some other tests too) in which
GDB asks "Are you sure you want to change the file?" The test
machinery is not expecting this message from GDB and ends up getting
hopelessly confused.
Here's a bit of the log file from gdb.base/opaque.exp which demonstrates
this confusion:
(gdb) PASS: gdb.base/opaque.exp: ptype on opaque struct tagname (statically)
dir
Reinitialize source path to empty? (y or n) y
Source directories searched: $cdir:$cwd
(gdb) dir /ironwood1/toshmep-070403-branch/mep-elf/bld/../../devo/gdb/testsuite/ \rgdb.base
Source directories searched: /ironwood1/toshmep-070403-branch/mep-elf/bld/../../devo/gdb/testsuite/gdb.base:$cdir:$cwd
(gdb) file
A program is being debugged already.
Are you sure you want to change the file? (y or n) ERROR: couldn't unload file in /ironwood1/toshmep-070403-branch/mep-elf/bld/gdb/testsuite/../../gdb/gdb (timed out).
kill
Please answer y or n.
A program is being debugged already.
Are you sure you want to change the file? (y or n) file /ironwood1/toshmep-070403-branch/mep-elf/bld/gdb/testsuite/gdb.base/opaque
Please answer y or n.
A program is being debugged already.
Are you sure you want to change the file? (y or n) ERROR: couldn't load /ironwood1/toshmep-070403-branch/mep-elf/bld/gdb/testsuite/gdb.base/opaque into /ironwood1/toshmep-070403-branch/mep-elf/bld/gdb/testsuite/../../gdb/gdb (timed out).
delete breakpoints
Please answer y or n.
A program is being debugged already.
Are you sure you want to change the file? (y or n) ERROR: Delete all breakpoints in delete_breakpoints (timeout)
break main
Please answer y or n.
A program is being debugged already.
Are you sure you want to change the file? (y or n) UNRESOLVED: gdb.base/opaque.exp: setting breakpoint at main (timeout)
ERROR: cannot run to breakpoint at main
ERROR: Got interactive prompt.
UNRESOLVED: gdb.base/opaque.exp: whatis on opaque struct pointer (dynamically)
ERROR: Got interactive prompt.
...
My patch below adds a suitable case to gdb_unload in lib/gdb.exp.
Comments?
* lib/gdb.exp (gdb_unload): Add case which checks for GDB's
"Are you sure you want to change the file?" message.
Index: ./testsuite/lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.83
diff -u -p -r1.83 gdb.exp
--- ./testsuite/lib/gdb.exp 2 Jul 2007 21:29:28 -0000 1.83
+++ ./testsuite/lib/gdb.exp 14 Jul 2007 01:11:25 -0000
@@ -133,6 +133,11 @@ proc gdb_unload {} {
verbose "\t\tKilling previous program being debugged"
exp_continue
}
+ -re "A program is being debugged already..*Are you sure you want to change the file.*y or n. $"\
+ { send_gdb "y\n"
+ verbose "\t\tChanging the file being debugged"
+ exp_continue
+ }
-re "Discard symbol table from .*y or n.*$" {
send_gdb "y\n"
exp_continue
next reply other threads:[~2007-07-14 1:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-14 1:41 Kevin Buettner [this message]
2007-07-14 5:16 ` Daniel Jacobowitz
2007-07-15 1:01 ` Kevin Buettner
2007-07-19 0:45 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070713182535.3af63443@ironwood.lan \
--to=kevinb@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox