Skip to content

Instantly share code, notes, and snippets.

View kangaroo's full-sized avatar

Geoff Norton kangaroo

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using MonoTouch.ObjCRuntime;
namespace BlockTestiPad
3.0.0:
[0.79][18:33] plasma@limestone:~/Source/monotouch-samples/Hello$ du -sk device/Hello.app
4624 device/Hello.app
[0.79][18:33] plasma@limestone:~/Source/monotouch-samples/Hello$ ls -al device/Hello.app
total 9248
drwxr-xr-x 10 plasma staff 340 15 Apr 18:33 .
drwxr-xr-x 4 plasma staff 136 15 Apr 18:33 ..
-rw-r--r-- 1 plasma staff 873 15 Apr 18:33 Info.plist
-rw-r--r-- 1 plasma staff 8 15 Apr 18:33 PkgInfo
ibot(0/1): offset: 0x20000, length: 0x3b396, padded: 0x3b3c0
ibox(1/1): offset: 0x5b3c0, length: 0x28d22, padded: 0x28d40
dtre(2/1): offset: 0x84100, length: 0xa476, padded: 0xa4c0
logo(3/1): offset: 0x8e5c0, length: 0x2956, padded: 0x2980
recm(4/1): offset: 0x90f40, length: 0xbee6, padded: 0xbf00
nsrv(5/1): offset: 0x9ce40, length: 0x53b6, padded: 0x5400
bat0(6/1): offset: 0xa2240, length: 0xe1a6, padded: 0xe1c0
bat1(7/1): offset: 0xb0400, length: 0x102f6, padded: 0x10340
glyC(8/1): offset: 0xc0740, length: 0x5346, padded: 0x5380
glyP(9/1): offset: 0xc5ac0, length: 0x4f56, padded: 0x4f80
LDADD_MONO = \
$(MONO_LIB) \
$(GLIB_LIBS) \
$(LLVM_LIBS) \
-lm \
$(MONO_DTRACE_OBJECT) \
$(LLVM_LDFLAGS)
LDFLAGS_MONO = \
$(static_flags) -export-dynamic $(monobinldflags) $(monobin_platform_ldflags)
static IntPtr java_vm;
[ThreadStatic] static IntPtr env;
static IntPtr Env {
get {
if (env == null) {
get_env_from (java_vm);
}
return env;
}
typedef struct _pthread
{
long sig; /* Unique signature for this structure */
struct __darwin_pthread_handler_rec *__cleanup_stack;
pthread_lock_t lock; /* Used for internal mutex on structure */
uint32_t detached:8,
inherit:8,
policy:8,
freeStackOnExit:1,
newstyle:1,
MonoDroid Exception Problem
We are integrating 2 distinct VM's that do not have knowledge of one another; and each has their own exception handling mechanism. Mono's debugger unhandled exception support works by walking the LMF's and checking if there are any call filters that would catch the exception, if there are not we pass the exception to the debugger before crashing.
MonoDroid currently implements exception interleaving by catching all exceptions at the transition point, and converting them to exceptions of the other VM type (encapsulating the pertinent information in a string, which kind of sucks).
Take the following example (psuedo-code):
zygote (java Main)
|
export PKG_CONFIG_PATH=/opt/moonlight-osx/lib/pkgconfig:/usr/lib/pkgconfig
export PKG_CONFIG_LIBDIR=
export CFLAGS="-arch i386"
export CXXFLAGS="-arch i386"
CYAN="\[$(tput bold ; tput setaf 6)\]"
NOCOLOUR="\[$(tput sgr0)\]"
export PS1="[darwoon-env] \u@\h:${CYAN}\w${NOCOLOUR}\$ "
#!/bin/sh
rm -rf freetype-2.4.4
if [ ! -e freetype-2.4.4.tar.bz2 ]; then
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.4.tar.bz2
fi
bzip2 -dc freetype-2.4.4.tar.bz2 | tar xvf -
<key>bsd_device_name</key>
<string>en0</string>
<key>hardware_address</key>
<string>68:a8:6d:14:fb:94</string>
<key>type</key>
<string>IEEE80211</string>