Skip to content

Commit 72c7f21

Browse files
committed
ri5cy: Allow gdbserver command override with env variable
This allows an alternative gdbserver command to be used when running the tests. testsuite/ChangeLog: * config/ri5cyverilator.exp (beebs_load): Pick up GDBSERVER_CMD environment variable if set.
1 parent e100569 commit 72c7f21

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

testsuite/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2019-04-24 Edward Jones <ed.jones@embecosm.com>
2+
3+
* config/ri5cyverilator.exp (beebs_load): Pick up
4+
GDBSERVER_CMD environment variable if set.
5+
16
2019-04-23 Edward Jones <ed.jones@embecosm.com>
27

38
* config/ri5cyverilator.exp (beebs_load): Check for

testsuite/config/ri5cyverilator.exp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ set_board_info beebs,benchmarks "$env(BENCHMARKS)"
2323

2424
proc beebs_load { file } {
2525
set GDB riscv32-unknown-elf-gdb
26-
set GDB_SERVER riscv32-gdbserver
26+
set GDBSERVER_CMD "riscv32-gdbserver -c ri5cy --stdin"
27+
28+
# Maybe override the gdbserver command with an environment variable
29+
if { [llength [array names ::env GDBSERVER_CMD]] > 0 } {
30+
set GDBSERVER_CMD $::env(GDBSERVER_CMD)
31+
verbose "GDBSERVER_CMD set to $GDBSERVER_CMD"
32+
}
2733

2834
# Launch GDB, the target, and start running.
2935
#
@@ -37,7 +43,7 @@ proc beebs_load { file } {
3743
# We set all required breakpoints here then begin execution.
3844
spawn $GDB --interpreter=mi -ex "set height 0" \
3945
-ex "file $file" \
40-
-ex "target remote | $GDB_SERVER -c ri5cy --stdin" \
46+
-ex "target remote | $GDBSERVER_CMD" \
4147
-ex "stepi" \
4248
-ex "stepi" \
4349
-ex "load" \

0 commit comments

Comments
 (0)