[Mono-devel-list] monodebugger - Inserting breakpoints in a method that has been JITted
Rex R
writetorex at rediffmail.com
Tue Jan 18 22:32:59 EST 2005
Hi,
Have a question on how the mono debugger, given a sourceline number finds the address in memory where a software breakpoint
instruction has to be written.
After looking at the code it looks like the symbol file is used to find the address corresponding to a source line.
For a method that is already JITted, can we not use the following method?
1.Remember/Store the ILOffset to memory address mapping for each method that is JITted.
This can be done in mono_arch_output_basic_block in mini-x86.c (and is already being done
via a call to mono_debug_record_line_number).
2.When an "insert breakpoint" is requested on a particular source line, find the ILOffset for the source line, for the method.
Lookup the ILOffset to memory address mapping that we stored and find the memory address in
JITted code
3.Remember/Store the original instruction at the memory address and replace it with a software breakpoint.
Is there any particular reason why the above mentioned scheme would fail?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050119/4d654cfd/attachment.html
More information about the Mono-devel-list
mailing list