delphi - Get source line number from map file for a DLL -
when exe raised exception message "access violation @ address xxxxxxxx...", address xxxxxxxx hex value, , can source code line number caused exception, looking @ map file. details below (by madshi @ ee):
you need substract image base, $400000. furthermore need substract "base of code" address, stored in image nt headers of each module (exe/dll). it's $1000. can check value has using freeware tool "peprowse pro". it's field "base of code" in "details" of "optional header". you'll find image base address there.
my question is: how source line number dll? same calculation apply? thanks!
note 1: map file generated delphi , i'm not sure if matters.
note 2: i've been using jcl debug couldn't catch exception seems occurred @ startup of dll (an office add-in, actually).
same calculations apply, following note: instead of image base address of exe you'll need take actual address dll had been loaded. base of code dll should taken in same manner exe (stored in pe's image_optional_header
).
btw, exe , dll same thing point of view of pe format.
Comments
Post a Comment