Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Fred Fish <fnf@specifix.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: Don't kill the program after "file"
Date: Thu, 10 Aug 2006 20:08:00 -0000	[thread overview]
Message-ID: <200608101513.08872.fnf@specifix.com> (raw)
In-Reply-To: <20060801221105.GA22931@nevyn.them.org>

On Tuesday 01 August 2006 18:11, Daniel Jacobowitz wrote:
> As it happens I have patches for a similar issue with target
> extended-remote.  The remote patches are substantial, but I can
> probably break out the simulator related bits.  I'll try to do that.

Here's the patch I'm temporarily using to allow me to continue build
and testing toolchains with the simulators.

-Fred

Index: gdb/gdb/testsuite/lib/gdb.exp
===================================================================
RCS file: /cvsroots/latest/src/gdb/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.1.1.6
diff -u -p -r1.1.1.6 gdb.exp
--- gdb/gdb/testsuite/lib/gdb.exp	31 Jul 2006 20:28:17 -0000	1.1.1.6
+++ gdb/gdb/testsuite/lib/gdb.exp	7 Aug 2006 10:33:19 -0000
@@ -1017,6 +1017,9 @@ proc gdb_file_cmd { arg } {
 	    verbose "\t\tKilling previous program being debugged"
 	    exp_continue
 	}
+	-re "The program is not being run.*$gdb_prompt $" {
+	    # OK.
+	}
 	-re "$gdb_prompt $" {
 	    # OK.
 	}
@@ -1024,6 +1027,11 @@ proc gdb_file_cmd { arg } {
 
     send_gdb "file $arg\n"
     gdb_expect 120 {
+	-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\tKilling previous program being debugged"
+	    exp_continue
+	}
 	-re "Reading symbols from.*no debugging symbols found.*done.*$gdb_prompt $" {
 	    verbose "\t\tLoaded $arg into the $GDB with no debugging symbols"
 	    set gdb_file_cmd_debug_info "nodebug"



  reply	other threads:[~2006-08-10 19:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-01 20:17 Fred Fish
2006-08-01 22:11 ` Daniel Jacobowitz
2006-08-10 20:08   ` Fred Fish [this message]
2006-08-17 18:48   ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2006-06-13 20:50 Daniel Jacobowitz
2006-06-14 19:55 ` Jim Blandy
2006-06-14 20:06 ` Jim Blandy
2006-06-26 19:00   ` Kevin Buettner
2006-07-12 20:16     ` Daniel Jacobowitz
2006-07-24 20:36       ` Daniel Jacobowitz

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=200608101513.08872.fnf@specifix.com \
    --to=fnf@specifix.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /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