VirtualBox

source: vbox/trunk/src/VBox/Debugger/DBGPlugInLinuxModuleCodeTmpl.cpp.h@ 94490

Last change on this file since 94490 was 93470, checked in by vboxsync, 3 years ago

DbgPlugInDiggers,VMM,Main: Refactored the diggers and related interfaces to work via the VMM function table. Removed non-working tstVBoxDbg (needs proper COM now). bugref:10072

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 19.6 KB
Line 
1/* $Id: DBGPlugInLinuxModuleCodeTmpl.cpp.h 93470 2022-01-27 23:51:28Z vboxsync $ */
2/** @file
3 * DBGPlugInLinux - Code template for struct module processing.
4 */
5
6/*
7 * Copyright (C) 2019-2022 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
18
19/*********************************************************************************************************************************
20* Defined Constants And Macros *
21*********************************************************************************************************************************/
22#ifndef LNX_MK_VER
23# define LNX_MK_VER(major, minor, build) (((major) << 22) | ((minor) << 12) | (build))
24#endif
25#if LNX_64BIT
26# define LNX_ULONG_T uint64_t
27#else
28# define LNX_ULONG_T uint32_t
29#endif
30#if LNX_64BIT
31# define PAD32ON64(seq) uint32_t RT_CONCAT(u32Padding,seq);
32#else
33# define PAD32ON64(seq)
34#endif
35
36
37/*********************************************************************************************************************************
38* Structures and Typedefs *
39*********************************************************************************************************************************/
40/**
41 * Kernel module symbol (hasn't changed in ages).
42 */
43typedef struct RT_CONCAT(LNXMODKSYM,LNX_SUFFIX)
44{
45 LNX_ULONG_T uValue;
46 LNX_PTR_T uPtrSymName;
47} RT_CONCAT(LNXMODKSYM,LNX_SUFFIX);
48
49
50#if LNX_VER >= LNX_MK_VER(2,6,11)
51typedef struct RT_CONCAT(LNXMODKOBJECT,LNX_SUFFIX)
52{
53 LNX_PTR_T uPtrKName;
54# if LNX_VER < LNX_MK_VER(2,6,24)
55 char name[20];
56# endif
57# if LNX_VER < LNX_MK_VER(2,6,27)
58 int32_t cRefs;
59# if LNX_VER >= LNX_MK_VER(2,6,24)
60 PAD32ON64(0)
61# endif
62# endif
63 LNX_PTR_T uPtrNext;
64 LNX_PTR_T uPtrPrev;
65 LNX_PTR_T uPtrParent; /**< struct kobject pointer */
66 LNX_PTR_T uPtrKset; /**< struct kset pointer */
67 LNX_PTR_T uPtrKtype; /**< struct kobj_type pointer */
68 LNX_PTR_T uPtrDirEntry; /**< struct dentry pointer; 2.6.23+ sysfs_dirent. */
69# if LNX_VER >= LNX_MK_VER(2,6,17) && LNX_VER < LNX_MK_VER(2,6,24)
70 LNX_PTR_T aPtrWaitQueueHead[3];
71# endif
72# if LNX_VER >= LNX_MK_VER(2,6,27)
73 int32_t cRefs;
74 uint32_t uStateStuff;
75# elif LNX_VER >= LNX_MK_VER(2,6,25)
76 LNX_ULONG_T uStateStuff;
77# endif
78 /* non-kobject: */
79 LNX_PTR_T uPtrModule; /**< struct module pointer. */
80# if LNX_VER >= LNX_MK_VER(2,6,21)
81 LNX_PTR_T uPtrDriverDir; /**< Points to struct kobject. */
82# endif
83# if LNX_VER >= LNX_MK_VER(4,5,0)
84 LNX_PTR_T uPtrMp;
85 LNX_PTR_T uPtrCompletion; /**< Points to struct completion. */
86# endif
87} RT_CONCAT(LNXMODKOBJECT,LNX_SUFFIX);
88#endif
89#if LNX_VER == LNX_MK_VER(2,6,24) && LNX_64BIT
90AssertCompileMemberOffset(RT_CONCAT(LNXMODKOBJECT,LNX_SUFFIX), uPtrParent, 32);
91AssertCompileMemberOffset(RT_CONCAT(LNXMODKOBJECT,LNX_SUFFIX), uPtrParent, 32);
92AssertCompileSize(RT_CONCAT(LNXMODKOBJECT,LNX_SUFFIX), 80);
93#endif
94
95
96#if LNX_VER >= LNX_MK_VER(4,5,0)
97/**
98 * Red black tree node.
99 */
100typedef struct RT_CONCAT(LNXRBNODE,LNX_SUFFIX)
101{
102 LNX_ULONG_T uRbParentColor;
103 LNX_PTR_T uPtrRbRight;
104 LNX_PTR_T uPtrRbLeft;
105} RT_CONCAT(LNXRBNODE,LNX_SUFFIX);
106
107
108/**
109 * Latch tree node.
110 */
111typedef struct RT_CONCAT(LNXLATCHTREENODE,LNX_SUFFIX)
112{
113 RT_CONCAT(LNXRBNODE,LNX_SUFFIX) aNode[2];
114} RT_CONCAT(LNXLATCHTREENODE,LNX_SUFFIX);
115
116
117/**
118 * Module tree node.
119 */
120typedef struct RT_CONCAT(LNXMODTREENODE,LNX_SUFFIX)
121{
122 LNX_PTR_T uPtrKMod;
123 RT_CONCAT(LNXLATCHTREENODE,LNX_SUFFIX) Node;
124} RT_CONCAT(LNXMODTREENODE,LNX_SUFFIX);
125
126
127/**
128 * Module layout.
129 */
130typedef struct RT_CONCAT(LNXKMODLAYOUT,LNX_SUFFIX)
131{
132 LNX_PTR_T uPtrBase; /**< Base pointer to text and data. */
133 uint32_t cb; /**< Size of the module. */
134 uint32_t cbText; /**< Size of the text section. */
135 uint32_t cbRo; /**< Size of the readonly portion (text + ro data). */
136 RT_CONCAT(LNXMODTREENODE,LNX_SUFFIX) ModTreeNd; /**< Only available when CONFIG_MODULES_TREE_LOOKUP is set (default). */
137} RT_CONCAT(LNXKMODLAYOUT,LNX_SUFFIX);
138
139
140/**
141 * Mutex.
142 */
143typedef struct RT_CONCAT(LNXMUTEX,LNX_SUFFIX)
144{
145 LNX_ULONG_T uOwner;
146 uint32_t wait_lock; /**< Actually spinlock_t */
147 PAD32ON64(0)
148 LNX_PTR_T uWaitLstPtrNext;
149 LNX_PTR_T uWaitLstPtrPrev;
150} RT_CONCAT(LNXMUTEX,LNX_SUFFIX);
151#endif
152
153
154/**
155 * Maps to the start of struct module in include/linux/module.h.
156 */
157typedef struct RT_CONCAT(LNXKMODULE,LNX_SUFFIX)
158{
159#if LNX_VER >= LNX_MK_VER(4,5,0)
160 /* Completely new layout to not feed the spaghetti dragons further. */
161 int32_t state;
162 PAD32ON64(0)
163 LNX_PTR_T uPtrNext;
164 LNX_PTR_T uPtrPrev;
165 char name[64 - sizeof(LNX_PTR_T)];
166
167 RT_CONCAT(LNXMODKOBJECT,LNX_SUFFIX) mkobj;
168 LNX_PTR_T uPtrModInfoAttrs; /**< Points to struct module_attribute. */
169 LNX_PTR_T uPtrVersion; /**< String pointers. */
170 LNX_PTR_T uPtrSrcVersion; /**< String pointers. */
171 LNX_PTR_T uPtrHolderDir; /**< Points to struct kobject. */
172
173 /** @name Exported Symbols
174 * @{ */
175 LNX_PTR_T uPtrSyms; /**< Array of struct kernel_symbol. */
176 LNX_PTR_T uPtrCrcs; /**< unsigned long array */
177 uint32_t num_syms;
178 /** @} */
179
180 /** @name Kernel parameters
181 * @{ */
182 RT_CONCAT(LNXMUTEX,LNX_SUFFIX) Mtx; /**< Mutex. */
183 LNX_PTR_T uPtrKp; /**< Points to struct kernel_param */
184 uint32_t num_kp;
185 /** @} */
186
187 /** @name GPL Symbols
188 * @{ */
189 uint32_t num_gpl_syms;
190 LNX_PTR_T uPtrGplSyms; /**< Array of struct kernel_symbol. */
191 LNX_PTR_T uPtrGplCrcs; /**< unsigned long array */
192 /** @} */
193
194 /** @name Unused symbols
195 * @{ */
196 LNX_PTR_T uPtrUnusedSyms; /**< Array of struct kernel_symbol. */
197 LNX_PTR_T uPtrUnusedCrcs; /**< unsigned long array */
198 uint32_t num_unused_syms;
199 uint32_t num_unused_gpl_syms;
200 LNX_PTR_T uPtrUnusedGplSyms; /**< Array of struct kernel_symbol. */
201 LNX_PTR_T uPtrUnusedGplCrcs; /**< unsigned long array */
202 /** @} */
203
204 uint8_t sig_ok;
205 uint8_t async_probe_requested;
206
207 /** @name Future GPL Symbols
208 * @{ */
209 LNX_PTR_T uPtrGplFutureSyms; /**< Array of struct kernel_symbol. */
210 LNX_PTR_T uPtrGplFutureCrcs; /**< unsigned long array */
211 uint32_t num_gpl_future_syms;
212 /** @} */
213
214 /** @name Exception table.
215 * @{ */
216 uint32_t num_exentries;
217 LNX_PTR_T uPtrEntries; /**< struct exception_table_entry array. */
218 /** @} */
219
220 LNX_PTR_T pfnInit;
221 RT_CONCAT(LNXKMODLAYOUT,LNX_SUFFIX) CoreLayout; /**< Should be aligned on a cache line. */
222 RT_CONCAT(LNXKMODLAYOUT,LNX_SUFFIX) InitLayout;
223
224#elif LNX_VER >= LNX_MK_VER(2,5,48)
225 /*
226 * This first part is mostly always the same.
227 */
228 int32_t state;
229 PAD32ON64(0)
230 LNX_PTR_T uPtrNext;
231 LNX_PTR_T uPtrPrev;
232 char name[64 - sizeof(LNX_PTR_T)];
233
234 /*
235 * Here be spaghetti dragons.
236 */
237# if LNX_VER >= LNX_MK_VER(2,6,11)
238 RT_CONCAT(LNXMODKOBJECT,LNX_SUFFIX) mkobj; /**< Was just kobj for a while. */
239 LNX_PTR_T uPtrParamAttrs; /**< Points to struct module_param_attrs. */
240# if LNX_VER >= LNX_MK_VER(2,6,17)
241 LNX_PTR_T uPtrModInfoAttrs; /**< Points to struct module_attribute. */
242# endif
243# if LNX_VER == LNX_MK_VER(2,6,20)
244 LNX_PTR_T uPtrDriverDir; /**< Points to struct kobject. */
245# elif LNX_VER >= LNX_MK_VER(2,6,21)
246 LNX_PTR_T uPtrHolderDir; /**< Points to struct kobject. */
247# endif
248# if LNX_VER >= LNX_MK_VER(2,6,13)
249 LNX_PTR_T uPtrVersion; /**< String pointers. */
250 LNX_PTR_T uPtrSrcVersion; /**< String pointers. */
251# endif
252# else
253# if LNX_VER >= LNX_MK_VER(2,6,7)
254 LNX_PTR_T uPtrMkObj;
255# endif
256# if LNX_VER >= LNX_MK_VER(2,6,10)
257 LNX_PTR_T uPtrParamsKobject;
258# endif
259# endif
260
261 /** @name Exported Symbols
262 * @{ */
263# if LNX_VER < LNX_MK_VER(2,5,67)
264 LNX_PTR_T uPtrSymsNext, uPtrSymsPrev, uPtrSymsOwner;
265# if LNX_VER >= LNX_MK_VER(2,5,55)
266 int32_t syms_gplonly;
267 uint32_t num_syms;
268# else
269 uint32_t num_syms;
270 PAD32ON64(1)
271# endif
272# endif
273 LNX_PTR_T uPtrSyms; /**< Array of struct kernel_symbol. */
274# if LNX_VER >= LNX_MK_VER(2,5,67)
275 uint32_t num_syms;
276 PAD32ON64(1)
277# endif
278# if LNX_VER >= LNX_MK_VER(2,5,60)
279 LNX_PTR_T uPtrCrcs; /**< unsigned long array */
280# endif
281 /** @} */
282
283 /** @name GPL Symbols
284 * @since 2.5.55
285 * @{ */
286# if LNX_VER >= LNX_MK_VER(2,5,55)
287# if LNX_VER < LNX_MK_VER(2,5,67)
288 LNX_PTR_T uPtrGplSymsNext, uPtrGplSymsPrev, uPtrGplSymsOwner;
289# if LNX_VER >= LNX_MK_VER(2,5,55)
290 int32_t gpl_syms_gplonly;
291 uint32_t num_gpl_syms;
292# else
293 uint32_t num_gpl_syms;
294 PAD32ON64(2)
295# endif
296# endif
297 LNX_PTR_T uPtrGplSyms; /**< Array of struct kernel_symbol. */
298# if LNX_VER >= LNX_MK_VER(2,5,67)
299 uint32_t num_gpl_syms;
300 PAD32ON64(2)
301# endif
302# if LNX_VER >= LNX_MK_VER(2,5,60)
303 LNX_PTR_T uPtrGplCrcs; /**< unsigned long array */
304# endif
305# endif /* > 2.5.55 */
306 /** @} */
307
308 /** @name Unused Exported Symbols
309 * @since 2.6.18
310 * @{ */
311# if LNX_VER >= LNX_MK_VER(2,6,18)
312 LNX_PTR_T uPtrUnusedSyms; /**< Array of struct kernel_symbol. */
313 uint32_t num_unused_syms;
314 PAD32ON64(4)
315 LNX_PTR_T uPtrUnusedCrcs; /**< unsigned long array */
316# endif
317 /** @} */
318
319 /** @name Unused GPL Symbols
320 * @since 2.6.18
321 * @{ */
322# if LNX_VER >= LNX_MK_VER(2,6,18)
323 LNX_PTR_T uPtrUnusedGplSyms; /**< Array of struct kernel_symbol. */
324 uint32_t num_unused_gpl_syms;
325 PAD32ON64(5)
326 LNX_PTR_T uPtrUnusedGplCrcs; /**< unsigned long array */
327# endif
328 /** @} */
329
330 /** @name Future GPL Symbols
331 * @since 2.6.17
332 * @{ */
333# if LNX_VER >= LNX_MK_VER(2,6,17)
334 LNX_PTR_T uPtrGplFutureSyms; /**< Array of struct kernel_symbol. */
335 uint32_t num_gpl_future_syms;
336 PAD32ON64(3)
337 LNX_PTR_T uPtrGplFutureCrcs; /**< unsigned long array */
338# endif
339 /** @} */
340
341 /** @name Exception table.
342 * @{ */
343# if LNX_VER < LNX_MK_VER(2,5,67)
344 LNX_PTR_T uPtrXcptTabNext, uPtrXcptTabPrev;
345# endif
346 uint32_t num_exentries;
347 PAD32ON64(6)
348 LNX_PTR_T uPtrEntries; /**< struct exception_table_entry array. */
349 /** @} */
350
351 /*
352 * Hopefully less spaghetti from here on...
353 */
354 LNX_PTR_T pfnInit;
355 LNX_PTR_T uPtrModuleInit;
356 LNX_PTR_T uPtrModuleCore;
357 LNX_ULONG_T cbInit;
358 LNX_ULONG_T cbCore;
359# if LNX_VER >= LNX_MK_VER(2,5,74)
360 LNX_ULONG_T cbInitText;
361 LNX_ULONG_T cbCoreText;
362# endif
363
364# if LNX_VER >= LNX_MK_VER(2,6,18)
365 LNX_PTR_T uPtrUnwindInfo;
366# endif
367#else
368 uint32_t structure_size;
369
370#endif
371} RT_CONCAT(LNXKMODULE,LNX_SUFFIX);
372
373# if LNX_VER == LNX_MK_VER(2,6,24) && LNX_64BIT
374AssertCompileMemberOffset(RT_CONCAT(LNXKMODULE,LNX_SUFFIX), uPtrParamAttrs, 160);
375AssertCompileMemberOffset(RT_CONCAT(LNXKMODULE,LNX_SUFFIX), num_syms, 208);
376AssertCompileMemberOffset(RT_CONCAT(LNXKMODULE,LNX_SUFFIX), num_gpl_syms, 232);
377AssertCompileMemberOffset(RT_CONCAT(LNXKMODULE,LNX_SUFFIX), num_unused_syms, 256);
378AssertCompileMemberOffset(RT_CONCAT(LNXKMODULE,LNX_SUFFIX), num_unused_gpl_syms, 280);
379AssertCompileMemberOffset(RT_CONCAT(LNXKMODULE,LNX_SUFFIX), num_gpl_future_syms, 304);
380AssertCompileMemberOffset(RT_CONCAT(LNXKMODULE,LNX_SUFFIX), num_exentries, 320);
381AssertCompileMemberOffset(RT_CONCAT(LNXKMODULE,LNX_SUFFIX), uPtrModuleCore, 352);
382AssertCompileMemberOffset(RT_CONCAT(LNXKMODULE,LNX_SUFFIX), uPtrUnwindInfo, 392);
383#endif
384
385
386
387/**
388 * Loads the kernel symbols at the given start address.
389 *
390 * @returns VBox status code.
391 * @param pUVM Pointer to the user-mode VM instance.
392 * @param hDbgMod The module handle to add the loaded symbols to.
393 * @param uPtrModuleStart The virtual address where the kernel module starts we want to extract symbols from.
394 * @param uPtrSymStart The start address of the array of symbols.
395 * @param cSyms Number of symbols in the array.
396 */
397static int RT_CONCAT(dbgDiggerLinuxLoadModuleSymbols,LNX_SUFFIX)(PUVM pUVM, PCVMMR3VTABLE pVMM, RTDBGMOD hDbgMod,
398 LNX_PTR_T uPtrModuleStart, LNX_PTR_T uPtrSymStart, uint32_t cSyms)
399{
400 int rc = VINF_SUCCESS;
401 DBGFADDRESS AddrSym;
402 pVMM->pfnDBGFR3AddrFromFlat(pUVM, &AddrSym, uPtrSymStart);
403
404 while ( cSyms
405 && RT_SUCCESS(rc))
406 {
407 RT_CONCAT(LNXMODKSYM,LNX_SUFFIX) aSyms[64];
408 uint32_t cThisLoad = RT_MIN(cSyms, RT_ELEMENTS(aSyms));
409
410 rc = pVMM->pfnDBGFR3MemRead(pUVM, 0, &AddrSym, &aSyms[0], cThisLoad * sizeof(aSyms[0]));
411 if (RT_SUCCESS(rc))
412 {
413 cSyms -= cThisLoad;
414 pVMM->pfnDBGFR3AddrAdd(&AddrSym, cThisLoad * sizeof(aSyms[0]));
415
416 for (uint32_t i = 0; i < cThisLoad; i++)
417 {
418 char szSymName[128];
419 DBGFADDRESS AddrSymName;
420 rc = pVMM->pfnDBGFR3MemRead(pUVM, 0, pVMM->pfnDBGFR3AddrFromFlat(pUVM, &AddrSymName, aSyms[i].uPtrSymName),
421 &szSymName[0], sizeof(szSymName));
422 if (RT_FAILURE(rc))
423 break;
424
425 /* Verify string encoding - ignore the symbol if it fails. */
426 rc = RTStrValidateEncodingEx(&szSymName[0], sizeof(szSymName), RTSTR_VALIDATE_ENCODING_ZERO_TERMINATED);
427 if (RT_FAILURE(rc))
428 continue;
429
430 Assert(aSyms[i].uValue >= uPtrModuleStart);
431 rc = RTDbgModSymbolAdd(hDbgMod, szSymName, RTDBGSEGIDX_RVA, aSyms[i].uValue - uPtrModuleStart,
432 0 /*cb*/, 0 /*fFlags*/, NULL);
433 if (RT_SUCCESS(rc))
434 LogFlowFunc(("Added symbol '%s' successfully\n", szSymName));
435 else
436 {
437 LogFlowFunc(("Adding symbol '%s' failed with: %Rrc\n", szSymName, rc));
438 rc = VINF_SUCCESS;
439 }
440 }
441 }
442 }
443
444 return rc;
445}
446
447
448/**
449 * Version specific module processing code.
450 */
451static uint64_t RT_CONCAT(dbgDiggerLinuxLoadModule,LNX_SUFFIX)(PDBGDIGGERLINUX pThis, PUVM pUVM,
452 PCVMMR3VTABLE pVMM, PDBGFADDRESS pAddrModule)
453{
454 RT_CONCAT(LNXKMODULE,LNX_SUFFIX) Module;
455
456 int rc = pVMM->pfnDBGFR3MemRead(pUVM, 0, pVMM->pfnDBGFR3AddrSub(pAddrModule, RT_UOFFSETOF(RT_CONCAT(LNXKMODULE,LNX_SUFFIX),
457 uPtrNext)),
458 &Module, sizeof(Module));
459 if (RT_FAILURE(rc))
460 {
461 LogRelFunc(("Failed to read module structure at %#RX64: %Rrc\n", pAddrModule->FlatPtr, rc));
462 return 0;
463 }
464
465 /*
466 * Check the module name.
467 */
468#if LNX_VER >= LNX_MK_VER(2,5,48)
469 const char *pszName = Module.name;
470 size_t const cbName = sizeof(Module.name);
471#else
472
473#endif
474 if ( RTStrNLen(pszName, cbName) >= cbName
475 || RT_FAILURE(RTStrValidateEncoding(pszName))
476 || *pszName == '\0')
477 {
478 LogRelFunc(("%#RX64: Bad name: %.*Rhxs\n", pAddrModule->FlatPtr, (int)cbName, pszName));
479 return 0;
480 }
481
482 /*
483 * Create a simple module for it.
484 */
485#if LNX_VER >= LNX_MK_VER(4,5,0)
486 LNX_PTR_T uPtrModuleCore = Module.CoreLayout.uPtrBase;
487 uint32_t cbCore = Module.CoreLayout.cb;
488#else
489 LNX_PTR_T uPtrModuleCore = Module.uPtrModuleCore;
490 uint32_t cbCore = (uint32_t)Module.cbCore;
491#endif
492 LogRelFunc((" %#RX64: %#RX64 LB %#RX32 %s\n", pAddrModule->FlatPtr, uPtrModuleCore, cbCore, pszName));
493
494 RTDBGMOD hDbgMod;
495 rc = RTDbgModCreate(&hDbgMod, pszName, cbCore, 0 /*fFlags*/);
496 if (RT_SUCCESS(rc))
497 {
498 rc = RTDbgModSetTag(hDbgMod, DIG_LNX_MOD_TAG);
499 if (RT_SUCCESS(rc))
500 {
501 RTDBGAS hAs = pVMM->pfnDBGFR3AsResolveAndRetain(pUVM, DBGF_AS_KERNEL);
502 rc = RTDbgAsModuleLink(hAs, hDbgMod, uPtrModuleCore, RTDBGASLINK_FLAGS_REPLACE /*fFlags*/);
503 RTDbgAsRelease(hAs);
504 if (RT_SUCCESS(rc))
505 {
506 rc = RT_CONCAT(dbgDiggerLinuxLoadModuleSymbols,LNX_SUFFIX)(pUVM, pVMM, hDbgMod, uPtrModuleCore,
507 Module.uPtrSyms, Module.num_syms);
508 if (RT_FAILURE(rc))
509 LogRelFunc((" Faild to load symbols: %Rrc\n", rc));
510
511#if LNX_VER >= LNX_MK_VER(2,5,55)
512 rc = RT_CONCAT(dbgDiggerLinuxLoadModuleSymbols,LNX_SUFFIX)(pUVM, pVMM, hDbgMod, uPtrModuleCore,
513 Module.uPtrGplSyms, Module.num_gpl_syms);
514 if (RT_FAILURE(rc))
515 LogRelFunc((" Faild to load GPL symbols: %Rrc\n", rc));
516#endif
517
518#if LNX_VER >= LNX_MK_VER(2,6,17)
519 rc = RT_CONCAT(dbgDiggerLinuxLoadModuleSymbols,LNX_SUFFIX)(pUVM, pVMM, hDbgMod, uPtrModuleCore,
520 Module.uPtrGplFutureSyms, Module.num_gpl_future_syms);
521 if (RT_FAILURE(rc))
522 LogRelFunc((" Faild to load future GPL symbols: %Rrc\n", rc));
523#endif
524
525#if LNX_VER >= LNX_MK_VER(2,6,18)
526 rc = RT_CONCAT(dbgDiggerLinuxLoadModuleSymbols,LNX_SUFFIX)(pUVM, pVMM, hDbgMod, uPtrModuleCore,
527 Module.uPtrUnusedSyms, Module.num_unused_syms);
528 if (RT_FAILURE(rc))
529 LogRelFunc((" Faild to load unused symbols: %Rrc\n", rc));
530
531 rc = RT_CONCAT(dbgDiggerLinuxLoadModuleSymbols,LNX_SUFFIX)(pUVM, pVMM, hDbgMod, uPtrModuleCore,
532 Module.uPtrUnusedGplSyms, Module.num_unused_gpl_syms);
533 if (RT_FAILURE(rc))
534 LogRelFunc((" Faild to load unused GPL symbols: %Rrc\n", rc));
535#endif
536 }
537 }
538 else
539 LogRel(("DbgDiggerOs2: RTDbgModSetTag failed: %Rrc\n", rc));
540 RTDbgModRelease(hDbgMod);
541 }
542
543 RT_NOREF(pThis);
544 return Module.uPtrNext;
545}
546
547#undef LNX_VER
548#undef LNX_SUFFIX
549#undef LNX_ULONG_T
550#undef PAD32ON64
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