mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
Do not link /usr/lib/debug/* on Debian <=3.1, as it causes broken stack
traces in Valgrind (broken libc6-dbg). Installing libc6-dbg on Debian will still provide proper bactraces, even without setting LD_LIBRARY_PATH explicitly.
This commit is contained in:
@@ -13,6 +13,8 @@ sub mtr_tofile ($@);
|
||||
sub mtr_tonewfile($@);
|
||||
sub mtr_lastlinefromfile($);
|
||||
sub mtr_appendfile_to_file ($$);
|
||||
sub mtr_grab_file($);
|
||||
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -128,6 +130,7 @@ sub unspace {
|
||||
return "$quote$string$quote";
|
||||
}
|
||||
|
||||
# Read a whole file, stripping leading and trailing whitespace.
|
||||
sub mtr_fromfile ($) {
|
||||
my $file= shift;
|
||||
|
||||
@@ -181,5 +184,16 @@ sub mtr_appendfile_to_file ($$) {
|
||||
close TOFILE;
|
||||
}
|
||||
|
||||
# Read a whole file verbatim.
|
||||
sub mtr_grab_file($) {
|
||||
my $file= shift;
|
||||
open(FILE, '<', $file)
|
||||
or return undef;
|
||||
local $/= undef;
|
||||
my $data= scalar(<FILE>);
|
||||
close FILE;
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
Reference in New Issue
Block a user