3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-25 13:29:29 +01:00

compiler_vm: guest-gdb no longer attempts to print undefined functions

This commit is contained in:
Pragmatic Software 2022-02-08 12:12:32 -08:00
parent 871327efb2
commit 1c010fe223

View File

@ -310,7 +310,7 @@ sub get_backtrace($context) {
# returns the source line at a given line number # returns the source line at a given line number
sub get_lineno($context, $lineno) { sub get_lineno($context, $lineno) {
my $console = gdb_send_and_read_console($context, "list $lineno,$lineno"); my $console = gdb_send_and_read_console($context, "list $lineno,$lineno", 0);
my $line; my $line;
@ -465,9 +465,10 @@ sub handle_program_signal($context, $data) {
my $line; my $line;
if (exists $data->{frame}->{line}) { if (exists $data->{frame}->{line}) {
$line = get_lineno($context, $data->{frame}->{line}); if ($line = get_lineno($context, $data->{frame}->{line})) {
$text .= "at statement: $line "; $text .= "at statement: $line ";
} }
}
my $backtrace = get_backtrace($context); my $backtrace = get_backtrace($context);
@ -484,7 +485,7 @@ sub handle_program_signal($context, $data) {
} }
} }
$text .= "called by $trace->{func} $trace->{args} "; $text .= "called by $trace->{func} $trace->{args} " if $trace->{func};
$text .= "at statement: $line " if $line; $text .= "at statement: $line " if $line;
} }