mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Produce better diagnostics when backtrace attempt fails
This commit is contained in:
parent
923d7d0ad2
commit
b3dac63f9b
1 changed files with 12 additions and 2 deletions
|
@ -53,9 +53,19 @@ sub _verify_binpath {
|
|||
sub _gdb {
|
||||
my ($core_name)= @_;
|
||||
|
||||
print "\nTrying 'gdb' to get a backtrace\n";
|
||||
# Check that gdb exists
|
||||
`gdb --version`;
|
||||
if ($?) {
|
||||
print "gdb not found, cannot get the stack trace\n";
|
||||
return;
|
||||
}
|
||||
|
||||
return unless -f $core_name;
|
||||
if (-f $core_name) {
|
||||
print "\nTrying 'gdb' to get a backtrace from coredump $core_name\n";
|
||||
} else {
|
||||
print "\nCoredump $core_name does not exist, cannot run 'gdb'\n";
|
||||
return;
|
||||
}
|
||||
|
||||
# Find out name of binary that generated core
|
||||
`gdb -c '$core_name' --batch 2>&1` =~
|
||||
|
|
Loading…
Reference in a new issue