mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-28931 MTR prints detailed stack trace unconditionally
66832e3a
introduced change that prints core dumps in very detailed
format. That's completely out of user-friendliness but serves as a
measure for debugging hard-reproducible bugs.
The proper way to implement this:
1. it must be controlled by command-line and environment variable;
2. detailed traces must be default for buildbots only, for user
invocations normal stack traces should be printed.
Options for control are: MTR_PRINT_CORE and --print-core that accept
the following values:
no Don't print core
short Print stack trace of failed thread
medium Print stack traces of all threads
detailed Print all stack traces with debug context
custom:<code> Use debugger commands <code> to print stack trace
Default setting is: short (see env_or_default() call in pre_setup())
For environment variable wrong values are silently ignored (falls back
to default setting, see env_or_default()).
Command-line option --print-core (or -C) overrides environment
variable. Its default value is 'short' if not specified explicitly
(same env_or_default() call in pre_setup()). Explicit values are
checked for validity.
--print-method option can specify by which debugger we print
cores. For Windows there is only one choice: cdb. For Unix the values
are: gdb, dbx, lldb, auto. Default value is: auto
In 'auto' we try to use all possible debuggers until success.
This commit is contained in:
@ -1346,7 +1346,8 @@ sub command_line_setup {
|
||||
'skip-test-list=s' => \@opt_skip_test_list,
|
||||
'xml-report=s' => \$opt_xml_report,
|
||||
|
||||
My::Debugger::options()
|
||||
My::Debugger::options(),
|
||||
My::CoreDump::options()
|
||||
);
|
||||
|
||||
# fix options (that take an optional argument and *only* after = sign
|
||||
@ -1761,6 +1762,8 @@ sub command_line_setup {
|
||||
$opt_debug= 1;
|
||||
$debug_d= "d,query,info,error,enter,exit";
|
||||
}
|
||||
|
||||
My::CoreDump::pre_setup();
|
||||
}
|
||||
|
||||
|
||||
@ -5764,7 +5767,7 @@ sub usage ($) {
|
||||
|
||||
local $"= ','; # for @DEFAULT_SUITES below
|
||||
|
||||
print <<HERE . My::Debugger::help() . <<HERE;
|
||||
print <<HERE . My::Debugger::help() . My::CoreDump::help() . <<HERE;
|
||||
|
||||
$0 [ OPTIONS ] [ TESTCASE ]
|
||||
|
||||
|
Reference in New Issue
Block a user