* gdb.base/args.exp: Invoke gdb_load for simulator targets.
This commit is contained in:
parent
3fe60e3c14
commit
c8c4d8dcfb
2 changed files with 16 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2003-04-16 Kevin Buettner <kevinb@redhat.com>
|
||||||
|
|
||||||
|
* gdb.base/args.exp: Invoke gdb_load for simulator targets.
|
||||||
|
|
||||||
2003-04-16 Elena Zannoni <ezannoni@redhat.com>
|
2003-04-16 Elena Zannoni <ezannoni@redhat.com>
|
||||||
|
|
||||||
* gdb.base/completion.exp: Make 'info func mark' complete on 'info
|
* gdb.base/completion.exp: Make 'info func mark' complete on 'info
|
||||||
|
|
|
@ -31,6 +31,15 @@ if [target_info exists noargs] {
|
||||||
return;
|
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 testfile "args"
|
||||||
set srcfile ${testfile}.c
|
set srcfile ${testfile}.c
|
||||||
set binfile ${objdir}/${subdir}/${testfile}
|
set binfile ${objdir}/${subdir}/${testfile}
|
||||||
|
@ -47,6 +56,7 @@ set GDBFLAGS "--args $binfile 1 3"
|
||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
args_load
|
||||||
gdb_test "run" \
|
gdb_test "run" \
|
||||||
"Starting program.*args(\\.exe)? 1 3.*3\r\n.*args\r\n1\r\n3.*Program exited normally." \
|
"Starting program.*args(\\.exe)? 1 3.*3\r\n.*args\r\n1\r\n3.*Program exited normally." \
|
||||||
"correct args printed"
|
"correct args printed"
|
||||||
|
@ -58,6 +68,7 @@ set GDBFLAGS "--args $binfile 1 '' 3"
|
||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
args_load
|
||||||
gdb_test "run" \
|
gdb_test "run" \
|
||||||
"Starting program.*args(\\.exe)? 1 \\\\'\\\\' 3.*4\r\n.*args\r\n1\r\n''\r\n3.*Program exited normally." \
|
"Starting program.*args(\\.exe)? 1 \\\\'\\\\' 3.*4\r\n.*args\r\n1\r\n''\r\n3.*Program exited normally." \
|
||||||
"correct args printed, one empty"
|
"correct args printed, one empty"
|
||||||
|
@ -69,6 +80,7 @@ set GDBFLAGS "--args $binfile 1 '' '' 3"
|
||||||
gdb_exit
|
gdb_exit
|
||||||
gdb_start
|
gdb_start
|
||||||
gdb_reinitialize_dir $srcdir/$subdir
|
gdb_reinitialize_dir $srcdir/$subdir
|
||||||
|
args_load
|
||||||
gdb_test "run" \
|
gdb_test "run" \
|
||||||
"Starting program.*args(\\.exe)? 1 \\\\'\\\\' \\\\'\\\\' 3.*5\r\n.*args\r\n1\r\n''\r\n''\r\n3.*Program exited normally." \
|
"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"
|
"correct args printed, two empty"
|
||||||
|
|
Loading…
Reference in a new issue