[Mono-list] remote debugging on ARM

Ian Norton ian.norton-badrul at thales-esecurity.com
Tue Jan 15 21:42:39 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 15/01/13 21:01, Ian Norton wrote:
> On 15/01/13 20:50, Ian Norton wrote:
>> On Tue, Jan 15, 2013 at 08:35:25PM +0000, mickeyf wrote:
>>> So I am now able to run my app on the ARM, but I am not able
>>> to debug it there.
>>> 
>>> The debugger waits, and apparently connects: When I click
>>> Connect a dialog box flashes by too quickly for me to read it,
>>> 'Stop' is enabled in the MD menu, and my app is apparently
>>> paused (no start up messages seen).
>>> 
>>> If I have a break point the break point icon changes
>>> appearance, but I don't get the regular "paused' indication I'd
>>> see when debugging locally. Whether there is a breakpoint or
>>> not, if I try to 'continue debugging', step in, step out, do
>>> anything other than 'stop' I get either a SIGABRT or SIGILL
>>> message and am bumped back to the command line.
>>> 
>>> At one point I got exactly this:
>>> 
>>> http://stackoverflow.com/questions/13925625/sigabrt-error-on-monodevelops-custom-command-mono-soft-debugger-on-remote-devic
>>>
>>>
>>>
>
>>> 
but no one has responded to that query.
> 
>> I get very similar things when my mono program calls into
>> unmanaged libraries, particularly if they are multi-threaded.
> 
>> I find that it is not stepping over the breakpoint that does it
>> but it is the Locals or Immediate window trying to evauluate
>> objects that kills things for me.
> 
> 
> Specifically, I get:
> 
>> * Assertion at debugger-agent.c:4471, condition `tls' not met

Aha, What I seem to see happening is thiss.

1. My program hits a c# breakpoint and stops.
2. The mono runtime is suspended.
3. One of my unmanaged threads is merrily still running waiting for
some network traffic on a socket.
4. A network event happens which causes the unmanaged code to execute
a callback which actually turns out to be managed code.

When #4 happens, the pointer appears invalid and the program gets a
SEGV signal, the debugger takes this signal to mean "step next" and so
crashes.

You might be seeing somthing similar.

Ian

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJQ9c1PAAoJEPg9tunm1IFQLiAIAJn5MKPqwz1F0jqeB/YmWGsR
oTrvMavS4WG3HEGMwJHl0vu2f+btYekFUmF53Wu42xG0x0uoKTwHF0VSDtdh27wL
98ovZbUXwxcxsjV0GJvncD+eKkW1/U0cMLJ9DCgGhN2XQjkqtMlAjUTWMHBtc4u4
TY/vC8fQXuoJRiORemf7Q66iC6Cz28t9GdhpWW9PuMf7MCEMNJilfBUlqpvvz8sM
oNUR1g7MtNKeM4UK+v1oICz2a4hPPeaU2CzoXbeepmLbapcm0Fyeit6BqPEFTXnj
8md2ONXNCuvrMH5tsbrl2Rh0bver4b2m95w1YK3V7XVmXv0S26L3alazJJ+QvWo=
=0L+V
-----END PGP SIGNATURE-----


More information about the Mono-list mailing list