This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Make "info proc cmdline" show args on GNU/Linux


On 2018-03-22 05:04, Andreas Arnez wrote:

+# 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 { ! [target_info exists use_gdb_stub] } {

The use_gdb_stub proc from lib/gdb.exp should be used instead (its comment
explains why).

Ah, OK.  There are still some occurrences of "target_info exists
use_gdb_stub" in the test suite.  Should these be replaced as well?

Yes, they probably should.


+    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\'"

The backslashes are unnecessary.

Right.

Thanks for your review.  Pushed with these fixes.

Thanks!

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]