debug.asm

Debugging interface independent kernel debugger code

Depends on Debugger_Write and <Debugger_Poll> to handle input and output.

Author

Marcel Sondaar

License

Public Domain

Summary
debug.asmDebugging interface independent kernel debugger code
Functions
Debugger_ParseHexConverts a hex string to a numerical value Will discard whitespace, then parse any number of hex digits (ignore x) until null or space is found (success) or another character (failure)
Debugger_incharinserts a character into the command buffer
Pagewalk32Converts a linear address to the corresponding physical address, using the current value of CR3
PagewalkEx32Converts a linear address to the corresponding physical address, using the current value of CR3

Functions

Debugger_ParseHex

Converts a hex string to a numerical value Will discard whitespace, then parse any number of hex digits (ignore x) until null or space is found (success) or another character (failure)

in

ESIaddress of string

out

EAXparsed number
ESInext character to parse
CFset for an incomplete parse

destroyed

ESI ECX

Debugger_inchar

inserts a character into the command buffer

in

ALthe ascii character to write

out

none

destroyed

unknown

Pagewalk32

Converts a linear address to the corresponding physical address, using the current value of CR3

Paging should be disabled when this function is called.

in

EAXaddress

out

EAXphysical address
EBXphysical address containing the final mapping
CFset if the address was not currently mapped

destroyed

none

PagewalkEx32

Converts a linear address to the corresponding physical address, using the current value of CR3

Paging should be disabled when this function is called.

in

EAXaddress
EDXphysical address of the page directory

out

EAXphysical address
EBXphysical address containing the final mapping
CFset if the address was not currently mapped

destroyed

EDX

Write a series of characters to the display