# New Ticket Created by "Clark Cooper" # Please include the string: [perl #53156] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=53156 >
Using Parrot 0.6.1 on Fedora Core 5, linux 2.6.15-1.2054_FC5 The program, classinfo.pir : ######################################################################### .const string Indent=' ' .const int MaxDepth = 6 .sub main :main .param pmc argv .local int argc argc = argv if argc >= 2 goto ok die "Need to provide a classname" ok: .local string classname classname = argv[1] $P0 = get_class classname $I0 = defined $P0 if $I0 goto valid die "Invalid classname" valid: $P1 = inspect $P0 $I0 = 0 display_container($P1, $I0) .end .sub display_container .param pmc box .param int level .local pmc iter .local pmc entry iter = new 'Iterator', box mloop: unless iter goto endloop entry = shift iter $S0 = entry indent(level) print $S0 print ': ' $P1 = box[$S0] $S1 = typeof $P1 say $S1 $I1 = isa $P1, 'Hash' $I2 = isa $P1, 'Array' if $I1 goto delve if $I2 goto delve goto mloop delve: $I3 = level inc $I3 if $I3 > MaxDepth goto mloop display_container($P1, $I3) goto mloop endloop: .return() .end .sub indent .param int lev loop: if lev <= 0 goto finis print Indent dec lev goto loop finis: .return() .end ############################################## [EMAIL PROTECTED] work]$ parrot -G classinfo.pir Class name: String namespace: NameSpace Segmentation fault [EMAIL PROTECTED] work]$ gdb ../parrot/parrot GNU gdb Red Hat Linux (6.3.0.0-1.122rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) r classinfo.pir Class Starting program: /home/ccc/Parrot/parrot-0.6.1/parrot classinfo.pir Class Reading symbols from shared object read from target memory...done. Loaded system supplied DSO at 0x293000 [Thread debugging using libthread_db enabled] [New Thread -1208149824 (LWP 5015)] name: String namespace: NameSpace Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1208149824 (LWP 5015)] 0x00552b57 in Parrot_Key_get_string (interp=0x875d008, pmc=0x893ed68) at ./src/pmc/key.c:160 160 Parrot_Key_get_string(PARROT_INTERP, PMC *pmc) (gdb) bt 6 #0 0x00552b57 in Parrot_Key_get_string (interp=0x875d008, pmc=0x893ed68) at ./src/pmc/key.c:160 #1 0x0040d816 in key_string (interp=0x875d008, key=0x893ed68) at src/key.c:402 #2 0x00552b81 in Parrot_Key_get_string (interp=0x875d008, pmc=0x893ed68) at ./src/pmc/key.pmc:148 #3 0x0040d816 in key_string (interp=0x875d008, key=0x893ed68) at src/key.c:402 #4 0x00552b81 in Parrot_Key_get_string (interp=0x875d008, pmc=0x893ed68) at ./src/pmc/key.pmc:148 #5 0x0040d816 in key_string (interp=0x875d008, key=0x893ed68) at src/key.c:402 (More stack frames follow...) -- Clark Cooper