Hi Kent,

Sorry for the delayed response, I was hoping someone else more knowledgeable
would answer. Turns out, I just had to do this myself. The solution is
sub-optimal, so hopefully we can improve things a bit in a newer MonoDevelop
because right now it's a bit like jumping through hoops.

The mtouch tool has an option `--xcode=[path]` that can be used in
MonoDevelop's Project Options in the "iPhone Build" section (or you can just
use mtouch directly in a terminal). What you need to do is create a new
project directory (which will be used to dump some autogenerated assembly
code to). Once you've done that, pass that option to mtouch by adding
--xcode=/path/to/project to the "Additional arguments to pass to mtouch)
textbox and then build your app in MonoDevelop (the Debug target may be the
most useful, I'm not sure). This will dump the AOT'd assembly source code to
/path/to/project but is, unfortunately, missing a few things to be a valid
Xcode project. What you'll need to do next is to copy the Info.plist file
from your MonoDevelop project into /path/to/project. This is where things
get a little more complicated...

MonoDevelop seems to generate files like System.dll.6.s if it was configured
to target armv6 (probably named System.dll.7.s if targeting armv7), but the
project.pbxproj file that MonoDevelop autogenerates refers to System.dll.s
so what you'll need to do is edit the project.pbxproj file
(/path/to/project/<projectName>.xcodeproj/project.pbxproj) and fix the *.s
references. Elsewhere in the file, you'll find a section defining
OTHER_LDFLAGS which will wrongly include "-u" "_catch_exception_raise". If
you remove that, then opening the autogenerated project and building it
should work.

The resulting app will have symbol names that are easy to map to their
equivalent C# names, and, while not having "friendly" C# source code to
read, will at least allow you to have a clearer picture of what is going on
when you get that crash.

This method will allow you to debug using gdb on the device as well, which
can be really helpful.

Hope that helps and sorry that this isn't a lot easier to do (if it were up
to me, it would be a single button click!).

Good luck!

Jeff

On Fri, Aug 5, 2011 at 5:29 PM, kentfonager <[email protected]> wrote:

> Hi everybody
>
> Unfortunately I have an app in the AppStore, thats has some random crashes.
> Today I digged into some of the crash reports, for unfortunately every
> memory adress, for the crashed thread, ends up in som mono code and
> functions. None of them shows lines in "my code".
>
> How do you guys handle crash reports ? Is it NOT possible to get something
> usefull out of the crash reports, when using MonoTouch ?
>
> With hope of a usefull reply :-)
>
> Cheers from Denmark,
> Kent Fonager, netcoders aps
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/Monotouch-and-crash-reports-problems-tp3722325p3722325.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>



-- 
Rate my reply: http://www.nicereply.com/xamarin/jstedfast
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to