COG VM and Locale

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

COG VM and Locale

hilaire
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: COG VM and Locale

Eliot Miranda-2


On Wed, Mar 2, 2011 at 8:21 AM, Hilaire Fernandes <[hidden email]> wrote:
I am still willing to get Locale working with the combination of COG VM
and Pharo. especially to make a version of DrGeo for the XO laptop where
the CPU is subminimal, it brings a big usability improvement for the kids.
But so far, the locale plugin does not work, any clue?

Run under gdb.  Things to check: there could be an unresolved reference which causes it to fail to load.  See "Testing an external plugin has completely linked" in http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild/HowToBuild.  If it loads, put a breakpoint in initialiseModule and step through it. Building a debug VM can help in debugging (again see HowToBuild)

Hilaire



Reply | Threaded
Open this post in threaded view
|

Re: COG VM and Locale

laurent laffont



On Wed, Mar 2, 2011 at 6:23 PM, Eliot Miranda <[hidden email]> wrote:


On Wed, Mar 2, 2011 at 8:21 AM, Hilaire Fernandes <[hidden email]> wrote:
I am still willing to get Locale working with the combination of COG VM
and Pharo. especially to make a version of DrGeo for the XO laptop where
the CPU is subminimal, it brings a big usability improvement for the kids.
But so far, the locale plugin does not work, any clue?

Run under gdb.  

Is there a "how to run under gdb" ?

Laurent

 
Things to check: there could be an unresolved reference which causes it to fail to load.  See "Testing an external plugin has completely linked" in http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild/HowToBuild.  If it loads, put a breakpoint in initialiseModule and step through it. Building a debug VM can help in debugging (again see HowToBuild)

Hilaire




Reply | Threaded
Open this post in threaded view
|

Re: COG VM and Locale

hilaire
In reply to this post by Eliot Miranda-2
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: COG VM and Locale

hilaire
In reply to this post by Eliot Miranda-2
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: COG VM and Locale

Eliot Miranda-2


On Wed, Mar 2, 2011 at 12:32 PM, Hilaire Fernandes <[hidden email]> wrote:
Le 02/03/2011 18:23, Eliot Miranda a écrit :

> Run under gdb.  Things to check: there could be an unresolved reference
> which causes it to fail to load.  See "Testing an external plugin has
> completely linked" in
> http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild/HowToBuild.
>  If it loads, put a breakpoint in initialiseModule and step through it.
> Building a debug VM can help in debugging (again see HowToBuild)



Not sure I got it right, but I have unreferenced symbols warning
following the step above:

I think you can ignore these because they come from libc, not form the plugin.  Since you see the plugin loaded above I *think* you know there's no undefined symbol in the plugin.  I think the below is some mysterious internal glibc detail that always gets warned about.



bash-3.2# /bin/sh /home/olpc/COG/unixbuild/bld/libtool --mode=link gcc
-Wl,--warn-unresolved-symbols -Wl,--no-allow-shlib-undefined -g -O2
-D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1
-DCOGMTVM=0 -DDEBUGVM=0 -msse -DLSB_FIRST=1    -avoid-version -module
-rpath /usr/local/lib/squeak/3.9-7 -o LocalePlugin.la LocalePlugin.lo
sqUnixLocale.lo
rm -fr .libs/LocalePlugin.la .libs/LocalePlugin.* .libs/LocalePlugin.*
gcc -shared  LocalePlugin.lo sqUnixLocale.lo
-Wl,--warn-unresolved-symbols -Wl,--no-allow-shlib-undefined -Wl,-soname
-Wl,LocalePlugin -o .libs/LocalePlugin
/lib/libc.so.6: warning: undefined reference to `__libc_stack_end@GLIBC_2.1'
/lib/libc.so.6: warning: undefined reference to `_dl_argv@GLIBC_PRIVATE'
/lib/libc.so.6: warning: undefined reference to
`_rtld_global_ro@GLIBC_PRIVATE'
/lib/libc.so.6: warning: undefined reference to `___tls_get_addr@GLIBC_2.3'
/lib/libc.so.6: warning: undefined reference to `_rtld_global@GLIBC_PRIVATE'
/lib/libc.so.6: warning: undefined reference to
`__libc_enable_secure@GLIBC_PRIVATE'
creating LocalePlugin.la
(cd .libs && rm -f LocalePlugin.la && ln -s ../LocalePlugin.la
LocalePlugin.la)







Reply | Threaded
Open this post in threaded view
|

Re: COG VM and Locale

hilaire
In reply to this post by Eliot Miranda-2
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: COG VM and Locale

hilaire
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: COG VM and Locale

Eliot Miranda-2


On Thu, Mar 3, 2011 at 12:31 PM, Hilaire Fernandes <[hidden email]> wrote:
Le 03/03/2011 20:57, Hilaire Fernandes a écrit :
> Le 02/03/2011 18:23, Eliot Miranda a écrit :
>> /branches/Cog/unixbuild/HowToBuild
>> <http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild/HowToBuild>.
>>  If it loads, put a breakpoint in initialiseModule and step through it.

Okay, strangely setting a break point to initialiseModule, put it on
SurfacePlugin

