author | sangheki |
Wed, 13 Nov 2019 10:49:12 -0800 | |
changeset 59060 | fce1fa1bdc91 |
parent 53244 | 9807daeb47c4 |
permissions | -rw-r--r-- |
47086 | 1 |
/* |
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
49039
diff
changeset
|
2 |
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
47086 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
* |
|
23 |
*/ |
|
24 |
||
49039
0f81d08a578e
8197827: [windows] Small cleanups after JDK-8185712
stuefe
parents:
47666
diff
changeset
|
25 |
#ifndef OS_WINDOWS_WINDBGHELP_HPP |
0f81d08a578e
8197827: [windows] Small cleanups after JDK-8185712
stuefe
parents:
47666
diff
changeset
|
26 |
#define OS_WINDOWS_WINDBGHELP_HPP |
47086 | 27 |
|
28 |
#include <windows.h> |
|
29 |
#include <imagehlp.h> |
|
30 |
||
31 |
// This is a very plain wrapper for loading dbghelp.dll. It does not offer |
|
32 |
// any additional functionality. It takes care of locking. |
|
33 |
||
34 |
class outputStream; |
|
35 |
||
36 |
// Please note: dbghelp.dll may not have been loaded, or it may have been loaded but not |
|
37 |
// all functions may be available (because on the target system dbghelp.dll is of an |
|
38 |
// older version). |
|
39 |
// In all these cases we return an error from the WindowsDbgHelp::symXXXX() wrapper. We never |
|
40 |
// assert. It should always be safe to call these functions, but caller has to process the |
|
41 |
// return code (which he would have to do anyway). |
|
42 |
namespace WindowsDbgHelp { |
|
43 |
||
44 |
DWORD symSetOptions(DWORD); |
|
45 |
DWORD symGetOptions(void); |
|
46 |
BOOL symInitialize(HANDLE, PCTSTR, BOOL); |
|
47 |
BOOL symGetSymFromAddr64(HANDLE, DWORD64, PDWORD64, PIMAGEHLP_SYMBOL64); |
|
48 |
DWORD unDecorateSymbolName(const char*, char*, DWORD, DWORD); |
|
49 |
BOOL symSetSearchPath(HANDLE, PCTSTR); |
|
50 |
BOOL symGetSearchPath(HANDLE, PTSTR, int); |
|
51 |
BOOL stackWalk64(DWORD MachineType, |
|
52 |
HANDLE hProcess, |
|
53 |
HANDLE hThread, |
|
54 |
LPSTACKFRAME64 StackFrame, |
|
55 |
PVOID ContextRecord); |
|
56 |
PVOID symFunctionTableAccess64(HANDLE hProcess, DWORD64 AddrBase); |
|
57 |
DWORD64 symGetModuleBase64(HANDLE hProcess, DWORD64 dwAddr); |
|
58 |
BOOL miniDumpWriteDump(HANDLE hProcess, DWORD ProcessId, HANDLE hFile, |
|
59 |
MINIDUMP_TYPE DumpType, PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, |
|
60 |
PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, |
|
61 |
PMINIDUMP_CALLBACK_INFORMATION CallbackParam); |
|
62 |
BOOL symGetLineFromAddr64 (HANDLE hProcess, DWORD64 dwAddr, |
|
63 |
PDWORD pdwDisplacement, PIMAGEHLP_LINE64 Line); |
|
64 |
||
65 |
// Print one liner describing state (if library loaded, which functions are |
|
66 |
// missing - if any, and the dbhelp API version) |
|
67 |
void print_state_on(outputStream* st); |
|
68 |
||
47666 | 69 |
// Call at DLL_PROCESS_ATTACH. |
70 |
void pre_initialize(); |
|
71 |
||
47086 | 72 |
}; |
73 |
||
49039
0f81d08a578e
8197827: [windows] Small cleanups after JDK-8185712
stuefe
parents:
47666
diff
changeset
|
74 |
#endif // OS_WINDOWS_WINDBGHELP_HPP |