VM is being buil without debug info?

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

VM is being buil without debug info?

Mariano Martinez Peck
 
Hi guys. I am building a VM with debug mode:

CogCocoaIOSConfig new
       generateForDebug;
       generateSources; generate.


So the flags it should use are: '-g3' '-O0' '-DDEBUGVM=1'

Now I am debugging a crash with gdb but bt shows just '??':


Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0000080c
0x1f4b0f77 in ?? ()
(gdb) bt
#0  0x1f4b0f77 in ?? ()
#1  0x1f4c2d6e in ?? ()
#2  0x1f4ac10e in ?? ()
#3  0x1f4adc81 in ?? ()
#4  0x1f4b9196 in ?? ()
#5  0x1f4b922e in ?? ()
#6  0x1f4b7966 in ?? ()
#7  0x1f4b4b8f in ?? ()
#8  0x1f4b491f in ?? ()
#9  0x1f4b4532 in ?? ()
#10 0x1f4b463b in ?? ()
#11 0x1f400cce in ?? ()
#12 0x1f4b45eb in ?? ()
#13 0x1f4b44b7 in ?? ()
#14 0x1f4007c8 in ?? ()
#15 0x1f4a9646 in ?? ()
#16 0x1f4b723b in ?? ()
#17 0x1f400cce in ?? ()
#18 0x1f4b71ea in ?? ()
#19 0x1f4b6b22 in ?? ()
#20 0x1f4a956d in ?? ()
(gdb)


any idea? does it mean that the VM is being built without the debug info?

thanks

--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: VM is being buil without debug info?

Igor Stasenko

I use similar setup, and mine shows it just fine:

NBCogCocoaIOSConfig new
        generateForDebug;
        "generateForRelease;"
        addExternalPlugins: #( FT2Plugin  );
        addInternalPlugins: #( UnixOSProcessPlugin );
         generateSources; generate.
.

(gdb) bt
#0  0x224ce9c8 in ?? ()
#1  0x00143031 in primitiveNativeCall () at
/Users/sig/projects/cog/sig-cog/src/plugins/NativeBoostPlugin/NativeBoostPlugin.c:224
#2  0x000376ab in callExternalPrimitive (functionID=0x142eb0
<primitiveNativeCall>) at
/Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:9753
#3  0x0005b647 in primitiveExternalCall () at
/Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:27294
#4  0x00049ac0 in interpretMethodFromMachineCode () at
/Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:18302
#5  0x0003a6ad in ceSendsupertonumArgs (selector=550210564,
superNormalBar=0, rcvr=577210208, numArgs=3) at
/Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:10829
#6  0x1f40010b in ?? ()
#7  0x00049045 in initStackPagesAndInterpret () at
/Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:17865
#8  0x00026ad1 in interpret () at
/Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:1979
.....


Make sure you use right executable (clean up everything and rebuild
from scratch)..



On 8 May 2012 16:22, Mariano Martinez Peck <[hidden email]> wrote:

>
> Hi guys. I am building a VM with debug mode:
>
> CogCocoaIOSConfig new
>        generateForDebug;
>        generateSources; generate.
>
>
> So the flags it should use are: '-g3' '-O0' '-DDEBUGVM=1'
>
> Now I am debugging a crash with gdb but bt shows just '??':
>
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_PROTECTION_FAILURE at address: 0x0000080c
> 0x1f4b0f77 in ?? ()
> (gdb) bt
> #0  0x1f4b0f77 in ?? ()
> #1  0x1f4c2d6e in ?? ()
> #2  0x1f4ac10e in ?? ()
> #3  0x1f4adc81 in ?? ()
> #4  0x1f4b9196 in ?? ()
> #5  0x1f4b922e in ?? ()
> #6  0x1f4b7966 in ?? ()
> #7  0x1f4b4b8f in ?? ()
> #8  0x1f4b491f in ?? ()
> #9  0x1f4b4532 in ?? ()
> #10 0x1f4b463b in ?? ()
> #11 0x1f400cce in ?? ()
> #12 0x1f4b45eb in ?? ()
> #13 0x1f4b44b7 in ?? ()
> #14 0x1f4007c8 in ?? ()
> #15 0x1f4a9646 in ?? ()
> #16 0x1f4b723b in ?? ()
> #17 0x1f400cce in ?? ()
> #18 0x1f4b71ea in ?? ()
> #19 0x1f4b6b22 in ?? ()
> #20 0x1f4a956d in ?? ()
> (gdb)
>
>
> any idea? does it mean that the VM is being built without the debug info?
>
> thanks
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>



