From 2c44ab61aceac77bfcc19cc50283df8b475a1f04 Mon Sep 17 00:00:00 2001 From: Sebastien Van Cauwenberghe Date: Wed, 10 Jul 2019 06:46:44 -0400 Subject: [PATCH] Fix GDB returning wrong error code on Fedora 30 Signed-off-by: Wilson Snyder --- bin/verilator | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/verilator b/bin/verilator index 3846f53cb..50a2208fc 100755 --- a/bin/verilator +++ b/bin/verilator @@ -100,7 +100,7 @@ if ($opt_gdb) { ." --batch --quiet --return-child-result" ." -ex \"run ".join(' ', @quoted_sw)."\"" ." -ex 'set width 0'" - ." -ex 'bt'"); + ." -ex 'bt' -ex 'quit'"); } else { # Normal, non gdb run(verilator_bin()." ".join(' ',@quoted_sw)); @@ -159,7 +159,8 @@ sub gdb_works { ." --batch-silent --quiet --return-child-result" ." -ex 'run -n'" # `echo -n` ." -ex 'set width 0'" - ." -ex 'bt'"); + ." -ex 'bt'" + ." -ex 'quit'"); my $status = $?; return $status==0; }