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
c8b85896
Commit
c8b85896
authored
Sep 16, 2008
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Plain Diff
merge fix from 5.0-bugteam
parents
a7bc87b3
fd70d5e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
mysys/stacktrace.c
mysys/stacktrace.c
+10
-5
No files found.
mysys/stacktrace.c
View file @
c8b85896
...
...
@@ -451,7 +451,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
);
...
...
@@ -459,9 +464,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
);
}
}
...
...
@@ -483,7 +488,7 @@ void my_print_stacktrace(uchar* 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
;
...
...
@@ -492,7 +497,7 @@ void my_print_stacktrace(uchar* 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