--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: VM is being buil without debug info?

Mariano Martinez Peck
 


On Tue, May 8, 2012 at 4:58 PM, Igor Stasenko <[hidden email]> wrote:

I use similar setup, and mine shows it just fine:

NBCogCocoaIOSConfig new
       generateForDebug;
       "generateForRelease;"
       addExternalPlugins: #( FT2Plugin  );
       addInternalPlugins: #( UnixOSProcessPlugin );
        generateSources; generate.
.

(gdb) bt
#0  0x224ce9c8 in ?? ()
#1  0x00143031 in primitiveNativeCall () at
/Users/sig/projects/cog/sig-cog/src/plugins/NativeBoostPlugin/NativeBoostPlugin.c:224
#2  0x000376ab in callExternalPrimitive (functionID=0x142eb0
<primitiveNativeCall>) at
/Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:9753
#3  0x0005b647 in primitiveExternalCall () at
/Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:27294
#4  0x00049ac0 in interpretMethodFromMachineCode () at
/Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:18302
#5  0x0003a6ad in ceSendsupertonumArgs (selector=550210564,
superNormalBar=0, rcvr=577210208, numArgs=3) at
/Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:10829
#6  0x1f40010b in ?? ()
#7  0x00049045 in initStackPagesAndInterpret () at
/Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:17865
#8  0x00026ad1 in interpret () at
/Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:1979
.....


Make sure you use right executable

I tried with both

blessed/results/CogVM.app/Contents/MacOS

and

blessed/results/Release/CogVM.app/Contents/MacOS/CogVM
 
(clean up everything and rebuild
from scratch)..

I always clean everything. I remove /build /src and /results

