Managed to compile "something" for Android...

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

Managed to compile "something" for Android...

Göran Krampe
 
Hi all!

I managed using some small hacks in the new CMake files + using a
project called ndk-wrappers (that makes the regular Android NDK behave
more like a regular build env capable of producing executables) to stab
myself through the Squeak VM build and get this:

gokr@yoda:/media/ten/sqdroid/Squeak-3.11.3.2135-src/droid$ file squeakvm
squeakvm: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically
linked, not stripped
gokr@yoda:/media/ten/sqdroid/Squeak-3.11.3.2135-src/droid$ ls -la squeakvm
-rwxr-xr-x 1 gokr gokr 1792112 2009-10-26 18:12 squeakvm

...now, moving it to the Android emulator and trying to run it cause a
seg fault :)

Then I installed a gdb on the emulator and managed to do "file squeakvm"
and followed by run - then boom. I don't know gdb enough to figure out
what to do...

But hey, some kind of progress! :) I should probably add a "-g" to the
build and see if I can get more info. All hints on gdb tricks appreciated.

regards, Göran

Reply | Threaded
Open this post in threaded view
|

Re: Managed to compile "something" for Android...

David T. Lewis
 
On Tue, Oct 27, 2009 at 09:58:24AM +0100, G?ran Krampe wrote:
>
> But hey, some kind of progress! :) I should probably add a "-g" to the
> build and see if I can get more info. All hints on gdb tricks appreciated.

Hi G?ran,

Yes you need to use -g. When you run cmake/configure, give it the argument
"--CFLAGS=-g" to make this happen. Run "platforms/cmake/configure --help"
for an explanation.

You can copy the compiled files into some temporary directory, then run
your VM under gdb in that directory. So for example (using Linux as the
example to get the idea across) if you had compiled the VM and installed
it in /usr/local/lib/squeak/3.11.5-2145, you could do something like this:

  $ mkdir tmp
  $ cd tmp
  $ ln -s ../../SqueakV39.sources .
  $ cp /usr/local/lib/squeak/3.11.5-2145/* .
  $ gdb ./squeakvm
  (gdb) set args ../myimage.image
  (gdb) wh 20
  (gdb) r

Dave