[Mono-dev] soft debug

pierre pierre.saunier at ppmodeler.com
Tue Feb 27 13:45:32 UTC 2018


Parsing the code of Mono.Debugger.Soft there is one thing I cannot 
figure out:

what is the expected reply when the debugger receives an event (command 
set: 64, command: 100)? The command packet contains a list of events, 
each with its own unique req_id (and there is an id in the header of the 
command packet).

If I reply with a  reply with no additional data with no error (and no 
attached data), the application crashes... and I am not using the req_id 
of each event.

Where can I find either the description of the reply I should send or 
the code that is doing it?

and I think there is a bug:

in the filemono <https://github.com/mono/mono>/mono 
in the function process_event, line 3747, there is:

      buffer_add_domainid (&buf, mono_get_root_domain ());

but in
mono <https://github.com/mono/mono>/mcs 
line 1318:
if (kind == EventKind.VM_START) {
    events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id };
    //EventHandler.VMStart (req_id, thread_id, null);*
*   }...

while it shouold be:

if (kind == EventKind.VM_START) {
   longid= r.ReadId ();
   events [i] = new EventInfo (etype, req_id) { ThreadId = thread_id };

it is not causing trouble because the VM_START is always sent alone, but 
if this change, decoding the next events will have troubles....

thanks in advance,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-devel-list/attachments/20180227/b6bd79db/attachment.html>

More information about the Mono-devel-list mailing list