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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
d9e0a4b7
Commit
d9e0a4b7
authored
Sep 17, 2008
by
Tatiana A. Nurnberg
Browse files
Options
Browse Files
Download
Plain Diff
auto-merge
parents
a89d13a7
fd70d5e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
sql/stacktrace.c
sql/stacktrace.c
+10
-5
No files found.
sql/stacktrace.c
View file @
d9e0a4b7
...
@@ -391,7 +391,12 @@ static void get_symbol_path(char *path, size_t size)
...
@@ -391,7 +391,12 @@ static void get_symbol_path(char *path, size_t size)
if
(
!
strstr
(
path
,
module_dir
))
if
(
!
strstr
(
path
,
module_dir
))
{
{
strncat
(
path
,
module_dir
,
size
);
size_t
dir_len
=
strlen
(
module_dir
);
if
(
size
>
dir_len
)
{
strncat
(
path
,
module_dir
,
size
-
1
);
size
-=
dir_len
;
}
}
}
}
}
CloseHandle
(
hSnap
);
CloseHandle
(
hSnap
);
...
@@ -399,9 +404,9 @@ static void get_symbol_path(char *path, size_t size)
...
@@ -399,9 +404,9 @@ static void get_symbol_path(char *path, size_t size)
/* Add _NT_SYMBOL_PATH, if present. */
/* Add _NT_SYMBOL_PATH, if present. */
envvar
=
getenv
(
"_NT_SYMBOL_PATH"
);
envvar
=
getenv
(
"_NT_SYMBOL_PATH"
);
if
(
envvar
)
if
(
envvar
&&
size
)
{
{
strncat
(
path
,
envvar
,
size
);
strncat
(
path
,
envvar
,
size
-
1
);
}
}
}
}
...
@@ -423,7 +428,7 @@ void print_stacktrace(gptr unused1, ulong unused2)
...
@@ -423,7 +428,7 @@ void print_stacktrace(gptr unused1, ulong unused2)
int
i
;
int
i
;
CONTEXT
context
;
CONTEXT
context
;
STACKFRAME64
frame
=
{
0
};
STACKFRAME64
frame
=
{
0
};
static
char
symbol_path
[
MAX_SYMBOL_PATH
+
1
];
static
char
symbol_path
[
MAX_SYMBOL_PATH
];
if
(
!
exception_ptrs
||
!
init_dbghelp_functions
())
if
(
!
exception_ptrs
||
!
init_dbghelp_functions
())
return
;
return
;
...
@@ -432,7 +437,7 @@ void print_stacktrace(gptr unused1, ulong unused2)
...
@@ -432,7 +437,7 @@ void print_stacktrace(gptr unused1, ulong unused2)
context
=
*
(
exception_ptrs
->
ContextRecord
);
context
=
*
(
exception_ptrs
->
ContextRecord
);
/*Initialize symbols.*/
/*Initialize symbols.*/
pSymSetOptions
(
SYMOPT_LOAD_LINES
|
SYMOPT_NO_PROMPTS
|
SYMOPT_DEFERRED_LOADS
|
SYMOPT_DEBUG
);
pSymSetOptions
(
SYMOPT_LOAD_LINES
|
SYMOPT_NO_PROMPTS
|
SYMOPT_DEFERRED_LOADS
|
SYMOPT_DEBUG
);
get_symbol_path
(
symbol_path
,
MAX_SYMBOL_PATH
);
get_symbol_path
(
symbol_path
,
sizeof
(
symbol_path
)
);
pSymInitialize
(
hProcess
,
symbol_path
,
TRUE
);
pSymInitialize
(
hProcess
,
symbol_path
,
TRUE
);
/*Prepare stackframe for the first StackWalk64 call*/
/*Prepare stackframe for the first StackWalk64 call*/
...
...
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