mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-18 06:20:41 +01:00
pbot-vm: guest-gdb: fix potential undefined $start
when optimizations are enabled
This commit is contained in:
parent
47d8f5724a
commit
224a00949a
@ -292,8 +292,16 @@ sub get_main_start_end($context) {
|
|||||||
|
|
||||||
my ($line, $code) = split /\t/, $output->{_text};
|
my ($line, $code) = split /\t/, $output->{_text};
|
||||||
|
|
||||||
# this line isn't part of main() yet
|
if (not defined $start) {
|
||||||
next if $line < $start;
|
# info functions didn't work, try to find main
|
||||||
|
if ($code =~ /main\s*\(/) {
|
||||||
|
$start = $line;
|
||||||
|
}
|
||||||
|
next;
|
||||||
|
} else {
|
||||||
|
# this line isn't part of main() yet
|
||||||
|
next if $line < $start;
|
||||||
|
}
|
||||||
|
|
||||||
# blank out contents of string and char literals so we don't count
|
# blank out contents of string and char literals so we don't count
|
||||||
# any braces within
|
# any braces within
|
||||||
|
@ -25,8 +25,8 @@ use PBot::Imports;
|
|||||||
# These are set by the /misc/update_version script
|
# These are set by the /misc/update_version script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 4616,
|
BUILD_REVISION => 4617,
|
||||||
BUILD_DATE => "2023-02-02",
|
BUILD_DATE => "2023-02-09",
|
||||||
};
|
};
|
||||||
|
|
||||||
sub initialize {}
|
sub initialize {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user