soft debug

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

soft debug

pierre

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 file mono/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
  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) {
  long id = 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
[hidden email]
http://lists.dot.net/mailman/listinfo/mono-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: soft debug

Zoltan Varga
Hi,

  There is no reply, only the requests sent from the debugger to the debuggee have a reply.

              Zoltan

On Tue, Feb 27, 2018 at 8:45 AM, pierre <[hidden email]> wrote:

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 file mono/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/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) {
  long id = 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
[hidden email]
http://lists.dot.net/mailman/listinfo/mono-devel-list



_______________________________________________
Mono-devel-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/mono-devel-list