Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFC] gdb.base/args.exp: Invoke gdb_load for simulator targets
Date: Wed, 16 Apr 2003 20:32:00 -0000	[thread overview]
Message-ID: <1030416203234.ZM26966@localhost.localdomain> (raw)
In-Reply-To: Kevin Buettner <kevinb@redhat.com> "[RFC] gdb.base/args.exp: Invoke gdb_load for simulator targets" (Apr  8,  3:27pm)

I ended up committing the following patch.  (My original patch modified
some rexexps to match extra output after program exit in a simulator.  The
patch below does not do this.)

	* gdb.base/args.exp: Invoke gdb_load for simulator targets.

Index: gdb.base/args.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/args.exp,v
retrieving revision 1.5
diff -u -p -r1.5 args.exp
--- gdb.base/args.exp	20 Mar 2003 14:42:15 -0000	1.5
+++ gdb.base/args.exp	16 Apr 2003 20:28:52 -0000
@@ -31,6 +31,15 @@ if [target_info exists noargs] {
     return;
 }
 
+# No loading needs to be done when the target is `exec'.  Some targets
+# require that the program be loaded, however.
+proc args_load {} {
+    global binfile
+    if [target_info exists is_simulator] {
+	gdb_load ${binfile}
+    }
+}
+
 set testfile "args"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
@@ -47,6 +56,7 @@ set GDBFLAGS "--args $binfile 1 3"
 gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
+args_load
 gdb_test "run" \
 	"Starting program.*args(\\.exe)? 1 3.*3\r\n.*args\r\n1\r\n3.*Program exited normally." \
 	"correct args printed"
@@ -58,6 +68,7 @@ set GDBFLAGS "--args $binfile 1 '' 3"
 gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
+args_load
 gdb_test "run" \
 	"Starting program.*args(\\.exe)? 1 \\\\'\\\\' 3.*4\r\n.*args\r\n1\r\n''\r\n3.*Program exited normally." \
 	"correct args printed, one empty"
@@ -69,6 +80,7 @@ set GDBFLAGS "--args $binfile 1 '' '' 3"
 gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
+args_load
 gdb_test "run" \
 	"Starting program.*args(\\.exe)? 1 \\\\'\\\\' \\\\'\\\\' 3.*5\r\n.*args\r\n1\r\n''\r\n''\r\n3.*Program exited normally." \
 	"correct args printed, two empty"


      parent reply	other threads:[~2003-04-16 20:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-08 22:27 Kevin Buettner
2003-04-08 22:44 ` Elena Zannoni
2003-04-09 14:21 ` Andrew Cagney
2003-04-09 16:07   ` Kevin Buettner
2003-04-09 16:15     ` Andrew Cagney
2003-04-13 19:46       ` Michael Snyder
2003-04-15  1:41         ` Elena Zannoni
2003-04-16 20:32 ` Kevin Buettner [this message]

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=1030416203234.ZM26966@localhost.localdomain \
    --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