Fix VERILATOR_GDB being ignored, msg2860.

This commit is contained in:
Wilson Snyder 2019-02-12 18:20:40 -05:00
parent 27fa19eb94
commit 42759e4011
3 changed files with 4 additions and 2 deletions

View File

@ -6,6 +6,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
*** Add +verilator+seed, bug1396. [Stan Sokorac]
**** Fix VERILATOR_GDB being ignored, msg2860. [Yu Sheng Lin]
* Verilator 4.010 2019-01-27

View File

@ -85,7 +85,7 @@ if ($opt_gdbbt && !gdb_works()) {
my @quoted_sw = map {sh_escape($_)} @Opt_Verilator_Sw;
if ($opt_gdb) {
# Generic GDB interactive
run (("gdb"||$ENV{VERILATOR_GDB})
run (($ENV{VERILATOR_GDB}||"gdb")
." ".verilator_bin()
# Note, uncomment to set breakpoints before running:
# ." -ex 'break main'"

View File

@ -900,7 +900,7 @@ sub execute {
$param{executable} ||= "$self->{obj_dir}/$param{VM_PREFIX}";
$self->_run(logfile=>"$self->{obj_dir}/vlt_sim.log",
cmd=>[($run_env
.($opt_gdbsim ? ("gdb"||$ENV{VERILATOR_GDB})." " : "")
.($opt_gdbsim ? ($ENV{VERILATOR_GDB}||"gdb")." " : "")
.$param{executable}
.($opt_gdbsim ? " -ex 'run " : "")),
@{$param{all_run_flags}},