Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
32d45425
Commit
32d45425
authored
Mar 12, 2012
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
3886fdf0
8245178f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
12 deletions
+8
-12
mysys/stacktrace.c
mysys/stacktrace.c
+7
-11
sql/signal_handler.cc
sql/signal_handler.cc
+1
-1
No files found.
mysys/stacktrace.c
View file @
32d45425
...
...
@@ -685,7 +685,7 @@ void my_print_stacktrace(uchar* unused1, ulong unused2)
&
(
package
.
sym
));
have_source
=
pSymGetLineFromAddr64
(
hProcess
,
addr
,
&
line_offset
,
&
line
);
my_safe_printf_stderr
(
"%p "
,
addr
);
fprintf
(
stderr
,
"%p "
,
addr
);
if
(
have_module
)
{
char
*
base_image_name
=
strrchr
(
module
.
ImageName
,
'\\'
);
...
...
@@ -693,13 +693,12 @@ void my_print_stacktrace(uchar* unused1, ulong unused2)
base_image_name
++
;
else
base_image_name
=
module
.
ImageName
;
my_safe_printf_stderr
(
"%s!"
,
base_image_name
);
fprintf
(
stderr
,
"%s!"
,
base_image_name
);
}
if
(
have_symbol
)
my_safe_printf_stderr
(
"%s()"
,
package
.
sym
.
Name
);
fprintf
(
stderr
,
"%s()"
,
package
.
sym
.
Name
);
else
if
(
have_module
)
my_safe_printf_stderr
(
"%s"
,
"???"
);
fprintf
(
stderr
,
"%s"
,
"???"
);
if
(
have_source
)
{
...
...
@@ -708,10 +707,10 @@ void my_print_stacktrace(uchar* unused1, ulong unused2)
base_file_name
++
;
else
base_file_name
=
line
.
FileName
;
my_safe_printf_stderr
(
"[%s:%u]"
,
fprintf
(
stderr
,
"[%s:%u]"
,
base_file_name
,
line
.
LineNumber
);
}
my_safe_printf_stderr
(
"%s"
,
"
\n
"
);
fprintf
(
stderr
,
"%s"
,
"
\n
"
);
}
}
...
...
@@ -785,10 +784,7 @@ void my_safe_print_str(const char *val, int len)
#ifdef __WIN__
size_t
my_write_stderr
(
const
void
*
buf
,
size_t
count
)
{
DWORD
bytes_written
;
SetFilePointer
(
GetStdHandle
(
STD_ERROR_HANDLE
),
0
,
NULL
,
FILE_END
);
WriteFile
(
GetStdHandle
(
STD_ERROR_HANDLE
),
buf
,
count
,
&
bytes_written
,
NULL
);
return
bytes_written
;
return
fwrite
(
buf
,
1
,
count
,
stderr
);
}
#else
size_t
my_write_stderr
(
const
void
*
buf
,
size_t
count
)
...
...
sql/signal_handler.cc
View file @
32d45425
...
...
@@ -72,7 +72,7 @@ extern "C" sig_handler handle_fatal_signal(int sig)
curr_time
=
my_time
(
0
);
localtime_r
(
&
curr_time
,
&
tm
);
my_safe_printf_stderr
(
"%02d%02d%02d %2d:%02d:%02d "
,
fprintf
(
stderr
,
"%02d%02d%02d %2d:%02d:%02d "
,
tm
.
tm_year
%
100
,
tm
.
tm_mon
+
1
,
tm
.
tm_mday
,
tm
.
tm_hour
,
tm
.
tm_min
,
tm
.
tm_sec
);
if
(
opt_expect_abort
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment