VirtualBox

source: vbox/trunk/src/VBox/Runtime/include/internal/dbgmod.h@ 47559

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

IPRT: Changed RTLDRSEG::pchName to pszName and make sure it's always set to something. Started on implementing a codeview reader.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 24.9 KB
Line 
1/* $Id: dbgmod.h 46266 2013-05-25 19:51:19Z vboxsync $ */
2/** @file
3 * IPRT - Internal Header for RTDbgMod and the associated interpreters.
4 */
5
6/*
7 * Copyright (C) 2008-2012 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. 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 ___internal_dbgmod_h
28#define ___internal_dbgmod_h
29
30#include <iprt/types.h>
31#include <iprt/critsect.h>
32#include <iprt/ldr.h> /* for PFNRTLDRENUMDBG */
33#include "internal/magics.h"
34
35RT_C_DECLS_BEGIN
36
37/** @addtogroup grp_rt_dbgmod
38 * @internal
39 * @{
40 */
41
42
43/** Pointer to the internal module structure. */
44typedef struct RTDBGMODINT *PRTDBGMODINT;
45
46/**
47 * Virtual method table for executable image interpreters.
48 */
49typedef struct RTDBGMODVTIMG
50{
51 /** Magic number (RTDBGMODVTIMG_MAGIC). */
52 uint32_t u32Magic;
53 /** Reserved. */
54 uint32_t fReserved;
55 /** The name of the interpreter. */
56 const char *pszName;
57
58 /**
59 * Try open the image.
60 *
61 * This combines probing and opening.
62 *
63 * @returns IPRT status code. No informational returns defined.
64 *
65 * @param pMod Pointer to the module that is being opened.
66 *
67 * The RTDBGMOD::pszDbgFile member will point to
68 * the filename of any debug info we're aware of
69 * on input. Also, or alternatively, it is expected
70 * that the interpreter will look for debug info in
71 * the executable image file when present and that it
72 * may ask the image interpreter for this when it's
73 * around.
74 *
75 * Upon successful return the method is expected to
76 * initialize pImgOps and pvImgPriv.
77 * @param enmArch The desired architecture.
78 */
79 DECLCALLBACKMEMBER(int, pfnTryOpen)(PRTDBGMODINT pMod, RTLDRARCH enmArch);
80
81 /**
82 * Close the interpreter, freeing all associated resources.
83 *
84 * The caller sets the pDbgOps and pvDbgPriv RTDBGMOD members
85 * to NULL upon return.
86 *
87 * @param pMod Pointer to the module structure.
88 */
89 DECLCALLBACKMEMBER(int, pfnClose)(PRTDBGMODINT pMod);
90
91 /**
92 * Enumerate the debug info contained in the executable image.
93 *
94 * Identical to RTLdrEnumDbgInfo.
95 *
96 * @returns IPRT status code or whatever pfnCallback returns.
97 *
98 * @param pMod Pointer to the module structure.
99 * @param pfnCallback The callback function. Ignore the module
100 * handle argument!
101 * @param pvUser The user argument.
102 */
103 DECLCALLBACKMEMBER(int, pfnEnumDbgInfo)(PRTDBGMODINT pMod, PFNRTLDRENUMDBG pfnCallback, void *pvUser);
104
105 /**
106 * Enumerate the segments in the executable image.
107 *
108 * Identical to RTLdrEnumSegments.
109 *
110 * @returns IPRT status code or whatever pfnCallback returns.
111 *
112 * @param pMod Pointer to the module structure.
113 * @param pfnCallback The callback function. Ignore the module
114 * handle argument!
115 * @param pvUser The user argument.
116 */
117 DECLCALLBACKMEMBER(int, pfnEnumSegments)(PRTDBGMODINT pMod, PFNRTLDRENUMSEGS pfnCallback, void *pvUser);
118
119 /**
120 * Enumerates the symbols exported by the module.
121 *
122 * @returns iprt status code, which might have been returned by pfnCallback.
123 * @param pMod Pointer to the module structure.
124 * @param fFlags Flags indicating what to return and such.
125 * @param BaseAddress The image base addressto use when calculating the
126 * symbol values.
127 * @param pfnCallback The callback function which each symbol is to be fed
128 * to.
129 * @param pvUser User argument to pass to the enumerator.
130 */
131 DECLCALLBACKMEMBER(int, pfnEnumSymbols)(PRTDBGMODINT pMod, uint32_t fFlags, RTLDRADDR BaseAddress,
132 PFNRTLDRENUMSYMS pfnCallback, void *pvUser);
133
134 /**
135 * Gets the size of the loaded image.
136 *
137 * Identical to RTLdrSize.
138 *
139 * @returns The size in bytes, RTUINTPTR_MAX on failure.
140 *
141 * @param pMod Pointer to the module structure.
142 */
143 DECLCALLBACKMEMBER(RTUINTPTR, pfnImageSize)(PRTDBGMODINT pMod);
144
145 /**
146 * Converts a link address to a segment:offset address (RVA included).
147 *
148 * @returns IPRT status code.
149 *
150 * @param pMod Pointer to the module structure.
151 * @param LinkAddress The link address to convert.
152 * @param piSeg The segment index.
153 * @param poffSeg Where to return the segment offset.
154 */
155 DECLCALLBACKMEMBER(int, pfnLinkAddressToSegOffset)(PRTDBGMODINT pMod, RTLDRADDR LinkAddress,
156 PRTDBGSEGIDX piSeg, PRTLDRADDR poffSeg);
157
158 /**
159 * Converts an image relative virtual address to a segment:offset.
160 *
161 * @returns IPRT status code.
162 *
163 * @param pMod Pointer to the loader module structure.
164 * @param Rva The RVA to convert.
165 * @param piSeg The segment index.
166 * @param poffSeg Where to return the segment offset.
167 */
168 DECLCALLBACKMEMBER(int, pfnRvaToSegOffset)(PRTDBGMODINT pMod, RTLDRADDR Rva, uint32_t *piSeg, PRTLDRADDR poffSeg);
169
170 /**
171 * Creates a read-only mapping of a part of the image file.
172 *
173 * @returns IPRT status code and *ppvMap set on success.
174 *
175 * @param pMod Pointer to the module structure.
176 * @param iDbgInfo The debug info ordinal number if the request
177 * corresponds exactly to a debug info part from
178 * pfnEnumDbgInfo. Otherwise, pass UINT32_MAX.
179 * @param off The offset into the image file.
180 * @param cb The number of bytes to map.
181 * @param ppvMap Where to return the mapping address on success.
182 *
183 * @remarks Fixups will only be applied if @a iDbgInfo is specified.
184 */
185 DECLCALLBACKMEMBER(int, pfnMapPart)(PRTDBGMODINT pMod, uint32_t iDbgInfo, RTFOFF off, size_t cb, void const **ppvMap);
186
187 /**
188 * Unmaps memory previously mapped by pfnMapPart.
189 *
190 * @returns IPRT status code, *ppvMap set to NULL on success.
191 *
192 * @param pMod Pointer to the module structure.
193 * @param cb The size of the mapping.
194 * @param ppvMap The mapping address on input, NULL on
195 * successful return.
196 */
197 DECLCALLBACKMEMBER(int, pfnUnmapPart)(PRTDBGMODINT pMod, size_t cb, void const **ppvMap);
198
199 /**
200 * Reads data from the image file.
201 *
202 * @returns IPRT status code, *ppvMap set to NULL on success.
203 *
204 * @param pMod Pointer to the module structure.
205 * @param iDbgInfoHint The debug info ordinal number hint, pass UINT32_MAX
206 * if not know or sure.
207 * @param off The offset into the image file.
208 * @param pvBuf The buffer to read into.
209 * @param cb The number of bytes to read.
210 */
211 DECLCALLBACKMEMBER(int, pfnReadAt)(PRTDBGMODINT pMod, uint32_t iDbgInfoHint, RTFOFF off, void *pvBuf, size_t cb);
212
213 /**
214 * Gets the image format.
215 *
216 * @returns Valid image format on success, RTLDRFMT_INVALID if not supported.
217 * @param pMod Pointer to the module structure.
218 */
219 DECLCALLBACKMEMBER(RTLDRFMT, pfnGetFormat)(PRTDBGMODINT pMod);
220
221 /**
222 * Gets the image architecture.
223 *
224 * @returns Valid image architecutre on success, RTLDRARCH_WHATEVER if not
225 * supported.
226 * @param pMod Pointer to the module structure.
227 */
228 DECLCALLBACKMEMBER(RTLDRARCH, pfnGetArch)(PRTDBGMODINT pMod);
229
230 /** For catching initialization errors (RTDBGMODVTIMG_MAGIC). */
231 uint32_t u32EndMagic;
232} RTDBGMODVTIMG;
233/** Pointer to a const RTDBGMODVTIMG. */
234typedef RTDBGMODVTIMG const *PCRTDBGMODVTIMG;
235
236
237/**
238 * Virtual method table for debug info interpreters.
239 */
240typedef struct RTDBGMODVTDBG
241{
242 /** Magic number (RTDBGMODVTDBG_MAGIC). */
243 uint32_t u32Magic;
244 /** Mask of supported debug info types, see grp_rt_dbg_type.
245 * Used to speed up the search for a suitable interpreter. */
246 uint32_t fSupports;
247 /** The name of the interpreter. */
248 const char *pszName;
249
250 /**
251 * Try open the image.
252 *
253 * This combines probing and opening.
254 *
255 * @returns IPRT status code. No informational returns defined.
256 *
257 * @param pMod Pointer to the module that is being opened.
258 *
259 * The RTDBGMOD::pszDbgFile member will point to
260 * the filename of any debug info we're aware of
261 * on input. Also, or alternatively, it is expected
262 * that the interpreter will look for debug info in
263 * the executable image file when present and that it
264 * may ask the image interpreter for this when it's
265 * around.
266 *
267 * Upon successful return the method is expected to
268 * initialize pDbgOps and pvDbgPriv.
269 * @param enmArch The desired architecture.
270 */
271 DECLCALLBACKMEMBER(int, pfnTryOpen)(PRTDBGMODINT pMod, RTLDRARCH enmArch);
272
273 /**
274 * Close the interpreter, freeing all associated resources.
275 *
276 * The caller sets the pDbgOps and pvDbgPriv RTDBGMOD members
277 * to NULL upon return.
278 *
279 * @param pMod Pointer to the module structure.
280 */
281 DECLCALLBACKMEMBER(int, pfnClose)(PRTDBGMODINT pMod);
282
283
284
285 /**
286 * Converts an image relative virtual address address to a segmented address.
287 *
288 * @returns Segment index on success, NIL_RTDBGSEGIDX on failure.
289 * @param pMod Pointer to the module structure.
290 * @param uRva The image relative address to convert.
291 * @param poffSeg Where to return the segment offset. Optional.
292 */
293 DECLCALLBACKMEMBER(RTDBGSEGIDX, pfnRvaToSegOff)(PRTDBGMODINT pMod, RTUINTPTR uRva, PRTUINTPTR poffSeg);
294
295 /**
296 * Image size when mapped if segments are mapped adjacently.
297 *
298 * For ELF, PE, and Mach-O images this is (usually) a natural query, for LX and
299 * NE and such it's a bit odder and the answer may not make much sense for them.
300 *
301 * @returns Image mapped size.
302 * @param pMod Pointer to the module structure.
303 */
304 DECLCALLBACKMEMBER(RTUINTPTR, pfnImageSize)(PRTDBGMODINT pMod);
305
306
307
308 /**
309 * Adds a segment to the module (optional).
310 *
311 * @returns IPRT status code.
312 * @retval VERR_NOT_SUPPORTED if the interpreter doesn't support this feature.
313 * @retval VERR_DBG_SEGMENT_INDEX_CONFLICT if the segment index exists already.
314 *
315 * @param pMod Pointer to the module structure.
316 * @param uRva The segment image relative address.
317 * @param cb The segment size.
318 * @param pszName The segment name.
319 * @param cchName The length of the segment name.
320 * @param fFlags Segment flags.
321 * @param piSeg The segment index or NIL_RTDBGSEGIDX on input.
322 * The assigned segment index on successful return.
323 * Optional.
324 */
325 DECLCALLBACKMEMBER(int, pfnSegmentAdd)(PRTDBGMODINT pMod, RTUINTPTR uRva, RTUINTPTR cb, const char *pszName, size_t cchName,
326 uint32_t fFlags, PRTDBGSEGIDX piSeg);
327
328 /**
329 * Gets the segment count.
330 *
331 * @returns Number of segments.
332 * @retval NIL_RTDBGSEGIDX if unknown.
333 *
334 * @param pMod Pointer to the module structure.
335 */
336 DECLCALLBACKMEMBER(RTDBGSEGIDX, pfnSegmentCount)(PRTDBGMODINT pMod);
337
338 /**
339 * Gets information about a segment.
340 *
341 * @returns IPRT status code.
342 * @retval VERR_DBG_INVALID_SEGMENT_INDEX if iSeg is too high.
343 *
344 * @param pMod Pointer to the module structure.
345 * @param iSeg The segment.
346 * @param pSegInfo Where to store the segment information.
347 */
348 DECLCALLBACKMEMBER(int, pfnSegmentByIndex)(PRTDBGMODINT pMod, RTDBGSEGIDX iSeg, PRTDBGSEGMENT pSegInfo);
349
350
351
352 /**
353 * Adds a symbol to the module (optional).
354 *
355 * @returns IPRT code.
356 * @retval VERR_NOT_SUPPORTED if the interpreter doesn't support this feature.
357 *
358 * @param pMod Pointer to the module structure.
359 * @param pszSymbol The symbol name.
360 * @param cchSymbol The length for the symbol name.
361 * @param iSeg The segment number (0-based). RTDBGMOD_SEG_RVA can be used.
362 * @param off The offset into the segment.
363 * @param cb The area covered by the symbol. 0 is fine.
364 * @param fFlags Flags.
365 * @param piOrdinal Where to return the symbol ordinal on success. If the
366 * interpreter doesn't do ordinals, this will be set to
367 * UINT32_MAX. Optional
368 */
369 DECLCALLBACKMEMBER(int, pfnSymbolAdd)(PRTDBGMODINT pMod, const char *pszSymbol, size_t cchSymbol,
370 uint32_t iSeg, RTUINTPTR off, RTUINTPTR cb, uint32_t fFlags,
371 uint32_t *piOrdinal);
372
373 /**
374 * Gets the number of symbols in the module.
375 *
376 * This is used for figuring out the max value to pass to pfnSymbolByIndex among
377 * other things.
378 *
379 * @returns The number of symbols, UINT32_MAX if not known/supported.
380 *
381 * @param pMod Pointer to the module structure.
382 */
383 DECLCALLBACKMEMBER(uint32_t, pfnSymbolCount)(PRTDBGMODINT pMod);
384
385 /**
386 * Queries symbol information by ordinal number.
387 *
388 * @returns IPRT status code.
389 * @retval VINF_SUCCESS on success, no informational status code.
390 * @retval VERR_DBG_NO_SYMBOLS if there aren't any symbols.
391 * @retval VERR_NOT_SUPPORTED if lookup by ordinal is not supported.
392 * @retval VERR_SYMBOL_NOT_FOUND if there is no symbol at that index.
393 *
394 * @param pMod Pointer to the module structure.
395 * @param iOrdinal The symbol ordinal number.
396 * @param pSymInfo Where to store the symbol information.
397 */
398 DECLCALLBACKMEMBER(int, pfnSymbolByOrdinal)(PRTDBGMODINT pMod, uint32_t iOrdinal, PRTDBGSYMBOL pSymInfo);
399
400 /**
401 * Queries symbol information by symbol name.
402 *
403 * @returns IPRT status code.
404 * @retval VINF_SUCCESS on success, no informational status code.
405 * @retval VERR_DBG_NO_SYMBOLS if there aren't any symbols.
406 * @retval VERR_SYMBOL_NOT_FOUND if no suitable symbol was found.
407 *
408 * @param pMod Pointer to the module structure.
409 * @param pszSymbol The symbol name.
410 * @param cchSymbol The length of the symbol name.
411 * @param pSymInfo Where to store the symbol information.
412 */
413 DECLCALLBACKMEMBER(int, pfnSymbolByName)(PRTDBGMODINT pMod, const char *pszSymbol, size_t cchSymbol, PRTDBGSYMBOL pSymInfo);
414
415 /**
416 * Queries symbol information by address.
417 *
418 * The returned symbol is what the debug info interpreter considers the symbol
419 * most applicable to the specified address. This usually means a symbol with an
420 * address equal or lower than the requested.
421 *
422 * @returns IPRT status code.
423 * @retval VINF_SUCCESS on success, no informational status code.
424 * @retval VERR_DBG_NO_SYMBOLS if there aren't any symbols.
425 * @retval VERR_SYMBOL_NOT_FOUND if no suitable symbol was found.
426 *
427 * @param pMod Pointer to the module structure.
428 * @param iSeg The segment number (0-based) or RTDBGSEGIDX_ABS.
429 * @param off The offset into the segment.
430 * @param fFlags Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
431 * @param poffDisp Where to store the distance between the specified address
432 * and the returned symbol. Optional.
433 * @param pSymInfo Where to store the symbol information.
434 */
435 DECLCALLBACKMEMBER(int, pfnSymbolByAddr)(PRTDBGMODINT pMod, uint32_t iSeg, RTUINTPTR off, uint32_t fFlags,
436 PRTINTPTR poffDisp, PRTDBGSYMBOL pSymInfo);
437
438
439
440 /**
441 * Adds a line number to the module (optional).
442 *
443 * @returns IPRT status code.
444 * @retval VERR_NOT_SUPPORTED if the interpreter doesn't support this feature.
445 *
446 * @param pMod Pointer to the module structure.
447 * @param pszFile The filename.
448 * @param cchFile The length of the filename.
449 * @param uLineNo The line number.
450 * @param iSeg The segment number (0-based).
451 * @param off The offset into the segment.
452 * @param piOrdinal Where to return the line number ordinal on success. If
453 * the interpreter doesn't do ordinals, this will be set to
454 * UINT32_MAX. Optional
455 */
456 DECLCALLBACKMEMBER(int, pfnLineAdd)(PRTDBGMODINT pMod, const char *pszFile, size_t cchFile, uint32_t uLineNo,
457 uint32_t iSeg, RTUINTPTR off, uint32_t *piOrdinal);
458
459 /**
460 * Gets the number of line numbers in the module.
461 *
462 * @returns The number or UINT32_MAX if not known/supported.
463 *
464 * @param pMod Pointer to the module structure.
465 */
466 DECLCALLBACKMEMBER(uint32_t, pfnLineCount)(PRTDBGMODINT pMod);
467
468 /**
469 * Queries line number information by ordinal number.
470 *
471 * @returns IPRT status code.
472 * @retval VINF_SUCCESS on success, no informational status code.
473 * @retval VERR_DBG_NO_LINE_NUMBERS if there aren't any line numbers.
474 * @retval VERR_DBG_LINE_NOT_FOUND if there is no line number with that
475 * ordinal.
476 *
477 * @param pMod Pointer to the module structure.
478 * @param iOrdinal The line number ordinal number.
479 * @param pLineInfo Where to store the information about the line number.
480 */
481 DECLCALLBACKMEMBER(int, pfnLineByOrdinal)(PRTDBGMODINT pMod, uint32_t iOrdinal, PRTDBGLINE pLineInfo);
482
483 /**
484 * Queries line number information by address.
485 *
486 * @returns IPRT status code.
487 * @retval VINF_SUCCESS on success, no informational status code.
488 * @retval VERR_DBG_NO_LINE_NUMBERS if there aren't any line numbers.
489 * @retval VERR_DBG_LINE_NOT_FOUND if no suitable line number was found.
490 *
491 * @param pMod Pointer to the module structure.
492 * @param iSeg The segment number (0-based) or RTDBGSEGIDX_ABS.
493 * @param off The offset into the segment.
494 * @param poffDisp Where to store the distance between the specified address
495 * and the returned line number. Optional.
496 * @param pLineInfo Where to store the information about the closest line
497 * number.
498 */
499 DECLCALLBACKMEMBER(int, pfnLineByAddr)(PRTDBGMODINT pMod, uint32_t iSeg, RTUINTPTR off, PRTINTPTR poffDisp, PRTDBGLINE pLineInfo);
500
501
502 /** For catching initialization errors (RTDBGMODVTDBG_MAGIC). */
503 uint32_t u32EndMagic;
504} RTDBGMODVTDBG;
505/** Pointer to a const RTDBGMODVTDBG. */
506typedef RTDBGMODVTDBG const *PCRTDBGMODVTDBG;
507
508
509/**
510 * Deferred loading callback.
511 *
512 * @returns IPRT status code. On success the necessary method tables should be
513 * installed in @a pMod.
514 * @param pMod Pointer to the debug module structure.
515 * @param pDeferred The deferred load data.
516 */
517typedef DECLCALLBACK(int) FNRTDBGMODDEFERRED(PRTDBGMODINT pMod, struct RTDBGMODDEFERRED *pDeferred);
518/** Pointer to a deferred loading callback. */
519typedef FNRTDBGMODDEFERRED *PFNRTDBGMODDEFERRED;
520
521
522/**
523 * Structure pointed to by pvDbgPriv and/or pvImgPriv when
524 * g_rtDbgModVtDbgDeferred and/or g_rtDbgModVtImgDeferred are being used.
525 */
526typedef struct RTDBGMODDEFERRED
527{
528 /** The image size.
529 * Deferred loading is almost pointless without knowing the module size, as
530 * it cannot be mapped (correctly) without it. */
531 RTUINTPTR cbImage;
532 /** Reference counter. */
533 uint32_t volatile cRefs;
534 /** The configuration instance (referenced), can be NIL. */
535 RTDBGCFG hDbgCfg;
536 /** Performs deferred loading of the module. */
537 PFNRTDBGMODDEFERRED pfnDeferred;
538 /** Callback specific data. */
539 union
540 {
541 struct
542 {
543 /** The time/date stamp of the executable image and codeview file. */
544 uint32_t uTimestamp;
545 } PeImage,
546 OldCodeView;
547
548 struct
549 {
550 /** The PDB uuid. */
551 RTUUID Uuid;
552 /** The PDB age. */
553 uint32_t uAge;
554 } NewCodeview;
555
556 struct
557 {
558 /** The CRC-32 value found in the .gnu_debuglink section. */
559 uint32_t uCrc32;
560 } GnuDebugLink;
561 } u;
562} RTDBGMODDEFERRED;
563/** Pointer to the deferred loading data. */
564typedef RTDBGMODDEFERRED *PRTDBGMODDEFERRED;
565
566
567/**
568 * Debug module structure.
569 */
570typedef struct RTDBGMODINT
571{
572 /** Magic value (RTDBGMOD_MAGIC). */
573 uint32_t u32Magic;
574 /** The number of reference there are to this module.
575 * This is used to perform automatic cleanup and sharing. */
576 uint32_t volatile cRefs;
577 /** The module tag. */
578 uint64_t uTag;
579
580 /** When set, the loading of the image and debug info (including locating any
581 * external files), will not have taken place yet. */
582 uint32_t fDeferred : 1;
583 /** Set if deferred loading failed. */
584 uint32_t fDeferredFailed : 1;
585 /** Set if the debug info is based on image exports and segments. */
586 uint32_t fExports : 1;
587 /** Alignment padding. */
588 uint32_t fPadding1 : 29;
589#if ARCH_BITS == 64
590 uint32_t u32Padding2;
591#endif
592
593 /** The module name (short). */
594 char const *pszName;
595 /** The image file specified by the user. Can be NULL. */
596 char const *pszImgFileSpecified;
597 /** The module filename. Can be NULL. */
598 char const *pszImgFile;
599 /** The debug info file (if external). Can be NULL. */
600 char const *pszDbgFile;
601
602 /** The method table for the executable image interpreter. */
603 PCRTDBGMODVTIMG pImgVt;
604 /** Pointer to the private data of the executable image interpreter. */
605 void *pvImgPriv;
606
607 /** The method table for the debug info interpreter. */
608 PCRTDBGMODVTDBG pDbgVt;
609 /** Pointer to the private data of the debug info interpreter. */
610 void *pvDbgPriv;
611
612 /** Critical section serializing access to the module. */
613 RTCRITSECT CritSect;
614} RTDBGMODINT;
615/** Pointer to an debug module structure. */
616typedef RTDBGMODINT *PRTDBGMODINT;
617
618
619extern DECLHIDDEN(RTSTRCACHE) g_hDbgModStrCache;
620extern DECLHIDDEN(RTDBGMODVTDBG const) g_rtDbgModVtDbgCodeView;
621extern DECLHIDDEN(RTDBGMODVTDBG const) g_rtDbgModVtDbgDwarf;
622extern DECLHIDDEN(RTDBGMODVTDBG const) g_rtDbgModVtDbgNm;
623#ifdef RT_OS_WINDOWS
624extern DECLHIDDEN(RTDBGMODVTDBG const) g_rtDbgModVtDbgDbgHelp;
625#endif
626extern DECLHIDDEN(RTDBGMODVTDBG const) g_rtDbgModVtDbgDeferred;
627extern DECLHIDDEN(RTDBGMODVTDBG const) g_rtDbgModVtDbgContainer;
628
629extern DECLHIDDEN(RTDBGMODVTIMG const) g_rtDbgModVtImgLdr;
630extern DECLHIDDEN(RTDBGMODVTIMG const) g_rtDbgModVtImgDeferred;
631
632DECLHIDDEN(int) rtDbgModContainerCreate(PRTDBGMODINT pMod, RTUINTPTR cbSeg);
633DECLHIDDEN(int) rtDbgModContainer_SymbolRemoveAll(PRTDBGMODINT pMod);
634DECLHIDDEN(int) rtDbgModContainer_LineRemoveAll(PRTDBGMODINT pMod);
635DECLHIDDEN(int) rtDbgModContainer_RemoveAll(PRTDBGMODINT pMod);
636
637DECLHIDDEN(int) rtDbgModCreateForExports(PRTDBGMODINT pDbgMod);
638DECLHIDDEN(int) rtDbgModDeferredCreate(PRTDBGMODINT pDbgMod, PFNRTDBGMODDEFERRED pfnDeferred, RTUINTPTR cbImage,
639 RTDBGCFG hDbgCfg, PRTDBGMODDEFERRED *ppDeferred);
640
641DECLHIDDEN(int) rtDbgModLdrOpenFromHandle(PRTDBGMODINT pDbgMod, RTLDRMOD hLdrMod);
642
643/** @} */
644
645RT_C_DECLS_END
646
647#endif
648
Note: See TracBrowser for help on using the repository browser.

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