VirtualBox

source: vbox/trunk/include/iprt/dbg.h@ 49053

Last change on this file since 49053 was 49053, checked in by vboxsync, 12 years ago

IPRT: More .dSYM hacking.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 63.8 KB
Line 
1/* $Id: dbg.h 49053 2013-10-11 14:16:18Z vboxsync $ */
2/** @file
3 * IPRT - Debugging Routines.
4 */
5
6/*
7 * Copyright (C) 2008-2013 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.215389.xyz. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#ifndef ___iprt_dbg_h
28#define ___iprt_dbg_h
29
30#include <iprt/types.h>
31#include <iprt/stdarg.h>
32#include <iprt/ldr.h>
33
34RT_C_DECLS_BEGIN
35
36# ifdef IN_RING3
37
38/** @defgroup grp_rt_dbg RTDbg - Debugging Routines
39 * @ingroup grp_rt
40 * @{
41 */
42
43
44/** Debug segment index. */
45typedef uint32_t RTDBGSEGIDX;
46/** Pointer to a debug segment index. */
47typedef RTDBGSEGIDX *PRTDBGSEGIDX;
48/** Pointer to a const debug segment index. */
49typedef RTDBGSEGIDX const *PCRTDBGSEGIDX;
50/** NIL debug segment index. */
51#define NIL_RTDBGSEGIDX UINT32_C(0xffffffff)
52/** The last normal segment index. */
53#define RTDBGSEGIDX_LAST UINT32_C(0xffffffef)
54/** Special segment index that indicates that the offset is a relative
55 * virtual address (RVA). I.e. an offset from the start of the module. */
56#define RTDBGSEGIDX_RVA UINT32_C(0xfffffff0)
57/** Special segment index that indicates that the offset is a absolute. */
58#define RTDBGSEGIDX_ABS UINT32_C(0xfffffff1)
59/** The last valid special segment index. */
60#define RTDBGSEGIDX_SPECIAL_LAST RTDBGSEGIDX_ABS
61/** The last valid special segment index. */
62#define RTDBGSEGIDX_SPECIAL_FIRST (RTDBGSEGIDX_LAST + 1U)
63
64
65
66/** @name RTDBGSYMADDR_FLAGS_XXX
67 * Flags used when looking up a symbol by address.
68 * @{ */
69/** Less or equal address. (default) */
70#define RTDBGSYMADDR_FLAGS_LESS_OR_EQUAL UINT32_C(0)
71/** Greater or equal address. */
72#define RTDBGSYMADDR_FLAGS_GREATER_OR_EQUAL UINT32_C(1)
73/** Mask of valid flags. */
74#define RTDBGSYMADDR_FLAGS_VALID_MASK UINT32_C(1)
75/** @} */
76
77
78/** Max length (including '\\0') of a segment name. */
79#define RTDBG_SEGMENT_NAME_LENGTH (128 - 8 - 8 - 8 - 4 - 4)
80
81/**
82 * Debug module segment.
83 */
84typedef struct RTDBGSEGMENT
85{
86 /** The load address.
87 * RTUINTPTR_MAX if not applicable. */
88 RTUINTPTR Address;
89 /** The image relative virtual address of the segment.
90 * RTUINTPTR_MAX if not applicable. */
91 RTUINTPTR uRva;
92 /** The segment size. */
93 RTUINTPTR cb;
94 /** The segment flags. (reserved) */
95 uint32_t fFlags;
96 /** The segment index. */
97 RTDBGSEGIDX iSeg;
98 /** Symbol name. */
99 char szName[RTDBG_SEGMENT_NAME_LENGTH];
100} RTDBGSEGMENT;
101/** Pointer to a debug module segment. */
102typedef RTDBGSEGMENT *PRTDBGSEGMENT;
103/** Pointer to a const debug module segment. */
104typedef RTDBGSEGMENT const *PCRTDBGSEGMENT;
105
106
107
108/** Max length (including '\\0') of a symbol name. */
109#define RTDBG_SYMBOL_NAME_LENGTH (384 - 8 - 8 - 8 - 4 - 4 - 8)
110
111/**
112 * Debug symbol.
113 */
114typedef struct RTDBGSYMBOL
115{
116 /** Symbol value (address).
117 * This depends a bit who you ask. It will be the same as offSeg when you
118 * as RTDbgMod, but the mapping address if you ask RTDbgAs. */
119 RTUINTPTR Value;
120 /** Symbol size. */
121 RTUINTPTR cb;
122 /** Offset into the segment specified by iSeg. */
123 RTUINTPTR offSeg;
124 /** Segment number. */
125 RTDBGSEGIDX iSeg;
126 /** Symbol Flags. (reserved). */
127 uint32_t fFlags;
128 /** Symbol ordinal.
129 * This is set to UINT32_MAX if the ordinals aren't supported. */
130 uint32_t iOrdinal;
131 /** Symbol name. */
132 char szName[RTDBG_SYMBOL_NAME_LENGTH];
133} RTDBGSYMBOL;
134/** Pointer to debug symbol. */
135typedef RTDBGSYMBOL *PRTDBGSYMBOL;
136/** Pointer to const debug symbol. */
137typedef const RTDBGSYMBOL *PCRTDBGSYMBOL;
138
139/**
140 * Allocate a new symbol structure.
141 *
142 * @returns Pointer to a new structure on success, NULL on failure.
143 */
144RTDECL(PRTDBGSYMBOL) RTDbgSymbolAlloc(void);
145
146/**
147 * Duplicates a symbol structure.
148 *
149 * @returns Pointer to duplicate on success, NULL on failure.
150 *
151 * @param pSymInfo The symbol info to duplicate.
152 */
153RTDECL(PRTDBGSYMBOL) RTDbgSymbolDup(PCRTDBGSYMBOL pSymInfo);
154
155/**
156 * Free a symbol structure previously allocated by a RTDbg method.
157 *
158 * @param pSymInfo The symbol info to free. NULL is ignored.
159 */
160RTDECL(void) RTDbgSymbolFree(PRTDBGSYMBOL pSymInfo);
161
162
163/** Max length (including '\\0') of a debug info file name. */
164#define RTDBG_FILE_NAME_LENGTH (260)
165
166
167/**
168 * Debug line number information.
169 */
170typedef struct RTDBGLINE
171{
172 /** Address.
173 * This depends a bit who you ask. It will be the same as offSeg when you
174 * as RTDbgMod, but the mapping address if you ask RTDbgAs. */
175 RTUINTPTR Address;
176 /** Offset into the segment specified by iSeg. */
177 RTUINTPTR offSeg;
178 /** Segment number. */
179 RTDBGSEGIDX iSeg;
180 /** Line number. */
181 uint32_t uLineNo;
182 /** Symbol ordinal.
183 * This is set to UINT32_MAX if the ordinals aren't supported. */
184 uint32_t iOrdinal;
185 /** Filename. */
186 char szFilename[RTDBG_FILE_NAME_LENGTH];
187} RTDBGLINE;
188/** Pointer to debug line number. */
189typedef RTDBGLINE *PRTDBGLINE;
190/** Pointer to const debug line number. */
191typedef const RTDBGLINE *PCRTDBGLINE;
192
193/**
194 * Allocate a new line number structure.
195 *
196 * @returns Pointer to a new structure on success, NULL on failure.
197 */
198RTDECL(PRTDBGLINE) RTDbgLineAlloc(void);
199
200/**
201 * Duplicates a line number structure.
202 *
203 * @returns Pointer to duplicate on success, NULL on failure.
204 *
205 * @param pLine The line number to duplicate.
206 */
207RTDECL(PRTDBGLINE) RTDbgLineDup(PCRTDBGLINE pLine);
208
209/**
210 * Free a line number structure previously allocated by a RTDbg method.
211 *
212 * @param pLine The line number to free. NULL is ignored.
213 */
214RTDECL(void) RTDbgLineFree(PRTDBGLINE pLine);
215
216
217/** @defgroup grp_rt_dbgcfg RTDbgCfg - Debugging Configuration
218 *
219 * The settings used when loading and processing debug info is kept in a
220 * RTDBGCFG instance since it's generally shared for a whole debugging session
221 * and anyhow would be a major pain to pass as individual parameters to each
222 * call. The debugging config API not only keeps the settings information but
223 * also provide APIs for making use of it, and in some cases, like for instance
224 * symbol severs, retriving and maintaining it.
225 *
226 * @todo Work in progress - APIs are still missing, adding when needed.
227 *
228 * @{
229 */
230
231/** Debugging configuration handle. */
232typedef struct RTDBGCFGINT *RTDBGCFG;
233/** Pointer to a debugging configuration handle. */
234typedef RTDBGCFG *PRTDBGCFG;
235/** NIL debug configuration handle. */
236#define NIL_RTDBGCFG ((RTDBGCFG)0)
237
238/** @name RTDBGCFG_FLAGS_XXX - Debugging configuration flags.
239 * @{ */
240/** Use deferred loading. */
241#define RTDBGCFG_FLAGS_DEFERRED RT_BIT_64(0)
242/** Don't use the symbol server (http). */
243#define RTDBGCFG_FLAGS_NO_SYM_SRV RT_BIT_64(1)
244/** Don't use system search paths.
245 * On windows this means not using _NT_ALT_SYMBOL_PATH, _NT_SYMBOL_PATH,
246 * _NT_SOURCE_PATH, and _NT_EXECUTABLE_PATH.
247 * On other systems the effect has yet to be determined. */
248#define RTDBGCFG_FLAGS_NO_SYSTEM_PATHS RT_BIT_64(2)
249/** Don't search the debug and image paths recursively. */
250#define RTDBGCFG_FLAGS_NO_RECURSIV_SEARCH RT_BIT_64(3)
251/** Don't search the source paths recursively. */
252#define RTDBGCFG_FLAGS_NO_RECURSIV_SRC_SEARCH RT_BIT_64(4)
253/** @} */
254
255/**
256 * Debugging configuration properties.
257 *
258 * The search paths are using the DOS convention of semicolon as separator
259 * character. The the special 'srv' + asterisk syntax known from the windows
260 * debugger search paths are also supported to some extent, as is 'cache' +
261 * asterisk.
262 */
263typedef enum RTDBGCFGPROP
264{
265 /** The customary invalid 0 value. */
266 RTDBGCFGPROP_INVALID = 0,
267 /** RTDBGCFG_FLAGS_XXX.
268 * Env: _FLAGS
269 * The environment variable can be specified as a unsigned value or one or more
270 * mnemonics separated by spaces. */
271 RTDBGCFGPROP_FLAGS,
272 /** List of paths to search for symbol files and images.
273 * Env: _PATH */
274 RTDBGCFGPROP_PATH,
275 /** List of symbol file suffixes (semicolon separated).
276 * Env: _SUFFIXES */
277 RTDBGCFGPROP_SUFFIXES,
278 /** List of paths to search for source files.
279 * Env: _SRC_PATH */
280 RTDBGCFGPROP_SRC_PATH,
281 /** End of valid values. */
282 RTDBGCFGPROP_END,
283 /** The customary 32-bit type hack. */
284 RTDBGCFGPROP_32BIT_HACK = 0x7fffffff
285} RTDBGCFGPROP;
286
287/**
288 * Configuration property change operation.
289 */
290typedef enum RTDBGCFGOP
291{
292 /** Customary invalid 0 value. */
293 RTDBGCFGOP_INVALID = 0,
294 /** Replace the current value with the given one. */
295 RTDBGCFGOP_SET,
296 /** Append the given value to the existing one. For integer values this is
297 * considered a bitwise OR operation. */
298 RTDBGCFGOP_APPEND,
299 /** Prepend the given value to the existing one. For integer values this is
300 * considered a bitwise OR operation. */
301 RTDBGCFGOP_PREPEND,
302 /** Removes the value from the existing one. For interger values the value is
303 * complemented and ANDed with the existing one, clearing all the specified
304 * flags/bits. */
305 RTDBGCFGOP_REMOVE,
306 /** End of valid values. */
307 RTDBGCFGOP_END,
308 /** Customary 32-bit type hack. */
309 RTDBGCFGOP_32BIT_HACK = 0x7fffffff
310} RTDBGCFGOP;
311
312
313
314/**
315 * Initializes a debugging configuration.
316 *
317 * @returns IPRT status code.
318 * @param phDbgCfg Where to return the configuration handle.
319 * @param pszEnvVarPrefix The environment variable prefix. If NULL, the
320 * environment is not consulted.
321 * @param fNativePaths Whether to pick up native paths from the
322 * environment.
323 *
324 * @sa RTDbgCfgChangeString, RTDbgCfgChangeUInt.
325 */
326RTDECL(int) RTDbgCfgCreate(PRTDBGCFG phDbgCfg, const char *pszEnvVarPrefix, bool fNativePaths);
327
328/**
329 * Retains a new reference to a debugging config.
330 *
331 * @returns New reference count.
332 * UINT32_MAX is returned if the handle is invalid (asserted).
333 * @param hDbgCfg The config handle.
334 */
335RTDECL(uint32_t) RTDbgCfgRetain(RTDBGCFG hDbgCfg);
336
337/**
338 * Releases a references to a debugging config.
339 *
340 * @returns New reference count, if 0 the config was freed. UINT32_MAX is
341 * returned if the handle is invalid (asserted).
342 * @param hDbgCfg The config handle.
343 */
344RTDECL(uint32_t) RTDbgCfgRelease(RTDBGCFG hDbgCfg);
345
346/**
347 * Changes a property value by string.
348 *
349 * For string values the string is used more or less as given. For integer
350 * values and flags, it can contains both values (ORed together) or property
351 * specific mnemonics (ORed / ~ANDed).
352 *
353 * @returns IPRT status code.
354 * @retval VERR_DBG_CFG_INVALID_VALUE
355 * @param hDbgCfg The debugging configuration handle.
356 * @param enmProp The property to change.
357 * @param enmOp How to change the property.
358 * @param pszValue The property value to apply.
359 */
360RTDECL(int) RTDbgCfgChangeString(RTDBGCFG hDbgCfg, RTDBGCFGPROP enmProp, RTDBGCFGOP enmOp, const char *pszValue);
361
362/**
363 * Changes a property value by unsigned integer (64-bit).
364 *
365 * This can only be applied to integer and flag properties.
366 *
367 * @returns IPRT status code.
368 * @retval VERR_DBG_CFG_NOT_UINT_PROP
369 * @param hDbgCfg The debugging configuration handle.
370 * @param enmProp The property to change.
371 * @param enmOp How to change the property.
372 * @param uValue The property value to apply.
373 */
374RTDECL(int) RTDbgCfgChangeUInt(RTDBGCFG hDbgCfg, RTDBGCFGPROP enmProp, RTDBGCFGOP enmOp, uint64_t uValue);
375
376/**
377 * Query a property value as string.
378 *
379 * Integer and flags properties are returned as a list of mnemonics if possible,
380 * otherwise as simple hex values.
381 *
382 * @returns IPRT status code.
383 * @retval VERR_BUFFER_OVERFLOW if there isn't sufficient buffer space. Nothing
384 * is written.
385 * @param hDbgCfg The debugging configuration handle.
386 * @param enmProp The property to change.
387 * @param pszValue The output buffer.
388 * @param cbValue The size of the output buffer.
389 */
390RTDECL(int) RTDbgCfgQueryString(RTDBGCFG hDbgCfg, RTDBGCFGPROP enmProp, char *pszValue, size_t cbValue);
391
392/**
393 * Query a property value as unsigned integer (64-bit).
394 *
395 * Only integer and flags properties can be queried this way.
396 *
397 * @returns IPRT status code.
398 * @retval VERR_DBG_CFG_NOT_UINT_PROP
399 * @param hDbgCfg The debugging configuration handle.
400 * @param enmProp The property to change.
401 * @param puValue Where to return the value.
402 */
403RTDECL(int) RTDbgCfgQueryUInt(RTDBGCFG hDbgCfg, RTDBGCFGPROP enmProp, uint64_t *puValue);
404
405/**
406 * Log callback.
407 *
408 * @param hDbgCfg The debug config instance.
409 * @param iLevel The message level.
410 * @param pszMsg The message.
411 * @param pvUser User argument.
412 */
413typedef DECLCALLBACK(void) FNRTDBGCFGLOG(RTDBGCFG hDbgCfg, uint32_t iLevel, const char *pszMsg, void *pvUser);
414/** Pointer to a log callback. */
415typedef FNRTDBGCFGLOG *PFNRTDBGCFGLOG;
416
417/**
418 * Sets the log callback for the configuration.
419 *
420 * This will fail if there is already a log callback present, unless pfnCallback
421 * is NULL.
422 *
423 * @returns IPRT status code.
424 * @param hDbgCfg The debugging configuration handle.
425 * @param pfnCallback The callback function. NULL to unset.
426 * @param pvUser The user argument.
427 */
428RTDECL(int) RTDbgCfgSetLogCallback(RTDBGCFG hDbgCfg, PFNRTDBGCFGLOG pfnCallback, void *pvUser);
429
430/**
431 * Callback used by the RTDbgCfgOpen function to try out a file that was found.
432 *
433 * @returns On statuses other than VINF_CALLBACK_RETURN and
434 * VERR_CALLBACK_RETURN the search will continue till the end of the
435 * list. These status codes will not necessarily be propagated to the
436 * caller in any consistent manner.
437 * @retval VINF_CALLBACK_RETURN if successuflly opened the file and it's time
438 * to return
439 * @retval VERR_CALLBACK_RETURN if we shouldn't stop searching.
440 *
441 * @param hDbgCfg The debugging configuration handle.
442 * @param pszFilename The path to the file that should be tried out.
443 * @param pvUser1 First user parameter.
444 * @param pvUser2 Second user parameter.
445 */
446typedef DECLCALLBACK(int) FNDBGCFGOPEN(RTDBGCFG hDbgCfg, const char *pszFilename, void *pvUser1, void *pvUser2);
447/** Pointer to a open-file callback used to the RTDbgCfgOpen functions. */
448typedef FNDBGCFGOPEN *PFNDBGCFGOPEN;
449
450
451RTDECL(int) RTDbgCfgOpenPeImage(RTDBGCFG hDbgCfg, const char *pszFilename, uint32_t cbImage, uint32_t uTimestamp,
452 PFNDBGCFGOPEN pfnCallback, void *pvUser1, void *pvUser2);
453RTDECL(int) RTDbgCfgOpenPdb70(RTDBGCFG hDbgCfg, const char *pszFilename, PCRTUUID pUuid, uint32_t uAge,
454 PFNDBGCFGOPEN pfnCallback, void *pvUser1, void *pvUser2);
455RTDECL(int) RTDbgCfgOpenPdb20(RTDBGCFG hDbgCfg, const char *pszFilename, uint32_t cbImage, uint32_t uTimestamp, uint32_t uAge,
456 PFNDBGCFGOPEN pfnCallback, void *pvUser1, void *pvUser2);
457RTDECL(int) RTDbgCfgOpenDbg(RTDBGCFG hDbgCfg, const char *pszFilename, uint32_t cbImage, uint32_t uTimestamp,
458 PFNDBGCFGOPEN pfnCallback, void *pvUser1, void *pvUser2);
459RTDECL(int) RTDbgCfgOpenDwo(RTDBGCFG hDbgCfg, const char *pszFilename, uint32_t uCrc32,
460 PFNDBGCFGOPEN pfnCallback, void *pvUser1, void *pvUser2);
461RTDECL(int) RTDbgCfgOpenDsymBundle(RTDBGCFG hDbgCfg, const char *pszFilename, PCRTUUID pUuid,
462 PFNDBGCFGOPEN pfnCallback, void *pvUser1, void *pvUser2);
463
464
465/** @name Static symbol cache configuration
466 * @{ */
467/** The cache subdirectory containing the UUID mappings for .dSYM bundles.
468 * The UUID mappings implemented by IPRT are splitting the image/dsym UUID up
469 * into five 4 digit parts that maps to directories and one twelve digit part
470 * that maps to a symbolic link. The symlink points to the file in the
471 * Contents/Resources/DWARF/ directory of the .dSYM bundle for a .dSYM map, and
472 * to the image file (Contents/MacOS/bundlename for bundles) for image map.
473 *
474 * According to available documentation, both lldb and gdb are able to use these
475 * UUID maps to find debug info while debugging. See:
476 * http://lldb.llvm.org/symbols.html
477 */
478#define RTDBG_CACHE_UUID_MAP_DIR_DSYMS "dsym-uuids"
479/** The cache subdirectory containing the UUID mappings for image files. */
480#define RTDBG_CACHE_UUID_MAP_DIR_IMAGES "image-uuids"
481/** Suffix used for the cached .dSYM debug files.
482 * In .dSYM bundles only the .dSYM/Contents/Resources/DWARF/debug-file is
483 * copied into the cache, and in order to not clash with the stripped/rich image
484 * file, the cache tool slaps this suffix onto the name. */
485#define RTDBG_CACHE_DSYM_FILE_SUFFIX ".dwarf"
486/** @} */
487
488
489/** @} */
490
491
492/** @defgroup grp_rt_dbgas RTDbgAs - Debug Address Space
493 * @{
494 */
495
496/**
497 * Creates an empty address space.
498 *
499 * @returns IPRT status code.
500 *
501 * @param phDbgAs Where to store the address space handle on success.
502 * @param FirstAddr The first address in the address space.
503 * @param LastAddr The last address in the address space.
504 * @param pszName The name of the address space.
505 */
506RTDECL(int) RTDbgAsCreate(PRTDBGAS phDbgAs, RTUINTPTR FirstAddr, RTUINTPTR LastAddr, const char *pszName);
507
508/**
509 * Variant of RTDbgAsCreate that takes a name format string.
510 *
511 * @returns IPRT status code.
512 *
513 * @param phDbgAs Where to store the address space handle on success.
514 * @param FirstAddr The first address in the address space.
515 * @param LastAddr The last address in the address space.
516 * @param pszNameFmt The name format of the address space.
517 * @param va Format arguments.
518 */
519RTDECL(int) RTDbgAsCreateV(PRTDBGAS phDbgAs, RTUINTPTR FirstAddr, RTUINTPTR LastAddr, const char *pszNameFmt, va_list va);
520
521/**
522 * Variant of RTDbgAsCreate that takes a name format string.
523 *
524 * @returns IPRT status code.
525 *
526 * @param phDbgAs Where to store the address space handle on success.
527 * @param FirstAddr The first address in the address space.
528 * @param LastAddr The last address in the address space.
529 * @param pszNameFmt The name format of the address space.
530 * @param ... Format arguments.
531 */
532RTDECL(int) RTDbgAsCreateF(PRTDBGAS phDbgAs, RTUINTPTR FirstAddr, RTUINTPTR LastAddr, const char *pszNameFmt, ...);
533
534/**
535 * Retains a reference to the address space.
536 *
537 * @returns New reference count, UINT32_MAX on invalid handle (asserted).
538 *
539 * @param hDbgAs The address space handle.
540 *
541 * @remarks Will not take any locks.
542 */
543RTDECL(uint32_t) RTDbgAsRetain(RTDBGAS hDbgAs);
544
545/**
546 * Release a reference to the address space.
547 *
548 * When the reference count reaches zero, the address space is destroyed.
549 * That means unlinking all the modules it currently contains, potentially
550 * causing some or all of them to be destroyed as they are managed by
551 * reference counting.
552 *
553 * @returns New reference count, UINT32_MAX on invalid handle (asserted).
554 *
555 * @param hDbgAs The address space handle. The NIL handle is quietly
556 * ignored and 0 is returned.
557 *
558 * @remarks Will not take any locks.
559 */
560RTDECL(uint32_t) RTDbgAsRelease(RTDBGAS hDbgAs);
561
562/**
563 * Locks the address space for exclusive access.
564 *
565 * @returns IRPT status code
566 * @param hDbgAs The address space handle.
567 */
568RTDECL(int) RTDbgAsLockExcl(RTDBGAS hDbgAs);
569
570/**
571 * Counters the actions of one RTDbgAsUnlockExcl call.
572 *
573 * @returns IRPT status code
574 * @param hDbgAs The address space handle.
575 */
576RTDECL(int) RTDbgAsUnlockExcl(RTDBGAS hDbgAs);
577
578/**
579 * Gets the name of an address space.
580 *
581 * @returns read only address space name.
582 * NULL if hDbgAs is invalid.
583 *
584 * @param hDbgAs The address space handle.
585 *
586 * @remarks Will not take any locks.
587 */
588RTDECL(const char *) RTDbgAsName(RTDBGAS hDbgAs);
589
590/**
591 * Gets the first address in an address space.
592 *
593 * @returns The address.
594 * 0 if hDbgAs is invalid.
595 *
596 * @param hDbgAs The address space handle.
597 *
598 * @remarks Will not take any locks.
599 */
600RTDECL(RTUINTPTR) RTDbgAsFirstAddr(RTDBGAS hDbgAs);
601
602/**
603 * Gets the last address in an address space.
604 *
605 * @returns The address.
606 * 0 if hDbgAs is invalid.
607 *
608 * @param hDbgAs The address space handle.
609 *
610 * @remarks Will not take any locks.
611 */
612RTDECL(RTUINTPTR) RTDbgAsLastAddr(RTDBGAS hDbgAs);
613
614/**
615 * Gets the number of modules in the address space.
616 *
617 * This can be used together with RTDbgAsModuleByIndex
618 * to enumerate the modules.
619 *
620 * @returns The number of modules.
621 *
622 * @param hDbgAs The address space handle.
623 *
624 * @remarks Will not take any locks.
625 */
626RTDECL(uint32_t) RTDbgAsModuleCount(RTDBGAS hDbgAs);
627
628/** @name Flags for RTDbgAsModuleLink and RTDbgAsModuleLinkSeg
629 * @{ */
630/** Replace all conflicting module.
631 * (The conflicting modules will be removed the address space and their
632 * references released.) */
633#define RTDBGASLINK_FLAGS_REPLACE RT_BIT_32(0)
634/** Mask containing the valid flags. */
635#define RTDBGASLINK_FLAGS_VALID_MASK UINT32_C(0x00000001)
636/** @} */
637
638/**
639 * Links a module into the address space at the give address.
640 *
641 * The size of the mapping is determined using RTDbgModImageSize().
642 *
643 * @returns IPRT status code.
644 * @retval VERR_OUT_OF_RANGE if the specified address will put the module
645 * outside the address space.
646 * @retval VERR_ADDRESS_CONFLICT if the mapping clashes with existing mappings.
647 *
648 * @param hDbgAs The address space handle.
649 * @param hDbgMod The module handle of the module to be linked in.
650 * @param ImageAddr The address to link the module at.
651 * @param fFlags See RTDBGASLINK_FLAGS_*.
652 */
653RTDECL(int) RTDbgAsModuleLink(RTDBGAS hDbgAs, RTDBGMOD hDbgMod, RTUINTPTR ImageAddr, uint32_t fFlags);
654
655/**
656 * Links a segment into the address space at the give address.
657 *
658 * The size of the mapping is determined using RTDbgModSegmentSize().
659 *
660 * @returns IPRT status code.
661 * @retval VERR_OUT_OF_RANGE if the specified address will put the module
662 * outside the address space.
663 * @retval VERR_ADDRESS_CONFLICT if the mapping clashes with existing mappings.
664 *
665 * @param hDbgAs The address space handle.
666 * @param hDbgMod The module handle.
667 * @param iSeg The segment number (0-based) of the segment to be
668 * linked in.
669 * @param SegAddr The address to link the segment at.
670 * @param fFlags See RTDBGASLINK_FLAGS_*.
671 */
672RTDECL(int) RTDbgAsModuleLinkSeg(RTDBGAS hDbgAs, RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR SegAddr, uint32_t fFlags);
673
674/**
675 * Unlinks all the mappings of a module from the address space.
676 *
677 * @returns IPRT status code.
678 * @retval VERR_NOT_FOUND if the module wasn't found.
679 *
680 * @param hDbgAs The address space handle.
681 * @param hDbgMod The module handle of the module to be unlinked.
682 */
683RTDECL(int) RTDbgAsModuleUnlink(RTDBGAS hDbgAs, RTDBGMOD hDbgMod);
684
685/**
686 * Unlinks the mapping at the specified address.
687 *
688 * @returns IPRT status code.
689 * @retval VERR_NOT_FOUND if no module or segment is mapped at that address.
690 *
691 * @param hDbgAs The address space handle.
692 * @param Addr The address within the mapping to be unlinked.
693 */
694RTDECL(int) RTDbgAsModuleUnlinkByAddr(RTDBGAS hDbgAs, RTUINTPTR Addr);
695
696/**
697 * Get a the handle of a module in the address space by is index.
698 *
699 * @returns A retained handle to the specified module. The caller must release
700 * the returned reference.
701 * NIL_RTDBGMOD if invalid index or handle.
702 *
703 * @param hDbgAs The address space handle.
704 * @param iModule The index of the module to get.
705 *
706 * @remarks The module indexes may change after calls to RTDbgAsModuleLink,
707 * RTDbgAsModuleLinkSeg, RTDbgAsModuleUnlink and
708 * RTDbgAsModuleUnlinkByAddr.
709 */
710RTDECL(RTDBGMOD) RTDbgAsModuleByIndex(RTDBGAS hDbgAs, uint32_t iModule);
711
712/**
713 * Queries mapping module information by handle.
714 *
715 * @returns IPRT status code.
716 * @retval VERR_NOT_FOUND if no mapping was found at the specified address.
717 *
718 * @param hDbgAs The address space handle.
719 * @param Addr Address within the mapping of the module or segment.
720 * @param phMod Where to the return the retained module handle.
721 * Optional.
722 * @param pAddr Where to return the base address of the mapping.
723 * Optional.
724 * @param piSeg Where to return the segment index. This is set to
725 * NIL if the entire module is mapped as a single
726 * mapping. Optional.
727 */
728RTDECL(int) RTDbgAsModuleByAddr(RTDBGAS hDbgAs, RTUINTPTR Addr, PRTDBGMOD phMod, PRTUINTPTR pAddr, PRTDBGSEGIDX piSeg);
729
730/**
731 * Queries mapping module information by name.
732 *
733 * @returns IPRT status code.
734 * @retval VERR_NOT_FOUND if no mapping was found at the specified address.
735 * @retval VERR_OUT_OF_RANGE if the name index was out of range.
736 *
737 * @param hDbgAs The address space handle.
738 * @param pszName The module name.
739 * @param iName There can be more than one module by the same name
740 * in an address space. This argument indicates which
741 * is meant. (0 based)
742 * @param phMod Where to the return the retained module handle.
743 */
744RTDECL(int) RTDbgAsModuleByName(RTDBGAS hDbgAs, const char *pszName, uint32_t iName, PRTDBGMOD phMod);
745
746/**
747 * Information about a mapping.
748 *
749 * This is used by RTDbgAsModuleGetMapByIndex.
750 */
751typedef struct RTDBGASMAPINFO
752{
753 /** The mapping address. */
754 RTUINTPTR Address;
755 /** The segment mapped there.
756 * This is NIL_RTDBGSEGIDX if the entire module image is mapped here. */
757 RTDBGSEGIDX iSeg;
758} RTDBGASMAPINFO;
759/** Pointer to info about an address space mapping. */
760typedef RTDBGASMAPINFO *PRTDBGASMAPINFO;
761/** Pointer to const info about an address space mapping. */
762typedef RTDBGASMAPINFO const *PCRTDBGASMAPINFO;
763
764/**
765 * Queries mapping information for a module given by index.
766 *
767 * @returns IRPT status code.
768 * @retval VERR_INVALID_HANDLE if hDbgAs is invalid.
769 * @retval VERR_OUT_OF_RANGE if the name index was out of range.
770 * @retval VINF_BUFFER_OVERFLOW if the array is too small and the returned
771 * information is incomplete.
772 *
773 * @param hDbgAs The address space handle.
774 * @param iModule The index of the module to get.
775 * @param paMappings Where to return the mapping information. The buffer
776 * size is given by *pcMappings.
777 * @param pcMappings IN: Size of the paMappings array. OUT: The number of
778 * entries returned.
779 * @param fFlags Flags for reserved for future use. MBZ.
780 *
781 * @remarks See remarks for RTDbgAsModuleByIndex regarding the volatility of the
782 * iModule parameter.
783 */
784RTDECL(int) RTDbgAsModuleQueryMapByIndex(RTDBGAS hDbgAs, uint32_t iModule, PRTDBGASMAPINFO paMappings, uint32_t *pcMappings, uint32_t fFlags);
785
786/**
787 * Adds a symbol to a module in the address space.
788 *
789 * @returns IPRT status code. See RTDbgModSymbolAdd for more specific ones.
790 * @retval VERR_INVALID_HANDLE if hDbgAs is invalid.
791 * @retval VERR_NOT_FOUND if no module was found at the specified address.
792 * @retval VERR_NOT_SUPPORTED if the module interpret doesn't support adding
793 * custom symbols.
794 *
795 * @param hDbgAs The address space handle.
796 * @param pszSymbol The symbol name.
797 * @param Addr The address of the symbol.
798 * @param cb The size of the symbol.
799 * @param fFlags Symbol flags.
800 * @param piOrdinal Where to return the symbol ordinal on success. If
801 * the interpreter doesn't do ordinals, this will be set to
802 * UINT32_MAX. Optional
803 */
804RTDECL(int) RTDbgAsSymbolAdd(RTDBGAS hDbgAs, const char *pszSymbol, RTUINTPTR Addr, RTUINTPTR cb, uint32_t fFlags, uint32_t *piOrdinal);
805
806/**
807 * Query a symbol by address.
808 *
809 * @returns IPRT status code. See RTDbgModSymbolAddr for more specific ones.
810 * @retval VERR_INVALID_HANDLE if hDbgAs is invalid.
811 * @retval VERR_NOT_FOUND if the address couldn't be mapped to a module.
812 * @retval VERR_INVALID_PARAMETER if incorrect flags.
813 *
814 * @param hDbgAs The address space handle.
815 * @param Addr The address which closest symbol is requested.
816 * @param fFlags Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
817 * @param poffDisp Where to return the distance between the symbol
818 * and address. Optional.
819 * @param pSymbol Where to return the symbol info.
820 * @param phMod Where to return the module handle. Optional.
821 */
822RTDECL(int) RTDbgAsSymbolByAddr(RTDBGAS hDbgAs, RTUINTPTR Addr, uint32_t fFlags,
823 PRTINTPTR poffDisp, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod);
824
825/**
826 * Query a symbol by address.
827 *
828 * @returns IPRT status code. See RTDbgModSymbolAddrA for more specific ones.
829 * @retval VERR_INVALID_HANDLE if hDbgAs is invalid.
830 * @retval VERR_NOT_FOUND if the address couldn't be mapped to a module.
831 * @retval VERR_INVALID_PARAMETER if incorrect flags.
832 *
833 * @param hDbgAs The address space handle.
834 * @param Addr The address which closest symbol is requested.
835 * @param fFlags Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
836 * @param poffDisp Where to return the distance between the symbol
837 * and address. Optional.
838 * @param ppSymInfo Where to return the pointer to the allocated symbol
839 * info. Always set. Free with RTDbgSymbolFree.
840 * @param phMod Where to return the module handle. Optional.
841 */
842RTDECL(int) RTDbgAsSymbolByAddrA(RTDBGAS hDbgAs, RTUINTPTR Addr, uint32_t fFlags,
843 PRTINTPTR poffDisp, PRTDBGSYMBOL *ppSymInfo, PRTDBGMOD phMod);
844
845/**
846 * Query a symbol by name.
847 *
848 * @returns IPRT status code.
849 * @retval VERR_SYMBOL_NOT_FOUND if not found.
850 *
851 * @param hDbgAs The address space handle.
852 * @param pszSymbol The symbol name. It is possible to limit the scope
853 * of the search by prefixing the symbol with a module
854 * name pattern followed by a bang (!) character.
855 * RTStrSimplePatternNMatch is used for the matching.
856 * @param pSymbol Where to return the symbol info.
857 * @param phMod Where to return the module handle. Optional.
858 */
859RTDECL(int) RTDbgAsSymbolByName(RTDBGAS hDbgAs, const char *pszSymbol, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod);
860
861/**
862 * Query a symbol by name, allocating the returned symbol structure.
863 *
864 * @returns IPRT status code.
865 * @retval VERR_SYMBOL_NOT_FOUND if not found.
866 *
867 * @param hDbgAs The address space handle.
868 * @param pszSymbol The symbol name. See RTDbgAsSymbolByName for more.
869 * @param ppSymbol Where to return the pointer to the allocated
870 * symbol info. Always set. Free with RTDbgSymbolFree.
871 * @param phMod Where to return the module handle. Optional.
872 */
873RTDECL(int) RTDbgAsSymbolByNameA(RTDBGAS hDbgAs, const char *pszSymbol, PRTDBGSYMBOL *ppSymbol, PRTDBGMOD phMod);
874
875/**
876 * Adds a line number to a module in the address space.
877 *
878 * @returns IPRT status code. See RTDbgModLineAdd for more specific ones.
879 * @retval VERR_INVALID_HANDLE if hDbgAs is invalid.
880 * @retval VERR_NOT_FOUND if no module was found at the specified address.
881 * @retval VERR_NOT_SUPPORTED if the module interpret doesn't support adding
882 * custom symbols.
883 *
884 * @param hDbgAs The address space handle.
885 * @param pszFile The file name.
886 * @param uLineNo The line number.
887 * @param Addr The address of the symbol.
888 * @param piOrdinal Where to return the line number ordinal on success.
889 * If the interpreter doesn't do ordinals, this will be
890 * set to UINT32_MAX. Optional.
891 */
892RTDECL(int) RTDbgAsLineAdd(RTDBGAS hDbgAs, const char *pszFile, uint32_t uLineNo, RTUINTPTR Addr, uint32_t *piOrdinal);
893
894/**
895 * Query a line number by address.
896 *
897 * @returns IPRT status code. See RTDbgModLineAddrA for more specific ones.
898 * @retval VERR_INVALID_HANDLE if hDbgAs is invalid.
899 * @retval VERR_NOT_FOUND if the address couldn't be mapped to a module.
900 *
901 * @param hDbgAs The address space handle.
902 * @param Addr The address which closest symbol is requested.
903 * @param poffDisp Where to return the distance between the line
904 * number and address.
905 * @param pLine Where to return the line number information.
906 * @param phMod Where to return the module handle. Optional.
907 */
908RTDECL(int) RTDbgAsLineByAddr(RTDBGAS hDbgAs, RTUINTPTR Addr, PRTINTPTR poffDisp, PRTDBGLINE pLine, PRTDBGMOD phMod);
909
910/**
911 * Query a line number by address.
912 *
913 * @returns IPRT status code. See RTDbgModLineAddrA for more specific ones.
914 * @retval VERR_INVALID_HANDLE if hDbgAs is invalid.
915 * @retval VERR_NOT_FOUND if the address couldn't be mapped to a module.
916 *
917 * @param hDbgAs The address space handle.
918 * @param Addr The address which closest symbol is requested.
919 * @param poffDisp Where to return the distance between the line
920 * number and address.
921 * @param ppLine Where to return the pointer to the allocated line
922 * number info. Always set. Free with RTDbgLineFree.
923 * @param phMod Where to return the module handle. Optional.
924 */
925RTDECL(int) RTDbgAsLineByAddrA(RTDBGAS hDbgAs, RTUINTPTR Addr, PRTINTPTR poffDisp, PRTDBGLINE *ppLine, PRTDBGMOD phMod);
926
927/** @todo Missing some bits here. */
928
929/** @} */
930
931
932/** @defgroup grp_rt_dbgmod RTDbgMod - Debug Module Interpreter
933 * @{
934 */
935
936/**
937 * Creates a module based on the default debug info container.
938 *
939 * This can be used to manually load a module and its symbol. The primary user
940 * group is the debug info interpreters, which use this API to create an
941 * efficient debug info container behind the scenes and forward all queries to
942 * it once the info has been loaded.
943 *
944 * @returns IPRT status code.
945 *
946 * @param phDbgMod Where to return the module handle.
947 * @param pszName The name of the module (mandatory).
948 * @param cbSeg The size of initial segment. If zero, segments will
949 * have to be added manually using RTDbgModSegmentAdd.
950 * @param fFlags Flags reserved for future extensions, MBZ for now.
951 */
952RTDECL(int) RTDbgModCreate(PRTDBGMOD phDbgMod, const char *pszName, RTUINTPTR cbSeg, uint32_t fFlags);
953
954RTDECL(int) RTDbgModCreateFromImage(PRTDBGMOD phDbgMod, const char *pszFilename, const char *pszName,
955 RTLDRARCH enmArch, RTDBGCFG hDbgCfg);
956RTDECL(int) RTDbgModCreateFromMap(PRTDBGMOD phDbgMod, const char *pszFilename, const char *pszName, RTUINTPTR uSubtrahend,
957 RTDBGCFG hDbgCfg);
958RTDECL(int) RTDbgModCreateFromPeImage(PRTDBGMOD phDbgMod, const char *pszFilename, const char *pszName, RTLDRMOD hLdrMod,
959 uint32_t cbImage, uint32_t uTimeDateStamp, RTDBGCFG hDbgCfg);
960RTDECL(int) RTDbgModCreateFromDbg(PRTDBGMOD phDbgMod, const char *pszFilename, const char *pszName, uint32_t cbImage,
961 uint32_t uTimeDateStamp, RTDBGCFG hDbgCfg);
962RTDECL(int) RTDbgModCreateFromPdb(PRTDBGMOD phDbgMod, const char *pszFilename, const char *pszName, uint32_t cbImage,
963 PCRTUUID pUuid, uint32_t Age, RTDBGCFG hDbgCfg);
964RTDECL(int) RTDbgModCreateFromDwo(PRTDBGMOD phDbgMod, const char *pszFilename, const char *pszName, uint32_t cbImage,
965 uint32_t uCrc32, RTDBGCFG hDbgCfg);
966RTDECL(int) RTDbgModCreateFromMachOImage(PRTDBGMOD phDbgMod, const char *pszFilename, const char *pszName,
967 RTLDRARCH enmArch, uint32_t cbImage, uint32_t cSegs, PCRTDBGSEGMENT paSegs,
968 PCRTUUID pUuid, RTDBGCFG hDbgCfg, uint32_t fFlags);
969
970/** @name Flags for RTDbgModCreate and friends.
971 * @{ */
972/** Overrides the hDbgCfg settings and forces an image and/or symbol file
973 * search. RTDbgModCreate will quietly ignore this flag. */
974#define RTDBGMOD_F_NOT_DEFERRED RT_BIT_32(0)
975/** @} */
976
977
978/**
979 * Retains another reference to the module.
980 *
981 * @returns New reference count, UINT32_MAX on invalid handle (asserted).
982 *
983 * @param hDbgMod The module handle.
984 *
985 * @remarks Will not take any locks.
986 */
987RTDECL(uint32_t) RTDbgModRetain(RTDBGMOD hDbgMod);
988
989/**
990 * Release a reference to the module.
991 *
992 * When the reference count reaches zero, the module is destroyed.
993 *
994 * @returns New reference count, UINT32_MAX on invalid handle (asserted).
995 *
996 * @param hDbgMod The module handle. The NIL handle is quietly ignored
997 * and 0 is returned.
998 *
999 * @remarks Will not take any locks.
1000 */
1001RTDECL(uint32_t) RTDbgModRelease(RTDBGMOD hDbgMod);
1002
1003/**
1004 * Removes all content from the debug module (container), optionally only
1005 * leaving segments and image size intact.
1006 *
1007 * This is only possible on container modules, i.e. created by RTDbgModCreate().
1008 *
1009 * @returns IPRT status code.
1010 * @param hDbgMod The module handle.
1011 * @param fLeaveSegments Whether to leave segments (and image size) as is.
1012 */
1013RTDECL(int) RTDbgModRemoveAll(RTDBGMOD hDbgMod, bool fLeaveSegments);
1014
1015/**
1016 * Gets the module name.
1017 *
1018 * @returns Pointer to a read only string containing the name.
1019 *
1020 * @param hDbgMod The module handle.
1021 */
1022RTDECL(const char *) RTDbgModName(RTDBGMOD hDbgMod);
1023
1024/**
1025 * Gets the name of the debug info file we're using.
1026 *
1027 * @returns Pointer to a read only string containing the filename, NULL if we
1028 * don't use one.
1029 *
1030 * @param hDbgMod The module handle.
1031 */
1032RTDECL(const char *) RTDbgModDebugFile(RTDBGMOD hDbgMod);
1033
1034/**
1035 * Gets the image filename (as specified by the user).
1036 *
1037 * @returns Pointer to a read only string containing the filename.
1038 *
1039 * @param hDbgMod The module handle.
1040 */
1041RTDECL(const char *) RTDbgModImageFile(RTDBGMOD hDbgMod);
1042
1043/**
1044 * Gets the image filename actually used if it differs from RTDbgModImageFile.
1045 *
1046 * @returns Pointer to a read only string containing the filename, NULL if same
1047 * as RTDBgModImageFile.
1048 *
1049 * @param hDbgMod The module handle.
1050 */
1051RTDECL(const char *) RTDbgModImageFileUsed(RTDBGMOD hDbgMod);
1052
1053/**
1054 * Checks if the loading of the debug info has been postponed.
1055 *
1056 * @returns true if postponed, false if not or invalid handle.
1057 * @param hDbgMod The module handle.
1058 */
1059RTDECL(bool) RTDbgModIsDeferred(RTDBGMOD hDbgMod);
1060
1061/**
1062 * Checks if the debug info is exports only.
1063 *
1064 * @returns true if exports only, false if not or invalid handle.
1065 * @param hDbgMod The module handle.
1066 */
1067RTDECL(bool) RTDbgModIsExports(RTDBGMOD hDbgMod);
1068
1069/**
1070 * Converts an image relative address to a segment:offset address.
1071 *
1072 * @returns Segment index on success.
1073 * NIL_RTDBGSEGIDX is returned if the module handle or the RVA are
1074 * invalid.
1075 *
1076 * @param hDbgMod The module handle.
1077 * @param uRva The image relative address to convert.
1078 * @param poffSeg Where to return the segment offset. Optional.
1079 */
1080RTDECL(RTDBGSEGIDX) RTDbgModRvaToSegOff(RTDBGMOD hDbgMod, RTUINTPTR uRva, PRTUINTPTR poffSeg);
1081
1082/**
1083 * Image size when mapped if segments are mapped adjacently.
1084 *
1085 * For ELF, PE, and Mach-O images this is (usually) a natural query, for LX and
1086 * NE and such it's a bit odder and the answer may not make much sense for them.
1087 *
1088 * @returns Image mapped size.
1089 * RTUINTPTR_MAX is returned if the handle is invalid.
1090 *
1091 * @param hDbgMod The module handle.
1092 */
1093RTDECL(RTUINTPTR) RTDbgModImageSize(RTDBGMOD hDbgMod);
1094
1095/**
1096 * Gets the module tag value if any.
1097 *
1098 * @returns The tag. 0 if hDbgMod is invalid.
1099 *
1100 * @param hDbgMod The module handle.
1101 */
1102RTDECL(uint64_t) RTDbgModGetTag(RTDBGMOD hDbgMod);
1103
1104/**
1105 * Tags or untags the module.
1106 *
1107 * @returns IPRT status code.
1108 * @retval VERR_INVALID_HANDLE if hDbgMod is invalid.
1109 *
1110 * @param hDbgMod The module handle.
1111 * @param uTag The tag value. The convention is that 0 is no tag
1112 * and any other value means it's tagged. It's adviced
1113 * to use some kind of unique number like an address
1114 * (global or string cache for instance) to avoid
1115 * collisions with other users
1116 */
1117RTDECL(int) RTDbgModSetTag(RTDBGMOD hDbgMod, uint64_t uTag);
1118
1119
1120/**
1121 * Adds a segment to the module. Optional feature.
1122 *
1123 * This method is intended used for manually constructing debug info for a
1124 * module. The main usage is from other debug info interpreters that want to
1125 * avoid writing a debug info database and instead uses the standard container
1126 * behind the scenes.
1127 *
1128 * @returns IPRT status code.
1129 * @retval VERR_NOT_SUPPORTED if this feature isn't support by the debug info
1130 * interpreter. This is a common return code.
1131 * @retval VERR_INVALID_HANDLE if hDbgMod is invalid.
1132 * @retval VERR_DBG_ADDRESS_WRAP if uRva+cb wraps around.
1133 * @retval VERR_DBG_SEGMENT_NAME_OUT_OF_RANGE if pszName is too short or long.
1134 * @retval VERR_INVALID_PARAMETER if fFlags contains undefined flags.
1135 * @retval VERR_DBG_SPECIAL_SEGMENT if *piSeg is a special segment.
1136 * @retval VERR_DBG_INVALID_SEGMENT_INDEX if *piSeg doesn't meet expectations.
1137 *
1138 * @param hDbgMod The module handle.
1139 * @param uRva The image relative address of the segment.
1140 * @param cb The size of the segment.
1141 * @param pszName The segment name. Does not normally need to be
1142 * unique, although this is somewhat up to the
1143 * debug interpreter to decide.
1144 * @param fFlags Segment flags. Reserved for future used, MBZ.
1145 * @param piSeg The segment index or NIL_RTDBGSEGIDX on input.
1146 * The assigned segment index on successful return.
1147 * Optional.
1148 */
1149RTDECL(int) RTDbgModSegmentAdd(RTDBGMOD hDbgMod, RTUINTPTR uRva, RTUINTPTR cb, const char *pszName,
1150 uint32_t fFlags, PRTDBGSEGIDX piSeg);
1151
1152/**
1153 * Gets the number of segments in the module.
1154 *
1155 * This is can be used to determine the range which can be passed to
1156 * RTDbgModSegmentByIndex and derivates.
1157 *
1158 * @returns The segment relative address.
1159 * NIL_RTDBGSEGIDX if the handle is invalid.
1160 *
1161 * @param hDbgMod The module handle.
1162 */
1163RTDECL(RTDBGSEGIDX) RTDbgModSegmentCount(RTDBGMOD hDbgMod);
1164
1165/**
1166 * Query information about a segment.
1167 *
1168 * This can be used together with RTDbgModSegmentCount to enumerate segments.
1169 * The index starts a 0 and stops one below RTDbgModSegmentCount.
1170 *
1171 * @returns IPRT status code.
1172 * @retval VERR_DBG_INVALID_SEGMENT_INDEX if iSeg is too high.
1173 * @retval VERR_DBG_SPECIAL_SEGMENT if iSeg indicates a special segment.
1174 * @retval VERR_INVALID_HANDLE if hDbgMod is invalid.
1175 *
1176 * @param hDbgMod The module handle.
1177 * @param iSeg The segment index. No special segments.
1178 * @param pSegInfo Where to return the segment info. The
1179 * RTDBGSEGMENT::Address member will be set to
1180 * RTUINTPTR_MAX or the load address used at link time.
1181 */
1182RTDECL(int) RTDbgModSegmentByIndex(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, PRTDBGSEGMENT pSegInfo);
1183
1184/**
1185 * Gets the size of a segment.
1186 *
1187 * This is a just a wrapper around RTDbgModSegmentByIndex.
1188 *
1189 * @returns The segment size.
1190 * RTUINTPTR_MAX is returned if either the handle and segment index are
1191 * invalid.
1192 *
1193 * @param hDbgMod The module handle.
1194 * @param iSeg The segment index. RTDBGSEGIDX_ABS is not allowed.
1195 * If RTDBGSEGIDX_RVA is used, the functions returns
1196 * the same value as RTDbgModImageSize.
1197 */
1198RTDECL(RTUINTPTR) RTDbgModSegmentSize(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg);
1199
1200/**
1201 * Gets the image relative address of a segment.
1202 *
1203 * This is a just a wrapper around RTDbgModSegmentByIndex.
1204 *
1205 * @returns The segment relative address.
1206 * RTUINTPTR_MAX is returned if either the handle and segment index are
1207 * invalid.
1208 *
1209 * @param hDbgMod The module handle.
1210 * @param iSeg The segment index. No special segment indexes
1211 * allowed (asserted).
1212 */
1213RTDECL(RTUINTPTR) RTDbgModSegmentRva(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg);
1214
1215
1216/**
1217 * Adds a line number to the module.
1218 *
1219 * @returns IPRT status code.
1220 * @retval VERR_NOT_SUPPORTED if the module interpret doesn't support adding
1221 * custom symbols. This is a common place occurrence.
1222 * @retval VERR_INVALID_HANDLE if hDbgMod is invalid.
1223 * @retval VERR_DBG_SYMBOL_NAME_OUT_OF_RANGE if the symbol name is too long or
1224 * short.
1225 * @retval VERR_DBG_INVALID_RVA if an image relative address is specified and
1226 * it's not inside any of the segments defined by the module.
1227 * @retval VERR_DBG_INVALID_SEGMENT_INDEX if the segment index isn't valid.
1228 * @retval VERR_DBG_INVALID_SEGMENT_OFFSET if the segment offset is beyond the
1229 * end of the segment.
1230 * @retval VERR_DBG_ADDRESS_WRAP if off+cb wraps around.
1231 * @retval VERR_INVALID_PARAMETER if the symbol flags sets undefined bits.
1232 *
1233 * @param hDbgMod The module handle.
1234 * @param pszSymbol The symbol name.
1235 * @param iSeg The segment index.
1236 * @param off The segment offset.
1237 * @param cb The size of the symbol. Can be zero, although this
1238 * may depend somewhat on the debug interpreter.
1239 * @param fFlags Symbol flags. Reserved for the future, MBZ.
1240 * @param piOrdinal Where to return the symbol ordinal on success. If
1241 * the interpreter doesn't do ordinals, this will be set to
1242 * UINT32_MAX. Optional.
1243 */
1244RTDECL(int) RTDbgModSymbolAdd(RTDBGMOD hDbgMod, const char *pszSymbol, RTDBGSEGIDX iSeg, RTUINTPTR off,
1245 RTUINTPTR cb, uint32_t fFlags, uint32_t *piOrdinal);
1246
1247/**
1248 * Gets the symbol count.
1249 *
1250 * This can be used together wtih RTDbgModSymbolByOrdinal or
1251 * RTDbgModSymbolByOrdinalA to enumerate all the symbols.
1252 *
1253 * @returns The number of symbols in the module.
1254 * UINT32_MAX is returned if the module handle is invalid or some other
1255 * error occurs.
1256 *
1257 * @param hDbgMod The module handle.
1258 */
1259RTDECL(uint32_t) RTDbgModSymbolCount(RTDBGMOD hDbgMod);
1260
1261/**
1262 * Queries symbol information by ordinal number.
1263 *
1264 * @returns IPRT status code.
1265 * @retval VERR_SYMBOL_NOT_FOUND if there is no symbol at the given number.
1266 * @retval VERR_DBG_NO_SYMBOLS if there aren't any symbols.
1267 * @retval VERR_INVALID_HANDLE if hDbgMod is invalid.
1268 * @retval VERR_NOT_SUPPORTED if lookup by ordinal is not supported.
1269 *
1270 * @param hDbgMod The module handle.
1271 * @param iOrdinal The symbol ordinal number. 0-based. The highest
1272 * number is RTDbgModSymbolCount() - 1.
1273 * @param pSymInfo Where to store the symbol information.
1274 */
1275RTDECL(int) RTDbgModSymbolByOrdinal(RTDBGMOD hDbgMod, uint32_t iOrdinal, PRTDBGSYMBOL pSymInfo);
1276
1277/**
1278 * Queries symbol information by ordinal number.
1279 *
1280 * @returns IPRT status code.
1281 * @retval VERR_DBG_NO_SYMBOLS if there aren't any symbols.
1282 * @retval VERR_NOT_SUPPORTED if lookup by ordinal is not supported.
1283 * @retval VERR_SYMBOL_NOT_FOUND if there is no symbol at the given number.
1284 * @retval VERR_NO_MEMORY if RTDbgSymbolAlloc fails.
1285 *
1286 * @param hDbgMod The module handle.
1287 * @param iOrdinal The symbol ordinal number. 0-based. The highest
1288 * number is RTDbgModSymbolCount() - 1.
1289 * @param ppSymInfo Where to store the pointer to the returned
1290 * symbol information. Always set. Free with
1291 * RTDbgSymbolFree.
1292 */
1293RTDECL(int) RTDbgModSymbolByOrdinalA(RTDBGMOD hDbgMod, uint32_t iOrdinal, PRTDBGSYMBOL *ppSymInfo);
1294
1295/**
1296 * Queries symbol information by address.
1297 *
1298 * The returned symbol is what the debug info interpreter considers the symbol
1299 * most applicable to the specified address. This usually means a symbol with an
1300 * address equal or lower than the requested.
1301 *
1302 * @returns IPRT status code.
1303 * @retval VERR_SYMBOL_NOT_FOUND if no suitable symbol was found.
1304 * @retval VERR_DBG_NO_SYMBOLS if there aren't any symbols.
1305 * @retval VERR_INVALID_HANDLE if hDbgMod is invalid.
1306 * @retval VERR_DBG_INVALID_RVA if an image relative address is specified and
1307 * it's not inside any of the segments defined by the module.
1308 * @retval VERR_DBG_INVALID_SEGMENT_INDEX if the segment index isn't valid.
1309 * @retval VERR_DBG_INVALID_SEGMENT_OFFSET if the segment offset is beyond the
1310 * end of the segment.
1311 * @retval VERR_INVALID_PARAMETER if incorrect flags.
1312 *
1313 * @param hDbgMod The module handle.
1314 * @param iSeg The segment number.
1315 * @param off The offset into the segment.
1316 * @param fFlags Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
1317 * @param poffDisp Where to store the distance between the
1318 * specified address and the returned symbol.
1319 * Optional.
1320 * @param pSymInfo Where to store the symbol information.
1321 */
1322RTDECL(int) RTDbgModSymbolByAddr(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, uint32_t fFlags,
1323 PRTINTPTR poffDisp, PRTDBGSYMBOL pSymInfo);
1324
1325/**
1326 * Queries symbol information by address.
1327 *
1328 * The returned symbol is what the debug info interpreter considers the symbol
1329 * most applicable to the specified address. This usually means a symbol with an
1330 * address equal or lower than the requested.
1331 *
1332 * @returns IPRT status code.
1333 * @retval VERR_SYMBOL_NOT_FOUND if no suitable symbol was found.
1334 * @retval VERR_DBG_NO_SYMBOLS if there aren't any symbols.
1335 * @retval VERR_INVALID_HANDLE if hDbgMod is invalid.
1336 * @retval VERR_DBG_INVALID_RVA if an image relative address is specified and
1337 * it's not inside any of the segments defined by the module.
1338 * @retval VERR_DBG_INVALID_SEGMENT_INDEX if the segment index isn't valid.
1339 * @retval VERR_DBG_INVALID_SEGMENT_OFFSET if the segment offset is beyond the
1340 * end of the segment.
1341 * @retval VERR_NO_MEMORY if RTDbgSymbolAlloc fails.
1342 * @retval VERR_INVALID_PARAMETER if incorrect flags.
1343 *
1344 * @param hDbgMod The module handle.
1345 * @param iSeg The segment index.
1346 * @param off The offset into the segment.
1347 * @param fFlags Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
1348 * @param poffDisp Where to store the distance between the
1349 * specified address and the returned symbol. Optional.
1350 * @param ppSymInfo Where to store the pointer to the returned
1351 * symbol information. Always set. Free with
1352 * RTDbgSymbolFree.
1353 */
1354RTDECL(int) RTDbgModSymbolByAddrA(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, uint32_t fFlags,
1355 PRTINTPTR poffDisp, PRTDBGSYMBOL *ppSymInfo);
1356
1357/**
1358 * Queries symbol information by symbol name.
1359 *
1360 * @returns IPRT status code.
1361 * @retval VERR_DBG_NO_SYMBOLS if there aren't any symbols.
1362 * @retval VERR_SYMBOL_NOT_FOUND if no suitable symbol was found.
1363 * @retval VERR_DBG_SYMBOL_NAME_OUT_OF_RANGE if the symbol name is too long or
1364 * short.
1365 *
1366 * @param hDbgMod The module handle.
1367 * @param pszSymbol The symbol name.
1368 * @param pSymInfo Where to store the symbol information.
1369 */
1370RTDECL(int) RTDbgModSymbolByName(RTDBGMOD hDbgMod, const char *pszSymbol, PRTDBGSYMBOL pSymInfo);
1371
1372/**
1373 * Queries symbol information by symbol name.
1374 *
1375 * @returns IPRT status code.
1376 * @retval VERR_DBG_NO_SYMBOLS if there aren't any symbols.
1377 * @retval VERR_SYMBOL_NOT_FOUND if no suitable symbol was found.
1378 * @retval VERR_DBG_SYMBOL_NAME_OUT_OF_RANGE if the symbol name is too long or
1379 * short.
1380 * @retval VERR_NO_MEMORY if RTDbgSymbolAlloc fails.
1381 *
1382 * @param hDbgMod The module handle.
1383 * @param pszSymbol The symbol name.
1384 * @param ppSymInfo Where to store the pointer to the returned
1385 * symbol information. Always set. Free with
1386 * RTDbgSymbolFree.
1387 */
1388RTDECL(int) RTDbgModSymbolByNameA(RTDBGMOD hDbgMod, const char *pszSymbol, PRTDBGSYMBOL *ppSymInfo);
1389
1390/**
1391 * Adds a line number to the module.
1392 *
1393 * @returns IPRT status code.
1394 * @retval VERR_NOT_SUPPORTED if the module interpret doesn't support adding
1395 * custom symbols. This should be consider a normal response.
1396 * @retval VERR_INVALID_HANDLE if hDbgMod is invalid.
1397 * @retval VERR_DBG_FILE_NAME_OUT_OF_RANGE if the file name is too longer or
1398 * empty.
1399 * @retval VERR_DBG_INVALID_RVA if an image relative address is specified and
1400 * it's not inside any of the segments defined by the module.
1401 * @retval VERR_DBG_INVALID_SEGMENT_INDEX if the segment index isn't valid.
1402 * @retval VERR_DBG_INVALID_SEGMENT_OFFSET if the segment offset is beyond the
1403 * end of the segment.
1404 * @retval VERR_INVALID_PARAMETER if the line number flags sets undefined bits.
1405 *
1406 * @param hDbgMod The module handle.
1407 * @param pszFile The file name.
1408 * @param uLineNo The line number.
1409 * @param iSeg The segment index.
1410 * @param off The segment offset.
1411 * @param piOrdinal Where to return the line number ordinal on
1412 * success. If the interpreter doesn't do ordinals,
1413 * this will be set to UINT32_MAX. Optional.
1414 */
1415RTDECL(int) RTDbgModLineAdd(RTDBGMOD hDbgMod, const char *pszFile, uint32_t uLineNo,
1416 RTDBGSEGIDX iSeg, RTUINTPTR off, uint32_t *piOrdinal);
1417
1418/**
1419 * Gets the line number count.
1420 *
1421 * This can be used together wtih RTDbgModLineByOrdinal or RTDbgModSymbolByLineA
1422 * to enumerate all the line number information.
1423 *
1424 * @returns The number of line numbers in the module.
1425 * UINT32_MAX is returned if the module handle is invalid or some other
1426 * error occurs.
1427 *
1428 * @param hDbgMod The module handle.
1429 */
1430RTDECL(uint32_t) RTDbgModLineCount(RTDBGMOD hDbgMod);
1431
1432/**
1433 * Queries line number information by ordinal number.
1434 *
1435 * This can be used to enumerate the line numbers for the module. Use
1436 * RTDbgModLineCount() to figure the end of the ordinals.
1437 *
1438 * @returns IPRT status code.
1439 * @retval VERR_DBG_NO_LINE_NUMBERS if there aren't any line numbers.
1440 * @retval VERR_DBG_LINE_NOT_FOUND if there is no line number with that
1441 * ordinal.
1442 * @retval VERR_INVALID_HANDLE if hDbgMod is invalid.
1443
1444 * @param hDbgMod The module handle.
1445 * @param iOrdinal The line number ordinal number.
1446 * @param pLineInfo Where to store the information about the line
1447 * number.
1448 */
1449RTDECL(int) RTDbgModLineByOrdinal(RTDBGMOD hDbgMod, uint32_t iOrdinal, PRTDBGLINE pLineInfo);
1450
1451/**
1452 * Queries line number information by ordinal number.
1453 *
1454 * This can be used to enumerate the line numbers for the module. Use
1455 * RTDbgModLineCount() to figure the end of the ordinals.
1456 *
1457 * @returns IPRT status code.
1458 * @retval VERR_DBG_NO_LINE_NUMBERS if there aren't any line numbers.
1459 * @retval VERR_DBG_LINE_NOT_FOUND if there is no line number with that
1460 * ordinal.
1461 * @retval VERR_INVALID_HANDLE if hDbgMod is invalid.
1462 * @retval VERR_NO_MEMORY if RTDbgLineAlloc fails.
1463 *
1464 * @param hDbgMod The module handle.
1465 * @param iOrdinal The line number ordinal number.
1466 * @param ppLineInfo Where to store the pointer to the returned line
1467 * number information. Always set. Free with
1468 * RTDbgLineFree.
1469 */
1470RTDECL(int) RTDbgModLineByOrdinalA(RTDBGMOD hDbgMod, uint32_t iOrdinal, PRTDBGLINE *ppLineInfo);
1471
1472/**
1473 * Queries line number information by address.
1474 *
1475 * The returned line number is what the debug info interpreter considers the
1476 * one most applicable to the specified address. This usually means a line
1477 * number with an address equal or lower than the requested.
1478 *
1479 * @returns IPRT status code.
1480 * @retval VERR_DBG_NO_LINE_NUMBERS if there aren't any line numbers.
1481 * @retval VERR_DBG_LINE_NOT_FOUND if no suitable line number was found.
1482 * @retval VERR_INVALID_HANDLE if hDbgMod is invalid.
1483 * @retval VERR_DBG_INVALID_RVA if an image relative address is specified and
1484 * it's not inside any of the segments defined by the module.
1485 * @retval VERR_DBG_INVALID_SEGMENT_INDEX if the segment index isn't valid.
1486 * @retval VERR_DBG_INVALID_SEGMENT_OFFSET if the segment offset is beyond the
1487 * end of the segment.
1488 *
1489 * @param hDbgMod The module handle.
1490 * @param iSeg The segment number.
1491 * @param off The offset into the segment.
1492 * @param poffDisp Where to store the distance between the
1493 * specified address and the returned symbol.
1494 * Optional.
1495 * @param pLineInfo Where to store the line number information.
1496 */
1497RTDECL(int) RTDbgModLineByAddr(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, PRTINTPTR poffDisp, PRTDBGLINE pLineInfo);
1498
1499/**
1500 * Queries line number information by address.
1501 *
1502 * The returned line number is what the debug info interpreter considers the
1503 * one most applicable to the specified address. This usually means a line
1504 * number with an address equal or lower than the requested.
1505 *
1506 * @returns IPRT status code.
1507 * @retval VERR_DBG_NO_LINE_NUMBERS if there aren't any line numbers.
1508 * @retval VERR_DBG_LINE_NOT_FOUND if no suitable line number was found.
1509 * @retval VERR_INVALID_HANDLE if hDbgMod is invalid.
1510 * @retval VERR_DBG_INVALID_RVA if an image relative address is specified and
1511 * it's not inside any of the segments defined by the module.
1512 * @retval VERR_DBG_INVALID_SEGMENT_INDEX if the segment index isn't valid.
1513 * @retval VERR_DBG_INVALID_SEGMENT_OFFSET if the segment offset is beyond the
1514 * end of the segment.
1515 * @retval VERR_NO_MEMORY if RTDbgLineAlloc fails.
1516 *
1517 * @param hDbgMod The module handle.
1518 * @param iSeg The segment number.
1519 * @param off The offset into the segment.
1520 * @param poffDisp Where to store the distance between the
1521 * specified address and the returned symbol.
1522 * Optional.
1523 * @param ppLineInfo Where to store the pointer to the returned line
1524 * number information. Always set. Free with
1525 * RTDbgLineFree.
1526 */
1527RTDECL(int) RTDbgModLineByAddrA(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, PRTINTPTR poffDisp, PRTDBGLINE *ppLineInfo);
1528/** @} */
1529
1530# endif /* IN_RING3 */
1531
1532
1533/** @name Kernel Debug Info API
1534 *
1535 * This is a specialized API for obtaining symbols and structure information
1536 * about the running kernel. It is relatively OS specific. Its purpose and
1537 * operation is doesn't map all that well onto RTDbgMod, so a few dedicated
1538 * functions was created for it.
1539 *
1540 * @{ */
1541
1542/** Handle to the kernel debug info. */
1543typedef struct RTDBGKRNLINFOINT *RTDBGKRNLINFO;
1544/** Pointer to a kernel debug info handle. */
1545typedef RTDBGKRNLINFO *PRTDBGKRNLINFO;
1546/** Nil kernel debug info handle. */
1547#define NIL_RTDBGKRNLINFO ((RTDBGKRNLINFO)0)
1548
1549/**
1550 * Opens the kernel debug info.
1551 *
1552 * @returns IPRT status code. Can fail for any number of reasons.
1553 *
1554 * @param phKrnlInfo Where to return the kernel debug info handle on
1555 * success.
1556 * @param fFlags Flags reserved for future use. Must be zero.
1557 */
1558RTR0DECL(int) RTR0DbgKrnlInfoOpen(PRTDBGKRNLINFO phKrnlInfo, uint32_t fFlags);
1559
1560/**
1561 * Retains a reference to the kernel debug info handle.
1562 *
1563 * @returns New reference count, UINT32_MAX on invalid handle (asserted).
1564 * @param hKrnlInfo The kernel info handle.
1565 */
1566RTR0DECL(uint32_t) RTR0DbgKrnlInfoRetain(RTDBGKRNLINFO hKrnlInfo);
1567
1568
1569/**
1570 * Releases a reference to the kernel debug info handle, destroying it when the
1571 * counter reaches zero.
1572 *
1573 * @returns New reference count, UINT32_MAX on invalid handle (asserted).
1574 * @param hKrnlInfo The kernel info handle. NIL_RTDBGKRNLINFO is
1575 * quietly ignored.
1576 */
1577RTR0DECL(uint32_t) RTR0DbgKrnlInfoRelease(RTDBGKRNLINFO hKrnlInfo);
1578
1579/**
1580 * Queries the offset (in bytes) of a member of a kernel structure.
1581 *
1582 * @returns IPRT status code.
1583 * @retval VINF_SUCCESS and offset at @a poffMember.
1584 * @retval VERR_NOT_FOUND if the structure or the member was not found.
1585 * @retval VERR_INVALID_HANDLE if hKrnlInfo is bad.
1586 * @retval VERR_INVALID_POINTER if any of the pointers are bad.
1587 *
1588 * @param hKrnlInfo The kernel info handle.
1589 * @param pszStructure The structure name.
1590 * @param pszMember The member name.
1591 * @param poffMember Where to return the offset.
1592 */
1593RTR0DECL(int) RTR0DbgKrnlInfoQueryMember(RTDBGKRNLINFO hKrnlInfo, const char *pszStructure,
1594 const char *pszMember, size_t *poffMember);
1595
1596
1597/**
1598 * Queries the value (usually the address) of a kernel symbol.
1599 *
1600 * This may go looking for the symbol in other modules, in which case it will
1601 * always check the kernel symbol table first.
1602 *
1603 * @returns IPRT status code.
1604 * @retval VINF_SUCCESS and value at @a ppvSymbol.
1605 * @retval VERR_SYMBOL_NOT_FOUND
1606 * @retval VERR_INVALID_HANDLE if hKrnlInfo is bad.
1607 * @retval VERR_INVALID_POINTER if any of the pointers are bad.
1608 *
1609 * @param hKrnlInfo The kernel info handle.
1610 * @param pszModule Reserved for future extensions. Pass NULL.
1611 * @param pszSymbol The C name of the symbol.
1612 * @param ppvSymbol Where to return the symbol value, passing NULL is
1613 * OK. This may be modified even on failure, in
1614 * particular, it will be set to NULL when
1615 * VERR_SYMBOL_NOT_FOUND is returned.
1616 *
1617 * @sa RTLdrGetSymbol.
1618 */
1619RTR0DECL(int) RTR0DbgKrnlInfoQuerySymbol(RTDBGKRNLINFO hKrnlInfo, const char *pszModule,
1620 const char *pszSymbol, void **ppvSymbol);
1621/** @} */
1622
1623/** @} */
1624
1625RT_C_DECLS_END
1626
1627#endif
1628
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette