diff options
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/info-proc.exp | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ca0dadf..bbd0991 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com> + + * gdb.base/info-proc.exp: Add test for "info proc cmdline". + 2018-03-20 Stephen Roberts <stephen.roberts@arm.com> * gdb.perf/template-breakpoints.cc: New file. diff --git a/gdb/testsuite/gdb.base/info-proc.exp b/gdb/testsuite/gdb.base/info-proc.exp index 72355bf..7dbf740 100644 --- a/gdb/testsuite/gdb.base/info-proc.exp +++ b/gdb/testsuite/gdb.base/info-proc.exp @@ -38,6 +38,16 @@ gdb_test_multiple "info proc" "info proc without a process" { } } +# Set command line arguments to be verified later with "info proc +# cmdline". However, if we're using a stub, then "set args" would not +# have any effect, so then just skip this. + +set cmdline "" +if { ! [use_gdb_stub] } { + set cmdline "-i foo bar -o baz 1234" + gdb_test_no_output "set args $cmdline" "set args" +} + if { ! [ runto_main ] } then { untested "could not run to main" return -1 @@ -50,6 +60,9 @@ gdb_test "info proc mapping" \ "info proc mapping" if {[istarget "*-*-linux*"]} { + if { $cmdline != "" } { + gdb_test "info proc cmdline" "cmdline = '.* $cmdline'" + } set gcorefile [standard_output_file $testfile.gcore] if {[gdb_gcore_cmd $gcorefile "save a core file"]} { clean_restart $binfile |