When set gdbserver debug is sent to the a file in the test output directory.
It should be set to a comma separated list of the following options:
- debug - write gdbserver debug to gdbserver.debug.
- remote - write gdbserver remote debug to gdbserver.debug.
+ debug-all - write gdbserver debug for threads remote and event-loop.
+ debug-threads - write gdbserver threads debug to gdbserver.debug.
+ debug-remote - write gdbserver remote debug to gdbserver.debug.
+ debug-event-loop - write gdbserver event-loog debug to gdbserver.debug.
replay - write a replay log to the file gdbserver.replay for use
with gdbreplay.
-Alternatively, it can be set to "all" to turn on all the above
-For example, to turn on gdbserver debugging, you can do:
+Alternatively, it can be set to "all" to turn on all the above, e.g.:
- make check GDBSERVER_DEBUG="debug,replay"
+ make check GDBSERVER_DEBUG="all"
+
+To turn on all --debug gdbserver parameter options but without replay logging,
+use the following:
+
+ make check GDBSERVER_DEBUG="debug-all"
+
+To turn on gdbserver debugging for all remote debug and replay logging,
+you can do:
+
+ make check GDBSERVER_DEBUG="debug-remote, replay"
+
+Note that the GDBSERVER_DEBUG options are not equivalent to the gdbserver
+parameter options of "--debug", as also the replay logging is supported.
GDB_TARGET_USERNAME
GDB_HOST_USERNAME
set enabled 0
foreach entry [split $gdbserverdebug ,] {
switch -- $entry {
- "debug" {
- append gdbserver_command " --debug"
+ "debug-all" {
+ append gdbserver_command " --debug=all"
set enabled 1
}
- "remote" {
- append gdbserver_command " --remote-debug"
+ "all" {
+ # Different from the debug-all option, all argument sets
+ # the replay log file. See gdb_debug_init.
+ append gdbserver_command " --debug=all"
+ set enabled 1
+ }
+ "debug-threads" {
+ append gdbserver_command " --debug=threads"
+ set enabled 1
+ }
+ "debug-remote" {
+ append gdbserver_command " --debug=remote"
+ set enabled 1
+ }
+ "debug-event-loop" {
+ append gdbserver_command " --debug=event-loop"
set enabled 1
}
}
}
}
- # Expand the all option
- if { $gdbserverdebug == "all" } {
- set gdbserverdebug "debug,remote,replay"
- }
-
# Ensure it is not empty.
return [expr { $gdbserverdebug != "" }]
}
if [gdbserver_debug_enabled] {
foreach entry [split $gdbserverdebug ,] {
- if { $entry == "replay" } {
+ if { $entry == "replay" || $entry == "all"} {
set replayfile [standard_output_file_with_gdb_instance gdbserver.replay]
send_gdb "set remotelogfile $replayfile\n" optional
gdb_expect 10 {