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
8d10051b
Commit
8d10051b
authored
Sep 17, 2008
by
Tatiana A. Nurnberg
Browse files
Options
Browse Files
Download
Plain Diff
auto-merge
parents
2f082d9d
a4987b44
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 @
8d10051b
...
...
@@ -391,7 +391,12 @@ static void get_symbol_path(char *path, size_t size)
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
);
...
...
@@ -399,9 +404,9 @@ static void get_symbol_path(char *path, size_t size)
/* Add _NT_SYMBOL_PATH, if present. */
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)
int
i
;
CONTEXT
context
;
STACKFRAME64
frame
=
{
0
};
static
char
symbol_path
[
MAX_SYMBOL_PATH
+
1
];
static
char
symbol_path
[
MAX_SYMBOL_PATH
];
if
(
!
exception_ptrs
||
!
init_dbghelp_functions
())
return
;
...
...
@@ -432,7 +437,7 @@ void print_stacktrace(gptr unused1, ulong unused2)
context
=
*
(
exception_ptrs
->
ContextRecord
);
/*Initialize symbols.*/
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
);
/*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