:(
 



On 8 May 2012 16:22, Mariano Martinez Peck <[hidden email]> wrote:
>
> Hi guys. I am building a VM with debug mode:
>
> CogCocoaIOSConfig new
>        generateForDebug;
>        generateSources; generate.
>
>
> So the flags it should use are: '-g3' '-O0' '-DDEBUGVM=1'
>
> Now I am debugging a crash with gdb but bt shows just '??':
>
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_PROTECTION_FAILURE at address: 0x0000080c
> 0x1f4b0f77 in ?? ()
> (gdb) bt
> #0  0x1f4b0f77 in ?? ()
> #1  0x1f4c2d6e in ?? ()
> #2  0x1f4ac10e in ?? ()
> #3  0x1f4adc81 in ?? ()
> #4  0x1f4b9196 in ?? ()
> #5  0x1f4b922e in ?? ()
> #6  0x1f4b7966 in ?? ()
> #7  0x1f4b4b8f in ?? ()
> #8  0x1f4b491f in ?? ()
> #9  0x1f4b4532 in ?? ()
> #10 0x1f4b463b in ?? ()
> #11 0x1f400cce in ?? ()
> #12 0x1f4b45eb in ?? ()
> #13 0x1f4b44b7 in ?? ()
> #14 0x1f4007c8 in ?? ()
> #15 0x1f4a9646 in ?? ()
> #16 0x1f4b723b in ?? ()
> #17 0x1f400cce in ?? ()
> #18 0x1f4b71ea in ?? ()
> #19 0x1f4b6b22 in ?? ()
> #20 0x1f4a956d in ?? ()
> (gdb)
>
>
> any idea? does it mean that the VM is being built without the debug info?
>
> thanks
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>



--
Best regards,
Igor Stasenko.



--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: VM is being buil without debug info?

Igor Stasenko

On 8 May 2012 17:23, Mariano Martinez Peck <[hidden email]> wrote:

>
>
>
> On Tue, May 8, 2012 at 4:58 PM, Igor Stasenko <[hidden email]> wrote:
>>
>>
>> I use similar setup, and mine shows it just fine:
>>
>> NBCogCocoaIOSConfig new
>>        generateForDebug;
>>        "generateForRelease;"
>>        addExternalPlugins: #( FT2Plugin  );
>>        addInternalPlugins: #( UnixOSProcessPlugin );
>>         generateSources; generate.
>> .
>>
>> (gdb) bt
>> #0  0x224ce9c8 in ?? ()
>> #1  0x00143031 in primitiveNativeCall () at
>> /Users/sig/projects/cog/sig-cog/src/plugins/NativeBoostPlugin/NativeBoostPlugin.c:224
>> #2  0x000376ab in callExternalPrimitive (functionID=0x142eb0
>> <primitiveNativeCall>) at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:9753
>> #3  0x0005b647 in primitiveExternalCall () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:27294
>> #4  0x00049ac0 in interpretMethodFromMachineCode () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:18302
>> #5  0x0003a6ad in ceSendsupertonumArgs (selector=550210564,
>> superNormalBar=0, rcvr=577210208, numArgs=3) at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:10829
>> #6  0x1f40010b in ?? ()
>> #7  0x00049045 in initStackPagesAndInterpret () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:17865
>> #8  0x00026ad1 in interpret () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:1979
>> .....
>>
>>
>> Make sure you use right executable
>
>
> I tried with both
>
> blessed/results/CogVM.app/Contents/MacOS
>
> and
>
> blessed/results/Release/CogVM.app/Contents/MacOS/CogVM
>
>>
>> (clean up everything and rebuild
>> from scratch)..
>
>
> I always clean everything. I remove /build /src and /results
>
> :(
>
Try

rm -rf build
rm -fr results


>>
>>
>>
>>
>> On 8 May 2012 16:22, Mariano Martinez Peck <[hidden email]> wrote:
>> >
>> > Hi guys. I am building a VM with debug mode:
>> >
>> > CogCocoaIOSConfig new
>> >        generateForDebug;
>> >        generateSources; generate.
>> >
>> >
>> > So the flags it should use are: '-g3' '-O0' '-DDEBUGVM=1'
>> >
>> > Now I am debugging a crash with gdb but bt shows just '??':
>> >
>> >
>> > Program received signal EXC_BAD_ACCESS, Could not access memory.
>> > Reason: KERN_PROTECTION_FAILURE at address: 0x0000080c
>> > 0x1f4b0f77 in ?? ()
>> > (gdb) bt
>> > #0  0x1f4b0f77 in ?? ()
>> > #1  0x1f4c2d6e in ?? ()
>> > #2  0x1f4ac10e in ?? ()
>> > #3  0x1f4adc81 in ?? ()
>> > #4  0x1f4b9196 in ?? ()
>> > #5  0x1f4b922e in ?? ()
>> > #6  0x1f4b7966 in ?? ()
>> > #7  0x1f4b4b8f in ?? ()
>> > #8  0x1f4b491f in ?? ()
>> > #9  0x1f4b4532 in ?? ()
>> > #10 0x1f4b463b in ?? ()
>> > #11 0x1f400cce in ?? ()
>> > #12 0x1f4b45eb in ?? ()
>> > #13 0x1f4b44b7 in ?? ()
>> > #14 0x1f4007c8 in ?? ()
>> > #15 0x1f4a9646 in ?? ()
>> > #16 0x1f4b723b in ?? ()
>> > #17 0x1f400cce in ?? ()
>> > #18 0x1f4b71ea in ?? ()
>> > #19 0x1f4b6b22 in ?? ()
>> > #20 0x1f4a956d in ?? ()
>> > (gdb)
>> >
>> >
>> > any idea? does it mean that the VM is being built without the debug info?
>> >
>> > thanks
>> >
>> > --
>> > Mariano
>> > http://marianopeck.wordpress.com
>> >
>> >
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>



--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: VM is being buil without debug info?

Mariano Martinez Peck
 


On Tue, May 8, 2012 at 5:45 PM, Igor Stasenko <[hidden email]> wrote:

On 8 May 2012 17:23, Mariano Martinez Peck <[hidden email]> wrote:
>
>
>
> On Tue, May 8, 2012 at 4:58 PM, Igor Stasenko <[hidden email]> wrote:
>>
>>
>> I use similar setup, and mine shows it just fine:
>>
>> NBCogCocoaIOSConfig new
>>        generateForDebug;
>>        "generateForRelease;"
>>        addExternalPlugins: #( FT2Plugin  );
>>        addInternalPlugins: #( UnixOSProcessPlugin );
>>         generateSources; generate.
>> .
>>
>> (gdb) bt
>> #0  0x224ce9c8 in ?? ()
>> #1  0x00143031 in primitiveNativeCall () at
>> /Users/sig/projects/cog/sig-cog/src/plugins/NativeBoostPlugin/NativeBoostPlugin.c:224
>> #2  0x000376ab in callExternalPrimitive (functionID=0x142eb0
>> <primitiveNativeCall>) at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:9753
>> #3  0x0005b647 in primitiveExternalCall () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:27294
>> #4  0x00049ac0 in interpretMethodFromMachineCode () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:18302
>> #5  0x0003a6ad in ceSendsupertonumArgs (selector=550210564,
>> superNormalBar=0, rcvr=577210208, numArgs=3) at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:10829
>> #6  0x1f40010b in ?? ()
>> #7  0x00049045 in initStackPagesAndInterpret () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:17865
>> #8  0x00026ad1 in interpret () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:1979
>> .....
>>
>>
>> Make sure you use right executable
>
>
> I tried with both
>
> blessed/results/CogVM.app/Contents/MacOS
>
> and
>
> blessed/results/Release/CogVM.app/Contents/MacOS/CogVM
>
>>
>> (clean up everything and rebuild
>> from scratch)..
>
>
> I always clean everything. I remove /build /src and /results
>
> :(
>
Try

rm -rf build
rm -fr results


I did it, but same results. Just executing an image that crashes shows in console "Bus error" and that's all, no stacktrace.
If I run in gdb, I got all '??' as shown....

:(
 

>>
>>
>>
>>
>> On 8 May 2012 16:22, Mariano Martinez Peck <[hidden email]> wrote:
>> >
>> > Hi guys. I am building a VM with debug mode:
>> >
>> > CogCocoaIOSConfig new
>> >        generateForDebug;
>> >        generateSources; generate.
>> >
>> >
>> > So the flags it should use are: '-g3' '-O0' '-DDEBUGVM=1'
>> >
>> > Now I am debugging a crash with gdb but bt shows just '??':
>> >
>> >
>> > Program received signal EXC_BAD_ACCESS, Could not access memory.
>> > Reason: KERN_PROTECTION_FAILURE at address: 0x0000080c
>> > 0x1f4b0f77 in ?? ()
>> > (gdb) bt
>> > #0  0x1f4b0f77 in ?? ()
>> > #1  0x1f4c2d6e in ?? ()
>> > #2  0x1f4ac10e in ?? ()
>> > #3  0x1f4adc81 in ?? ()
>> > #4  0x1f4b9196 in ?? ()
>> > #5  0x1f4b922e in ?? ()
>> > #6  0x1f4b7966 in ?? ()
>> > #7  0x1f4b4b8f in ?? ()
>> > #8  0x1f4b491f in ?? ()
>> > #9  0x1f4b4532 in ?? ()
>> > #10 0x1f4b463b in ?? ()
>> > #11 0x1f400cce in ?? ()
>> > #12 0x1f4b45eb in ?? ()
>> > #13 0x1f4b44b7 in ?? ()
>> > #14 0x1f4007c8 in ?? ()
>> > #15 0x1f4a9646 in ?? ()
>> > #16 0x1f4b723b in ?? ()
>> > #17 0x1f400cce in ?? ()
>> > #18 0x1f4b71ea in ?? ()
>> > #19 0x1f4b6b22 in ?? ()
>> > #20 0x1f4a956d in ?? ()
>> > (gdb)
>> >
>> >
>> > any idea? does it mean that the VM is being built without the debug info?
>> >
>> > thanks
>> >
>> > --
>> > Mariano
>> > http://marianopeck.wordpress.com
>> >
>> >
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>



--
Best regards,
Igor Stasenko.



--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: VM is being buil without debug info?

Mariano Martinez Peck
 


On Tue, May 8, 2012 at 5:57 PM, Mariano Martinez Peck <[hidden email]> wrote:


On Tue, May 8, 2012 at 5:45 PM, Igor Stasenko <[hidden email]> wrote:

On 8 May 2012 17:23, Mariano Martinez Peck <[hidden email]> wrote:
>
>
>
> On Tue, May 8, 2012 at 4:58 PM, Igor Stasenko <[hidden email]> wrote:
>>
>>
>> I use similar setup, and mine shows it just fine:
>>
>> NBCogCocoaIOSConfig new
>>        generateForDebug;
>>        "generateForRelease;"
>>        addExternalPlugins: #( FT2Plugin  );
>>        addInternalPlugins: #( UnixOSProcessPlugin );
>>         generateSources; generate.
>> .
>>
>> (gdb) bt
>> #0  0x224ce9c8 in ?? ()
>> #1  0x00143031 in primitiveNativeCall () at
>> /Users/sig/projects/cog/sig-cog/src/plugins/NativeBoostPlugin/NativeBoostPlugin.c:224
>> #2  0x000376ab in callExternalPrimitive (functionID=0x142eb0
>> <primitiveNativeCall>) at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:9753
>> #3  0x0005b647 in primitiveExternalCall () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:27294
>> #4  0x00049ac0 in interpretMethodFromMachineCode () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:18302
>> #5  0x0003a6ad in ceSendsupertonumArgs (selector=550210564,
>> superNormalBar=0, rcvr=577210208, numArgs=3) at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:10829
>> #6  0x1f40010b in ?? ()
>> #7  0x00049045 in initStackPagesAndInterpret () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:17865
>> #8  0x00026ad1 in interpret () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:1979
>> .....
>>
>>
>> Make sure you use right executable
>
>
> I tried with both
>
> blessed/results/CogVM.app/Contents/MacOS
>
> and
>
> blessed/results/Release/CogVM.app/Contents/MacOS/CogVM
>
>>
>> (clean up everything and rebuild
>> from scratch)..
>
>
> I always clean everything. I remove /build /src and /results
>
> :(
>
Try

rm -rf build
rm -fr results


I did it, but same results. Just executing an image that crashes shows in console "Bus error" and that's all, no stacktrace.
If I run in gdb, I got all '??' as shown....


Not even the debug vm of Jenkins is working (same results as my VM):
https://ci.lille.inria.fr/pharo/view/VM-dev/job/Cog-Mac-Cocoa-Debug/

 
:(
 

>>
>>
>>
>>
>> On 8 May 2012 16:22, Mariano Martinez Peck <[hidden email]> wrote:
>> >
>> > Hi guys. I am building a VM with debug mode:
>> >
>> > CogCocoaIOSConfig new
>> >        generateForDebug;
>> >        generateSources; generate.
>> >
>> >
>> > So the flags it should use are: '-g3' '-O0' '-DDEBUGVM=1'
>> >
>> > Now I am debugging a crash with gdb but bt shows just '??':
>> >
>> >
>> > Program received signal EXC_BAD_ACCESS, Could not access memory.
>> > Reason: KERN_PROTECTION_FAILURE at address: 0x0000080c
>> > 0x1f4b0f77 in ?? ()
>> > (gdb) bt
>> > #0  0x1f4b0f77 in ?? ()
>> > #1  0x1f4c2d6e in ?? ()
>> > #2  0x1f4ac10e in ?? ()
>> > #3  0x1f4adc81 in ?? ()
>> > #4  0x1f4b9196 in ?? ()
>> > #5  0x1f4b922e in ?? ()
>> > #6  0x1f4b7966 in ?? ()
>> > #7  0x1f4b4b8f in ?? ()
>> > #8  0x1f4b491f in ?? ()
>> > #9  0x1f4b4532 in ?? ()
>> > #10 0x1f4b463b in ?? ()
>> > #11 0x1f400cce in ?? ()
>> > #12 0x1f4b45eb in ?? ()
>> > #13 0x1f4b44b7 in ?? ()
>> > #14 0x1f4007c8 in ?? ()
>> > #15 0x1f4a9646 in ?? ()
>> > #16 0x1f4b723b in ?? ()
>> > #17 0x1f400cce in ?? ()
>> > #18 0x1f4b71ea in ?? ()
>> > #19 0x1f4b6b22 in ?? ()
>> > #20 0x1f4a956d in ?? ()
>> > (gdb)
>> >
>> >
>> > any idea? does it mean that the VM is being built without the debug info?
>> >
>> > thanks
>> >
>> > --
>> > Mariano
>> > http://marianopeck.wordpress.com
>> >
>> >
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>



--
Best regards,
Igor Stasenko.



--
Mariano
http://marianopeck.wordpress.com




--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: VM is being buil without debug info?

Mariano Martinez Peck
 
Moreover, if I do a 1 tinyBenchmarks it is clear it is slow...so it is a debug VM. I don't understand why I cannot see the debug info from gdb :(

On Tue, May 8, 2012 at 6:02 PM, Mariano Martinez Peck <[hidden email]> wrote:


On Tue, May 8, 2012 at 5:57 PM, Mariano Martinez Peck <[hidden email]> wrote:


On Tue, May 8, 2012 at 5:45 PM, Igor Stasenko <[hidden email]> wrote:

On 8 May 2012 17:23, Mariano Martinez Peck <[hidden email]> wrote:
>
>
>
> On Tue, May 8, 2012 at 4:58 PM, Igor Stasenko <[hidden email]> wrote:
>>
>>
>> I use similar setup, and mine shows it just fine:
>>
>> NBCogCocoaIOSConfig new
>>        generateForDebug;
>>        "generateForRelease;"
>>        addExternalPlugins: #( FT2Plugin  );
>>        addInternalPlugins: #( UnixOSProcessPlugin );
>>         generateSources; generate.
>> .
>>
>> (gdb) bt
>> #0  0x224ce9c8 in ?? ()
>> #1  0x00143031 in primitiveNativeCall () at
>> /Users/sig/projects/cog/sig-cog/src/plugins/NativeBoostPlugin/NativeBoostPlugin.c:224
>> #2  0x000376ab in callExternalPrimitive (functionID=0x142eb0
>> <primitiveNativeCall>) at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:9753
>> #3  0x0005b647 in primitiveExternalCall () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:27294
>> #4  0x00049ac0 in interpretMethodFromMachineCode () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:18302
>> #5  0x0003a6ad in ceSendsupertonumArgs (selector=550210564,
>> superNormalBar=0, rcvr=577210208, numArgs=3) at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:10829
>> #6  0x1f40010b in ?? ()
>> #7  0x00049045 in initStackPagesAndInterpret () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:17865
>> #8  0x00026ad1 in interpret () at
>> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:1979
>> .....
>>
>>
>> Make sure you use right executable
>
>
> I tried with both
>
> blessed/results/CogVM.app/Contents/MacOS
>
> and
>
> blessed/results/Release/CogVM.app/Contents/MacOS/CogVM
>
>>
>> (clean up everything and rebuild
>> from scratch)..
>
>
> I always clean everything. I remove /build /src and /results
>
> :(
>
Try

rm -rf build
rm -fr results


I did it, but same results. Just executing an image that crashes shows in console "Bus error" and that's all, no stacktrace.
If I run in gdb, I got all '??' as shown....


Not even the debug vm of Jenkins is working (same results as my VM):
https://ci.lille.inria.fr/pharo/view/VM-dev/job/Cog-Mac-Cocoa-Debug/

 
:(
 

>>
>>
>>
>>
>> On 8 May 2012 16:22, Mariano Martinez Peck <[hidden email]> wrote:
>> >
>> > Hi guys. I am building a VM with debug mode:
>> >
>> > CogCocoaIOSConfig new
>> >        generateForDebug;
>> >        generateSources; generate.
>> >
>> >
>> > So the flags it should use are: '-g3' '-O0' '-DDEBUGVM=1'
>> >
>> > Now I am debugging a crash with gdb but bt shows just '??':
>> >
>> >
>> > Program received signal EXC_BAD_ACCESS, Could not access memory.
>> > Reason: KERN_PROTECTION_FAILURE at address: 0x0000080c
>> > 0x1f4b0f77 in ?? ()
>> > (gdb) bt
>> > #0  0x1f4b0f77 in ?? ()
>> > #1  0x1f4c2d6e in ?? ()
>> > #2  0x1f4ac10e in ?? ()
>> > #3  0x1f4adc81 in ?? ()
>> > #4  0x1f4b9196 in ?? ()
>> > #5  0x1f4b922e in ?? ()
>> > #6  0x1f4b7966 in ?? ()
>> > #7  0x1f4b4b8f in ?? ()
>> > #8  0x1f4b491f in ?? ()
>> > #9  0x1f4b4532 in ?? ()
>> > #10 0x1f4b463b in ?? ()
>> > #11 0x1f400cce in ?? ()
>> > #12 0x1f4b45eb in ?? ()
>> > #13 0x1f4b44b7 in ?? ()
>> > #14 0x1f4007c8 in ?? ()
>> > #15 0x1f4a9646 in ?? ()
>> > #16 0x1f4b723b in ?? ()
>> > #17 0x1f400cce in ?? ()
>> > #18 0x1f4b71ea in ?? ()
>> > #19 0x1f4b6b22 in ?? ()
>> > #20 0x1f4a956d in ?? ()
>> > (gdb)
>> >
>> >
>> > any idea? does it mean that the VM is being built without the debug info?
>> >
>> > thanks
>> >
>> > --
>> > Mariano
>> > http://marianopeck.wordpress.com
>> >
>> >
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>



--
Best regards,
Igor Stasenko.



--
Mariano
http://marianopeck.wordpress.com




--
Mariano
http://marianopeck.wordpress.com




--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: VM is being buil without debug info?

Stefan Marr-3


On 08 May 2012, at 18:09, Mariano Martinez Peck wrote:

> Moreover, if I do a 1 tinyBenchmarks it is clear it is slow...so it is a debug VM. I don't understand why I cannot see the debug info from gdb :(

You can check whether the object files contain debug infos with `dwarfdump file.o`.

And you probably can also tell your build environment to run in verbose mode to see the actual GCC invocation to check the flags.

The typical reason why it doesn't show debug information is because you have been executing in the nirvana for a while already, and corrupted your stack.

Best regards
Stefan



--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax:   +32 2 629 3525