[Mono-dev] soft debug

Zoltan Varga vargaz at gmail.com
Tue Feb 27 14:26:26 UTC 2018


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 <pierre.saunier at ppmodeler.com>
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 <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) {
>   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
> Mono-devel-list at lists.dot.net
> http://lists.dot.net/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-devel-list/attachments/20180227/9efa4d45/attachment.html>


More information about the Mono-devel-list mailing list