Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Il debugger del kernel deve leggere l'intestazione per ogni immagine del modulo caricato per sapere quali simboli corrispondono a tale modulo.
Se l'intestazione di un modulo viene trasferita su disco, il debugger non caricherà i simboli per questo modulo. Se ciò si verifica con un modulo essenziale per il processo di debug, può trattarsi di un problema critico.
Per risolvere questo problema, è possibile utilizzare la procedura seguente.
Per acquisire i simboli per le intestazioni scaricate
Creare una seconda copia del kernel stesso. È probabilmente più semplice inserirlo in una condivisione di rete.
Aggiungere la directory radice di questa condivisione al percorso del simbolo. Vedere Percorso simbolo per i modi per modificare il percorso del simbolo.
Usare il comando .reload (Reload Module).
Usare il comando dell'estensione !sym noisy per visualizzare un output più dettagliato. Se viene usato, sarà possibile vedere quali simboli vengono caricati dalle immagini del modulo nel computer di destinazione e che vengono caricati dalla copia dei moduli del kernel.
Questa tecnica deve essere usata con attenzione, poiché il debugger non ha modo di verificare se le copie dei file corrispondono effettivamente agli originali. È quindi fondamentale che la versione di Windows usata nella condivisione di rete corrisponda alla versione usata nel computer di destinazione.
Questa tecnica viene usata solo per il debug in modalità kernel. Il sistema operativo è in grado di eseguire il paging in tutte le intestazioni necessarie durante il debug in modalità utente (a meno che il disco che contiene il file di paging non sia smontato o altrimenti inaccessibile).
Di seguito è riportato un esempio di questa tecnica usata:
kd> .reload
Connected to Windows XP 2268 x86 compatible target, ptr64 FALSE
Loading Kernel Symbols
..........Unable to read image header for dmload.sys at fe0be000 - NTSTATUS 0xC0000001
..........Unable to read image header for dmboot.sys at fda93000 - NTSTATUS 0xC0000001
.....................................Unable to read image header for fdc.sys at fdfc2000 - NTSTATUS 0xC0000001
...Unable to read image header for flpydisk.sys at fde4a000 - NTSTATUS 0xC0000001
.Unable to read image header for Fs_Rec.SYS at fe0c8000 - NTSTATUS 0xC0000001
.Unable to read image header for Null.SYS at fe2c4000 - NTSTATUS 0xC0000001
...................Unable to read image header for win32k.sys at a0000000 - NTSTATUS 0xC0000001
..Unable to read image header for dxg.sys at a0194000 - NTSTATUS 0xC0000001
.......Unable to read image header for ati2draa.dll at a01a4000 - NTSTATUS 0xC0000001
..Unable to read image header for ParVdm.SYS at fe116000 - NTSTATUS 0xC0000001
.......
Loading unloaded module list
..............
Loading User Symbols
Unable to retrieve the PEB address. This is usually caused
by being in the wrong process context or by paging
Si noti che molte immagini hanno intestazioni inaccessibili. Controllare i simboli da uno di questi file (in questo esempio fs_rec.sys):
kd> x fs_rec!*
*** ERROR: Module load completed but symbols could not be loaded for fs_rec.sys
Queste intestazioni sono apparentemente spostate in memoria virtuale. È quindi necessario aggiungere le immagini appropriate al percorso dei simboli.
kd> .sympath+ \\myserver\myshare\symbols\x86fre\symbols
Symbol search path is: symsrv*symsrv.dll*c:\localcache*https://msdl.microsoft.com/download/symbols;\\myserver\myshare\symbols\x86fre\symbols
kd> .reload
Connected to Windows XP 2268 x86 compatible target, ptr64 FALSE
Loading Kernel Symbols
..........Unable to read image header for dmload.sys at fe0be000 - NTSTATUS 0xC0000001
..........Unable to read image header for dmboot.sys at fda93000 - NTSTATUS 0xC0000001
.....................................Unable to read image header for fdc.sys at fdfc2000 - NTSTATUS 0xC0000001
...Unable to read image header for flpydisk.sys at fde4a000 - NTSTATUS 0xC0000001
.Unable to read image header for Fs_Rec.SYS at fe0c8000 - NTSTATUS 0xC0000001
.Unable to read image header for Null.SYS at fe2c4000 - NTSTATUS 0xC0000001
...................Unable to read image header for win32k.sys at a0000000 - NTSTATUS 0xC0000001
..Unable to read image header for dxg.sys at a0194000 - NTSTATUS 0xC0000001
.......Unable to read image header for ati2draa.dll at a01a4000 - NTSTATUS 0xC0000001
..Unable to read image header for ParVdm.SYS at fe116000 - NTSTATUS 0xC0000001
.......
Loading unloaded module list
..............
Loading User Symbols
Unable to retrieve the PEB address. This is usually caused
by being in the wrong process context or by paging
Sono stati visualizzati gli stessi avvisi, ma i simboli stessi sono ora accessibili:
kd> x fs_Rec!*
fe0c8358 Fs_Rec!_imp___allmul
fe0c8310 Fs_Rec!_imp__IoCreateDevice
fe0c835c Fs_Rec!_imp___allshr
........
fe0c8360 Fs_Rec!ntoskrnl_NULL_THUNK_DATA
fe0c832c Fs_Rec!_imp__KeSetEvent
fe0c9570 Fs_Rec!_NULL_IMPORT_DESCRIPTOR