summaryrefslogtreecommitdiff
path: root/mysys/stacktrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/stacktrace.c')
-rw-r--r--mysys/stacktrace.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/mysys/stacktrace.c b/mysys/stacktrace.c
index b2eae0fb4c6..dce01a0c3b9 100644
--- a/mysys/stacktrace.c
+++ b/mysys/stacktrace.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2001, 2011, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,7 +14,10 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-/* Workaround for Bug#32082: VOID redefinition on Win results in compile errors*/
+/*
+ Workaround for Bug#32082: VOID redefinition on Win results in
+ compile errors
+*/
#define DONT_DEFINE_VOID 1
#include <my_global.h>
@@ -447,10 +450,12 @@ void my_write_core(int sig)
#include <tlhelp32.h>
/*
- Stack tracing on Windows is implemented using Debug Helper library(dbghelp.dll)
- We do not redistribute dbghelp and the one comes with older OS (up to Windows 2001)
- is missing some important functions like functions StackWalk64 or MinidumpWriteDump.
- Hence, we have to load functions at runtime using LoadLibrary/GetProcAddress.
+ Stack tracing on Windows is implemented using Debug Helper
+ library(dbghelp.dll) We do not redistribute dbghelp and the one
+ comes with older OS (up to Windows 2001) is missing some important
+ functions like functions StackWalk64 or MinidumpWriteDump. Hence,
+ we have to load functions at runtime using
+ LoadLibrary/GetProcAddress.
*/
typedef DWORD (WINAPI *SymSetOptions_FctType)(DWORD dwOptions);
@@ -539,10 +544,11 @@ void my_set_exception_pointers(EXCEPTION_POINTERS *ep)
/*
- Get symbol path - semicolon-separated list of directories to search for debug
- symbols. We expect PDB in the same directory as corresponding exe or dll,
- so the path is build from directories of the loaded modules. If environment
- variable _NT_SYMBOL_PATH is set, it's value appended to the symbol search path
+ Get symbol path - semicolon-separated list of directories to search
+ for debug symbols. We expect PDB in the same directory as
+ corresponding exe or dll, so the path is build from directories of
+ the loaded modules. If environment variable _NT_SYMBOL_PATH is set,
+ it's value appended to the symbol search path
*/
static void get_symbol_path(char *path, size_t size)
{
@@ -666,9 +672,9 @@ void my_print_stacktrace(uchar* unused1, ulong unused2)
if(!have_module)
{
/*
- ModuleInfo structure has been "compatibly" extended in releases after XP,
- and its size was increased. To make XP dbghelp.dll function
- happy, pretend passing the old structure.
+ ModuleInfo structure has been "compatibly" extended in
+ releases after XP, and its size was increased. To make XP
+ dbghelp.dll function happy, pretend passing the old structure.
*/
module.SizeOfStruct= MODULE64_SIZE_WINXP;
have_module= pSymGetModuleInfo64(hProcess, addr, &module);