3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-05 03:29:33 +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
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;
@ -465,8 +465,9 @@ sub handle_program_signal($context, $data) {
my $line;
if (exists $data->{frame}->{line}) {
$line = get_lineno($context, $data->{frame}->{line});
$text .= "at statement: $line ";
if ($line = get_lineno($context, $data->{frame}->{line})) {
$text .= "at statement: $line ";
}
}
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;
}