(gdb) break initialiseModule
Breakpoint 1 at 0x811acc8: file
/home/hilaire/Travaux/pharo/temp/COG/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c,
line 204.


I have to start the VM then quit, then adding again a break point on
initialiseModule set it to locale:

Program exited normally.
(gdb) break initialiseModule
Breakpoint 5 at 0x559542: file
/home/hilaire/Travaux/pharo/temp/COG/src/plugins/LocalePlugin/LocalePlugin.c,
line 112.


step throught the function is:

(gdb) r
Starting program:
/home/hilaire/Travaux/pharo/temp/COG/target/lib/squeak/3.9-7/squeak
drgeo.image
[Thread debugging using libthread_db enabled]
[New Thread 0x77f88b70 (LWP 27787)]

Breakpoint 5, initialiseModule () at
/home/hilaire/Travaux/pharo/temp/COG/src/plugins/LocalePlugin/LocalePlugin.c:112
112             return sqLocInitialize();
(gdb) s
heartbeat_handler (sig=14, sig_info=0x33, context=0x0) at
/home/hilaire/Travaux/pharo/temp/COG/platforms/unix/vm/sqUnixHeartbeat.c:475
475     {
(gdb) s
476             if (!ioOSThreadsEqual(ioCurrentOSThread(),getVMOSThread())) {
(gdb) s

Program received signal SIGTRAP, Trace/breakpoint trap.
0x0013cdc6 in pthread_self () from /lib/tls/i686/cmov/libpthread.so.0

You'll need to state

(gdb) handle SIGALRM nostop noprint noignore

first.  In fact, do that for most signals.  What's happening below is gdb stopping on delivery of the 1KHz heartbeat, so you won't get far without ignoring it.

 


Hilaire


--
Education 0.2 -- http://blog.ofset.org/hilaire



Reply | Threaded
Open this post in threaded view
|

Re: COG VM and Locale

hilaire
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: COG VM and Locale

Igor Stasenko
In reply to this post by Eliot Miranda-2
On 3 March 2011 21:43, Eliot Miranda <[hidden email]> wrote:

>
>
> On Thu, Mar 3, 2011 at 12:31 PM, Hilaire Fernandes
> <[hidden email]> wrote:
>>
>> Le 03/03/2011 20:57, Hilaire Fernandes a écrit :
>> > Le 02/03/2011 18:23, Eliot Miranda a écrit :
>> >> /branches/Cog/unixbuild/HowToBuild
>> >> <http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild/HowToBuild>.
>> >>  If it loads, put a breakpoint in initialiseModule and step through it.
>>
>> Okay, strangely setting a break point to initialiseModule, put it on
>> SurfacePlugin
>>
>> (gdb) break initialiseModule
>> Breakpoint 1 at 0x811acc8: file
>>
>> /home/hilaire/Travaux/pharo/temp/COG/platforms/Cross/plugins/SurfacePlugin/SurfacePlugin.c,
>> line 204.
>>
>>
>> I have to start the VM then quit, then adding again a break point on
>> initialiseModule set it to locale:
>>
>> Program exited normally.
>> (gdb) break initialiseModule
>> Breakpoint 5 at 0x559542: file
>>
>> /home/hilaire/Travaux/pharo/temp/COG/src/plugins/LocalePlugin/LocalePlugin.c,
>> line 112.
>>
>>
>> step throught the function is:
>>
>> (gdb) r
>> Starting program:
>> /home/hilaire/Travaux/pharo/temp/COG/target/lib/squeak/3.9-7/squeak
>> drgeo.image
>> [Thread debugging using libthread_db enabled]
>> [New Thread 0x77f88b70 (LWP 27787)]
>>
>> Breakpoint 5, initialiseModule () at
>>
>> /home/hilaire/Travaux/pharo/temp/COG/src/plugins/LocalePlugin/LocalePlugin.c:112
>> 112             return sqLocInitialize();
>> (gdb) s
>> heartbeat_handler (sig=14, sig_info=0x33, context=0x0) at
>>
>> /home/hilaire/Travaux/pharo/temp/COG/platforms/unix/vm/sqUnixHeartbeat.c:475
>> 475     {
>> (gdb) s
>> 476             if
>> (!ioOSThreadsEqual(ioCurrentOSThread(),getVMOSThread())) {
>> (gdb) s
>>
>> Program received signal SIGTRAP, Trace/breakpoint trap.
>> 0x0013cdc6 in pthread_self () from /lib/tls/i686/cmov/libpthread.so.0
>
> You'll need to state
> (gdb) handle SIGALRM nostop noprint noignore
> first.  In fact, do that for most signals.  What's happening below is gdb
> stopping on delivery of the 1KHz heartbeat, so you won't get far without
> ignoring it.
>

yeah.. i also were stuck with this cruelty before.. trying to step
instruction-wise
and was always interfered by heartbeat thread :)

>>
>> Hilaire
>>
>>
>> --
>> Education 0.2 -- http://blog.ofset.org/hilaire
>>
>>
>
>



--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: COG VM and Locale

hilaire
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: COG VM and Locale

hilaire
CONTENTS DELETED
The author has deleted this message.