Created
June 26, 2024 10:06
-
-
Save hodzanassredin/7106b0699640fb5799e21ffebcdb8ff1 to your computer and use it in GitHub Desktop.
Find module and proc by addr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MODULE TestModules; | |
IMPORT SYSTEM, Log := StdLog, Kernel; | |
CONST adr = 43711E10H; | |
PROCEDURE Do*; | |
VAR m : Kernel.Module;addr : INTEGER; | |
BEGIN | |
m := Kernel.modList; | |
WHILE m # NIL DO | |
IF (m.refcnt >= 0) & (m.code <= adr) & ((m.code + m.csize) > adr)THEN | |
Log.String(LONG(m.name) + " 0x"); | |
Log.IntForm(m.code, Log.hexadecimal, 9, '0', Log.showBase); Log.Ln; | |
Log.String(" offset ");Log.IntForm(adr - m.code, Log.hexadecimal, 9, '0', Log.showBase); | |
(*todo Kernel.GetRefFrameDo*) | |
Log.Ln; | |
END; | |
m := m.next; | |
END; | |
END Do; | |
END TestModules. | |
TestModules.Do | |
Kernel.SearchProcVar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment