On Mon, Mar 29, 2010 at 9:10 AM, Mariano Martinez Peck marianopeck@gmail.com wrote:
On Sat, Mar 27, 2010 at 5:57 PM, Eliot Miranda eliot.miranda@gmail.com wrote:
Hi Mario, first you want to compile with debug symbols and perhaps with no optimization. Second it looks like you need to link with the pthreads library, not juts compile. So you can try e.g. platforms/unix/configure CFLAGS="-g3 -pthread" LIBS=-lpthread FWIW I routinely use gdb on Mac OS X, linux and windows to debug the Teleplace Cog vm.
Thanks Eliot. I tried what you said, but I got another problem now. I configure the VM, with this:
../unix/cmake/configure --CFLAGS="-g3 -pthread" --LIBS=-lpthread
Then I make and make install. No problems. SqueakVM works ok and I can open my images.
The problem is with gdb. I tried this:
ubuntu@ubuntu-desktop:~/Pharo/vm/Squeak-3.11.3.2135-pharo-src/build$ gdb squeak GNU gdb (GDB) 7.0-ubuntu Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... "/home/ubuntu/Pharo/vm/Squeak-3.11.3.2135-pharo-src/build/squeak": not in executable format: File format not recognized (gdb)
And the same happens with gdb ./squeak or gdb /usr/local/bin/squeak etc...
But squeak IS executable:
ubuntu@ubuntu-desktop:~/Pharo/vm/Squeak-3.11.3.2135-pharo-src/build$ ls -la /usr/local/bin/squeak -rwxr-xr-x 1 root root 1791 2010-03-28 21:57 /usr/local/bin/squeak
So...any ideas what can be the problem ?
Try opening "squeak" in a text editor. It could be a script that starts the real VM executable which might be elsewhere.
Also, a tip: if you're making VMs, it's better not to install them in /usr/local until you're happy with them being stable and working. Use:
../unix/cmake/configure --CFLAGS="-g3 -pthread" --LIBS=-lpthread --prefix=~/Pharo/myvm (or something). nice make install
(I assume the configure script takes --prefix like GNU autoconf does?)
Also, if you just want to see how the interpreter works, you can run it inside Squeak:
http://n4.nabble.com/Simulate-3-4-with-InterpreterSimulator-td1678060.html#a...
Gulik.