Hi,

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 <https://github.com/mono/mono/tree/master/mono>/mini <https://github.com/mono/mono/tree/master/mono/mini>/_debugger-agent.c_,  in the function process_event, line 3747, there is:

case EVENT_KIND_VM_START:
     buffer_add_domainid (&buf, mono_get_root_domain ());
     break;


but in
mono <https://github.com/mono/mono>/mcs <https://github.com/mono/mono/tree/master/mcs>/class <https://github.com/mono/mono/tree/master/mcs/class>/Mono.Debugger.Soft <https://github.com/mono/mono/tree/master/mcs/class/Mono.Debugger.Soft>/Mono.Debugger.Soft <https://github.com/mono/mono/tree/master/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft>/Connection.cs, 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,

Pierre



_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.dot.net
http://lists.dot.net/mailman/listinfo/mono-devel-list

Reply via email to