Ticket #284: rename-pdump.patch

File rename-pdump.patch, 23.5 KB (added by fperrad, 13 years ago)
  • config/gen/makefiles/root.in

     
    458458PARROT              = $(CUR_DIR)/@test_prog@$(EXE) 
    459459MINIPARROT          = $(CUR_DIR)/miniparrot$(EXE) 
    460460DIS                 = $(CUR_DIR)/pbc_disassemble$(EXE) 
    461 PDUMP               = $(CUR_DIR)/pdump$(EXE) 
     461PDUMP               = $(CUR_DIR)/pbc_dump$(EXE) 
    462462PINFO               = $(CUR_DIR)/pbc_info$(EXE) 
    463463PBCMERGE            = $(CUR_DIR)/pbc_merge$(EXE) 
    464464PDB                 = $(CUR_DIR)/parrot_debugger$(EXE) 
     
    468468# Installable executables 
    469469INSTALLABLEPARROT   = $(CUR_DIR)/installable_parrot$(EXE) 
    470470INSTALLABLEDIS      = $(CUR_DIR)/installable_pbc_disassemble$(EXE) 
    471 INSTALLABLEPDUMP    = $(CUR_DIR)/installable_pdump$(EXE) 
     471INSTALLABLEPDUMP    = $(CUR_DIR)/installable_pbc_dump$(EXE) 
    472472INSTALLABLEPINFO    = $(CUR_DIR)/installable_pbc_info$(EXE) 
    473473INSTALLABLEPBCMERGE = $(CUR_DIR)/installable_pbc_merge$(EXE) 
    474474INSTALLABLEPDB      = $(CUR_DIR)/installable_parrot_debugger$(EXE) 
     
    903903# Parrot Dump 
    904904# 
    905905 
    906 $(PDUMP) : $(SRC_DIR)/pdump$(O) $(SRC_DIR)/packdump$(O) $(LIBPARROT) 
     906$(PDUMP) : $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) $(LIBPARROT) 
    907907        $(LINK) @ld_out@$@ \ 
    908     $(SRC_DIR)/pdump$(O) \ 
     908    $(SRC_DIR)/pbc_dump$(O) \ 
    909909    $(SRC_DIR)/packdump$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) 
    910910#IF(win32):     if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 
    911911 
    912 $(SRC_DIR)/pdump$(O) : $(GEN_HEADERS) 
     912$(SRC_DIR)/pbc_dump$(O) : $(GEN_HEADERS) 
    913913 
    914 $(INSTALLABLEPDUMP) : $(SRC_DIR)/pdump$(O) $(SRC_DIR)/packdump$(O) $(LIBPARROT) 
     914$(INSTALLABLEPDUMP) : $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) $(LIBPARROT) 
    915915        $(LINK) @ld_out@$@ \ 
    916     $(SRC_DIR)/pdump$(O) \ 
     916    $(SRC_DIR)/pbc_dump$(O) \ 
    917917    $(SRC_DIR)/packdump$(O) \ 
    918918    @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) 
    919919#IF(win32):     if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 
     
    15971597    $(INSTALLABLEPDB) \ 
    15981598    pbc_to_exe.pir pbc_to_exe.pbc pbc_to_exe.c pbc_to_exe$(O) pbc_to_exe$(EXE) \ 
    15991599    $(IMCC_DIR)/main$(O) \ 
    1600     $(PDUMP) $(SRC_DIR)/pdump$(O) $(SRC_DIR)/packdump$(O) \ 
     1600    $(PDUMP) $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) \ 
    16011601    $(SRC_DIR)/pbc_info$(O) $(PINFO) \ 
    16021602    $(PDB) $(SRC_DIR)/parrot_debugger$(O) \ 
    16031603    $(PBCMERGE) $(SRC_DIR)/pbc_merge$(O) \ 
     
    16341634    $(INSTALLABLEPDB) \ 
    16351635    $(INSTALLABLECONFIG) \ 
    16361636    $(IMCC_DIR)/main$(O) \ 
    1637     $(PDUMP) $(SRC_DIR)/pdump$(O) $(SRC_DIR)/packdump$(O) \ 
     1637    $(PDUMP) $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) \ 
    16381638    $(SRC_DIR)/pbc_info$(O) $(PINFO) \ 
    16391639    $(PDB) $(SRC_DIR)/parrot_debugger$(O) \ 
    16401640    $(PBCMERGE) $(SRC_DIR)/pbc_merge$(O) \ 
  • docs/dev/fhs.pod

     
    5656 
    5757This is the primary directory of executable commands on the system. All 
    5858executables that are intended to be called directly by the user (i.e. 
    59 parrot, pdump, disassemble, parrot-debugger, pbc_info, pbg_merge, ...) 
     59parrot, parrot_debugger, pbc_disassemble, pbc_dump, pbc_info, pbg_merge, ...) 
    6060should go here. The current version number should be appended to the 
    6161binaries itself and a symlink needs to be created that points from the 
    6262binary with version number to the normal name of the file without a 
  • docs/parrotbyte.pod

     
    2525 
    2626The B<Wordsize> (or C<opcode_t> size) must be 4 (32-bit) or 8 (64 bit). The 
    2727bytecode loader is responsible for transforming the file into the VM native 
    28 wordsize on the fly. For performance, a utility F<pdump> is provided to convert 
    29 PBCs on disk if they cannot be recompiled. See F<src/pdump.c> for more 
     28wordsize on the fly. For performance, a utility F<pbc_dump> is provided to convert 
     29PBCs on disk if they cannot be recompiled. See F<src/pbc_dump.c> for more 
    3030information. 
    3131 
    3232B<Byteorder> currently supports two values: (0-Little Endian, 1-Big Endian) 
     
    333333=head1 SEE ALSO 
    334334 
    335335F<packfile.c>, F<packfile.h>, F<packout.c>, F<packdump.c>, F<pf/*.c>, and the 
    336 B<pdump> utility F<pdump.c>. 
     336B<pbc_dump> utility F<pbc_dump.c>. 
    337337 
    338338=head1 AUTHOR 
    339339 
  • MANIFEST

     
    11# ex: set ro: 
    22# $Id$ 
    33# 
    4 # generated by tools/dev/mk_manifest_and_skip.pl Sun Feb  1 22:48:40 2009 UT 
     4# generated by tools/dev/mk_manifest_and_skip.pl Sat Feb  7 12:51:06 2009 UT 
    55# 
    66# See tools/dev/install_files.pl for documentation on the 
    77# format of this file. 
     
    27962797src/packout.c                                               [] 
    27972798src/parrot_debugger.c                                       [] 
    27982799src/pbc_disassemble.c                                       [] 
     2800src/pbc_dump.c                                              [] 
    27992801src/pbc_info.c                                              [] 
    28002802src/pbc_merge.c                                             [] 
    2801 src/pdump.c                                                 [] 
    28022803src/pic.c                                                   [] 
    28032804src/pic_jit.c                                               [] 
    28042805src/pmc.c                                                   [] 
  • MANIFEST.generated

     
    6666installable_parrot_debugger.exe                   [main]bin 
    6767installable_pbc_disassemble                       [main]bin 
    6868installable_pbc_disassemble.exe                   [main]bin 
     69installable_pbc_dump                              [main]bin 
     70installable_pbc_dump.exe                          [main]bin 
    6971installable_pbc_info                              [main]bin 
    7072installable_pbc_info.exe                          [main]bin 
    7173installable_pbc_merge                             [main]bin 
    7274installable_pbc_merge.exe                         [main]bin 
    73 installable_pdump                                 [main]bin 
    74 installable_pdump.exe                             [main]bin 
    7575libparrot.dll                                     [main]bin 
    7676parrot.pc                                         [main]pkgconfig 
    7777pbc_disassemble                                   [main]bin 
    7878pbc_disassemble.exe                               [main]bin 
     79pbc_dump                                          [main]bin 
     80pbc_dump.exe                                      [main]bin 
    7981pbc_info                                          [main]bin 
    8082pbc_info.exe                                      [main]bin 
    8183pbc_merge                                         [main]bin 
     
    8486pbc_to_exe.exe                                    [main]bin 
    8587pdb                                               [main]bin 
    8688pdb.exe                                           [main]bin 
    87 pdump                                             [main]bin 
    88 pdump.exe                                         [main]bin 
    8989runtime/parrot/dynext/apl_group.bundle            [library] 
    9090runtime/parrot/dynext/apl_group.dll               [library] 
    9191runtime/parrot/dynext/apl_group.dylib             [library] 
  • parrot.spec

     
    115115%exclude %{_bindir}/perl6 
    116116%exclude %{_bindir}/parrot_debugger 
    117117%exclude %{_bindir}/pbc_* 
    118 %exclude %{_bindir}/pdump 
    119118%{_bindir}/* 
    120119%{_libdir}/parrot 
    121120%{_libdir}/libparrot.so.* 
     
    135134%{_bindir}/pbc_info 
    136135%{_bindir}/pbc_merge 
    137136%{_bindir}/pbc_to_exe 
    138 %{_bindir}/pdump 
     137%{_bindir}/pbc_dump 
    139138%{_includedir}/parrot 
    140139%{_libdir}/libparrot.so 
    141140%{_libdir}/libparrot.a 
  • ports/cygwin/README

     
    5757  /usr/bin/parrot.exe 
    5858  /usr/bin/parrot_config.exe 
    5959  /usr/bin/parrot_debugger.exe 
     60  /usr/bin/pbc_dump.exe 
    6061  /usr/bin/pbc_info.exe 
    6162  /usr/bin/pbc_merge.exe 
    6263  /usr/bin/pbc_to_exe.exe 
    63   /usr/bin/pdump.exe 
    6464  /usr/lib/parrot/config_lib.pasm 
    6565  /usr/lib/parrot/myconfig 
    6666  /usr/lib/parrot/parrotbug 
  • ports/debian/parrot.install

     
    11usr/bin/parrot 
    22usr/bin/pbc_disassemble 
     3usr/bin/pbc_dump 
    34usr/bin/pbc_info 
    45usr/bin/pbc_merge 
    5 usr/bin/pdump 
    66usr/lib/parrot/* 
  • ports/debian/rules

     
    2121 
    2222build: build-stamp 
    2323 
    24 build-stamp: configure-stamp 
     24build-stamp: configure-stamp 
    2525        dh_testdir 
    2626        $(MAKE) installable 
    2727        pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" docs/running.pod debian/parrot.1 
    2828        pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" parrot_config debian/parrot_config.1 
    29         pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pdump.c debian/pdump.1 
     29        pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_dump.c debian/pbc_dump.1 
    3030        pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_disassemble.c debian/pbc_disassemble.1 
    3131        pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/parrot_debugger.c debian/parrot-debugger.1 
    3232        pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_info.c debian/pbc_info.1 
     
    3636clean: 
    3737        dh_testdir 
    3838        dh_testroot 
    39         rm -f build-stamp configure-stamp debian/parrot.1 debian/parrot_config.1 debian/pdump.1 debian/pbc_disassemble.1 debian/parrot-debugger.1 debian/pbc_info.1 debian/pbc_merge.1 debian/libparrot$(SOVERSION).install src/nci_test.o src/main.o ext/Parrot-Embed/Makefile.PL languages/PIR/Makefile languages/perl5/Makefile languages/pynie/Makefile runtime/parrot/include/signal.pasm test.c test.ldo 
     39        rm -f build-stamp configure-stamp debian/parrot.1 debian/parrot_config.1 debian/pbc_dump.1 debian/pbc_disassemble.1 debian/parrot-debugger.1 debian/pbc_info.1 debian/pbc_merge.1 debian/libparrot$(SOVERSION).install src/nci_test.o src/main.o ext/Parrot-Embed/Makefile.PL languages/PIR/Makefile languages/perl5/Makefile languages/pynie/Makefile runtime/parrot/include/signal.pasm test.c test.ldo 
    4040        [ ! -f Makefile ] || $(MAKE) distclean 
    41         dh_clean 
     41        dh_clean 
    4242 
    4343debian/libparrot$(SOVERSION).install: debian/libparrot.install VERSION 
    4444        cp $< $@ 
     
    7777        dh_testdir -a 
    7878        dh_testroot -a 
    7979        dh_installchangelogs -a ChangeLog 
    80         dh_installman -pparrot debian/parrot.1 debian/pdump.1 debian/pbc_disassemble.1 debian/parrot-debugger.1 debian/pbc_info.1 debian/pbc_merge.1 
     80        dh_installman -pparrot debian/parrot.1 debian/pbc_dump.1 debian/pbc_disassemble.1 debian/parrot-debugger.1 debian/pbc_info.1 debian/pbc_merge.1 
    8181        dh_installdocs -a 
    8282        dh_strip -a 
    8383        dh_compress -a 
  • src/packdump.c

     
    1010 
    1111=head1 DESCRIPTION 
    1212 
    13 This is only used by the PBC dumper C<pdump>. 
     13This is only used by the PBC dumper C<pbc_dump>. 
    1414 
    1515=head2 Functions 
    1616 
     
    397397 
    398398=head1 SEE ALSO 
    399399 
    400 F<src/pdump.c>. 
     400F<src/pbc_dump.c>. 
    401401 
    402402=cut 
    403403 
  • src/pbc_dump.c

     
    44 
    55=head1 NAME 
    66 
    7 pdump - Dump or convert Parrot bytecode (PBC) files 
     7pbc_dump - Dump or convert Parrot bytecode (PBC) files 
    88 
    99=head1 SYNOPSIS 
    1010 
    11  pdump [-tdh] [--terse|--disassemble|--header-only] file.pbc 
     11 pbc_dump [-tdh] [--terse|--disassemble|--header-only] file.pbc 
    1212 
    13  pdump -o converted.pbc file.pbc 
     13 pbc_dump -o converted.pbc file.pbc 
    1414 
    1515=head1 DESCRIPTION 
    1616 
     
    173173 
    174174static void help(void) 
    175175{ 
    176     printf("pdump - dump or convert parrot bytecode (PBC) files\n"); 
     176    printf("pbc_dump - dump or convert parrot bytecode (PBC) files\n"); 
    177177    printf("usage:\n"); 
    178     printf("pdump [-tdh] [--terse|--disassemble|--header-only] file.pbc\n"); 
    179     printf("pdump -o converted.pbc file.pbc\n\n"); 
     178    printf("pbc_dump [-tdh] [--terse|--disassemble|--header-only] file.pbc\n"); 
     179    printf("pbc_dump -o converted.pbc file.pbc\n\n"); 
    180180    printf("\t-d ... disassemble bytecode segments\n"); 
    181181    printf("\t-h ... dump header only\n"); 
    182182    printf("\t-t ... terse output\n"); 
  • src/pdump.c

     
    1 /* 
    2 Copyright (C) 2001-2003, The Perl Foundation. 
    3 $Id$ 
    4  
    5 =head1 NAME 
    6  
    7 pdump - Dump or convert Parrot bytecode (PBC) files 
    8  
    9 =head1 SYNOPSIS 
    10  
    11  pdump [-tdh] [--terse|--disassemble|--header-only] file.pbc 
    12  
    13  pdump -o converted.pbc file.pbc 
    14  
    15 =head1 DESCRIPTION 
    16  
    17 A program to dump pack files to human readable form. 
    18  
    19 =head2 Command-Line Options 
    20  
    21 =over 4 
    22  
    23 =item C<-d> 
    24  
    25 Disassemble bytecode segments. 
    26  
    27 =item C<-h> 
    28  
    29 Dump the bytecode header only. 
    30  
    31 =item C<-t> 
    32  
    33 Terse output. 
    34  
    35 =item C<-o converted.pbc> 
    36  
    37 Repacks a PBC file into the platform's native binary format for better 
    38 efficiency on reading non-native PBCs. 
    39  
    40 =back 
    41  
    42 =head2 Functions 
    43  
    44 =over 4 
    45  
    46 =cut 
    47  
    48 */ 
    49  
    50 #include "parrot/parrot.h" 
    51 #include "parrot/embed.h" 
    52 #include "parrot/oplib/ops.h" 
    53  
    54 /* 
    55  
    56 =item C<static void 
    57 const_dump(PARROT_INTERP, const PackFile_Segment *segp)> 
    58  
    59 Dump the constant table. 
    60  
    61 =cut 
    62  
    63 */ 
    64  
    65 static void 
    66 const_dump(PARROT_INTERP, const PackFile_Segment *segp) 
    67 { 
    68     Parrot_io_printf(interp, "%s => [\n", segp->name); 
    69     PackFile_ConstTable_dump(interp, (const PackFile_ConstTable *)segp); 
    70     Parrot_io_printf(interp, "],\n"); 
    71 } 
    72  
    73 /* 
    74  
    75 =item C<static void 
    76 fixup_dump(PARROT_INTERP, const PackFile_Segment *segp)> 
    77  
    78 Dump the fixup table. 
    79  
    80 =cut 
    81  
    82 */ 
    83  
    84 static void 
    85 fixup_dump(PARROT_INTERP, const PackFile_Segment *segp) 
    86 { 
    87     Parrot_io_printf(interp, "%s => [\n", segp->name); 
    88     PackFile_Fixup_dump(interp, (const PackFile_FixupTable *)segp); 
    89     Parrot_io_printf(interp, "],\n"); 
    90 } 
    91  
    92 /* 
    93  
    94 =item C<static void 
    95 disas_dump(PARROT_INTERP, const PackFile_Segment *self)> 
    96  
    97 Disassemble and dump. 
    98  
    99 =cut 
    100  
    101 */ 
    102  
    103 static void 
    104 disas_dump(PARROT_INTERP, const PackFile_Segment *self) 
    105 { 
    106     opcode_t *pc; 
    107     size_t i, n; 
    108     Parrot_io_printf(interp, "%s => [ # %d ops at offs 0x%x\n", 
    109             self->name, (int)self->size, (int)self->file_offset + 4); 
    110     pc = self->data; 
    111     while (pc < self->data + self->size) { 
    112         /* trace_op_dump(interp, self->pf->src, pc); */ 
    113         Parrot_io_printf(interp, " %04x:  ", (int) (pc - self->data)); 
    114         n = (size_t)interp->op_info_table[*pc].op_count; 
    115         for (i = 0; i < 6; i++) 
    116             if (i < n) 
    117                 Parrot_io_printf(interp, "%08lx ", (unsigned long) pc[i]); 
    118             else 
    119                 Parrot_io_printf(interp, "         "); 
    120         Parrot_io_printf(interp, "%s\n", 
    121                 interp->op_info_table[*pc].full_name); 
    122         ADD_OP_VAR_PART(interp, interp->code, pc, n); 
    123         pc += n; 
    124     } 
    125     Parrot_io_printf(interp, "]\n"); 
    126 } 
    127  
    128 /* 
    129  
    130 =item C<static void 
    131 PackFile_header_dump(PARROT_INTERP, PackFile *pf)> 
    132  
    133 Dump the header. 
    134  
    135 =cut 
    136  
    137 */ 
    138  
    139 static void 
    140 PackFile_header_dump(PARROT_INTERP, PackFile *pf) 
    141 { 
    142     Parrot_io_printf(interp, "HEADER => [\n"); 
    143     Parrot_io_printf(interp, "\twordsize  = %d", pf->header->wordsize); 
    144     Parrot_io_printf(interp, "\t(interpreter's wordsize/INTVAL = %d/%d)\n", 
    145                      sizeof (opcode_t), sizeof (INTVAL)); 
    146     Parrot_io_printf(interp, "\tbyteorder = %d", pf->header->byteorder); 
    147     Parrot_io_printf(interp, "\t(interpreter's byteorder       = %d)\n", 
    148             PARROT_BIGENDIAN); 
    149     Parrot_io_printf(interp, "\tfloattype = %d", pf->header->floattype); 
    150     Parrot_io_printf(interp, "\t(interpreter's NUMVAL_SIZE     = %d)\n", NUMVAL_SIZE); 
    151     Parrot_io_printf(interp, "\tparrot-version %d.%d.%d, bytecode-version %d.%d\n", 
    152                      pf->header->major, pf->header->minor, pf->header->patch, 
    153                      pf->header->bc_major, pf->header->bc_minor); 
    154     Parrot_io_printf(interp, "\tUUID type = %d, UUID size = %d\n", 
    155                      pf->header->uuid_type, pf->header->uuid_size); 
    156     Parrot_io_printf(interp, "\t%s endianize, %s opcode, %s numval transform\n", 
    157             pf->need_endianize ? "**need**" : "no", 
    158             pf->need_wordsize ? "**need**" : "no", 
    159             pf->fetch_nv ? "**need**" : "no"); 
    160     Parrot_io_printf(interp, "\tdirformat = %d\n", pf->header->dir_format); 
    161     Parrot_io_printf(interp, "]\n"); 
    162 } 
    163  
    164 /* 
    165  
    166 =item C<static void help(void)> 
    167  
    168 Print out the user help info. 
    169  
    170 =cut 
    171  
    172 */ 
    173  
    174 static void help(void) 
    175 { 
    176     printf("pdump - dump or convert parrot bytecode (PBC) files\n"); 
    177     printf("usage:\n"); 
    178     printf("pdump [-tdh] [--terse|--disassemble|--header-only] file.pbc\n"); 
    179     printf("pdump -o converted.pbc file.pbc\n\n"); 
    180     printf("\t-d ... disassemble bytecode segments\n"); 
    181     printf("\t-h ... dump header only\n"); 
    182     printf("\t-t ... terse output\n"); 
    183     printf("\n\t-o converted.pbc repacks a PBC file into " 
    184            "the platform's native\n"); 
    185     printf("\t   binary format for better efficiency on reading " 
    186            "non native PBCs\n"); 
    187     exit(EXIT_SUCCESS); 
    188 } 
    189  
    190 static struct longopt_opt_decl options[] = { 
    191     { 'h', 'h', OPTION_optional_FLAG, { "--header-only" } }, 
    192     { '?', '?', OPTION_optional_FLAG, { "--help" } }, 
    193     { 't', 't', OPTION_optional_FLAG, { "--terse" } }, 
    194     { 'd', 'd', OPTION_optional_FLAG, { "--disassemble" } }, 
    195     { 'o', 'o', OPTION_required_FLAG, { "--output" } } 
    196 }; 
    197  
    198 /* 
    199  
    200 =item C<int 
    201 main(int argc, char **argv)> 
    202  
    203 The run loop. Process the command-line arguments and dump accordingly. 
    204  
    205 =cut 
    206  
    207 */ 
    208  
    209 int 
    210 main(int argc, const char **argv) 
    211 { 
    212     PackFile *pf; 
    213     Interp *interp; 
    214     int terse = 0; 
    215     int disas = 0; 
    216     int convert = 0; 
    217     int header = 0; 
    218     const char *file = NULL; 
    219     struct longopt_opt_info opt = LONGOPT_OPT_INFO_INIT; 
    220     int status; 
    221  
    222     if (argc < 2) { 
    223         help(); 
    224     } 
    225     interp = Parrot_new(NULL); 
    226     /* init and set top of stack */ 
    227     Parrot_init_stacktop(interp, &status); 
    228     while ((status = longopt_get(interp, 
    229                     argc, argv, options, &opt)) > 0) { 
    230         switch (opt.opt_id) { 
    231             case 'h': 
    232                 header = 1; 
    233                 break; 
    234             case 't': 
    235                 terse = 1; 
    236                 break; 
    237             case 'd': 
    238                 disas = 1; 
    239                 break; 
    240             case 'o': 
    241                 file = opt.opt_arg; 
    242                 convert = 1; 
    243                 break; 
    244             case '?': 
    245             default: 
    246                 help(); 
    247                 break; 
    248         } 
    249     } 
    250     if (status == -1) { 
    251         help(); 
    252     } 
    253     argc -= opt.opt_index; 
    254     argv += opt.opt_index; 
    255  
    256  
    257     pf = Parrot_readbc(interp, *argv); 
    258  
    259     if (!pf) { 
    260         printf("Can't read PBC\n"); 
    261         return 1; 
    262     } 
    263     Parrot_loadbc(interp, pf); 
    264     if (convert) { 
    265         size_t size; 
    266         opcode_t *pack; 
    267         FILE *fp; 
    268  
    269         size = PackFile_pack_size(interp, 
    270                 interp->code->base.pf) * sizeof (opcode_t); 
    271         pack = (opcode_t*) mem_sys_allocate(size); 
    272         if (!pack) { 
    273             printf("out of mem\n"); 
    274             exit(EXIT_FAILURE); 
    275         } 
    276         PackFile_pack(interp, interp->code->base.pf, pack); 
    277         if (STREQ(file, "-")) 
    278             fp = stdout; 
    279         else if ((fp = fopen(file, "wb")) == 0) { 
    280             printf("Couldn't open %s\n", file); 
    281             exit(EXIT_FAILURE); 
    282         } 
    283  
    284         if ((1 != fwrite(pack, size, 1, fp))) { 
    285             printf("Couldn't write %s\n", file); 
    286             exit(EXIT_FAILURE); 
    287         } 
    288         fclose(fp); 
    289         mem_sys_free(pack); 
    290         Parrot_exit(interp, 0); 
    291     } 
    292  
    293     PackFile_header_dump(interp, pf); 
    294     if (header) { 
    295         Parrot_exit(interp, 0); 
    296     } 
    297     /* install a dumper function */ 
    298     if (!terse) { 
    299         pf->PackFuncs[PF_CONST_SEG].dump = const_dump; 
    300         pf->PackFuncs[PF_FIXUP_SEG].dump = fixup_dump; 
    301     } 
    302     if (disas) 
    303         pf->PackFuncs[PF_BYTEC_SEG].dump = disas_dump; 
    304     /* do a directory dump, which dumps segs then */ 
    305     PackFile_Segment_dump(interp, &pf->directory.base); 
    306  
    307     Parrot_exit(interp, 0); 
    308 } 
    309  
    310 /* 
    311  
    312 =back 
    313  
    314 =head1 SEE ALSO 
    315  
    316 F<src/packdump.c>. 
    317  
    318 =cut 
    319  
    320 */ 
    321  
    322 /* 
    323  * Local variables: 
    324  *   c-file-style: "parrot" 
    325  * End: 
    326  * vim: expandtab shiftwidth=4: 
    327  */ 
  • t/native_pbc/integer.t

     
    3838 
    3939The output of 
    4040 
    41   $ pdump -h i.pbc 
     41  $ pbc_dump -h i.pbc 
    4242 
    4343should be included for reference. 
    4444 
    4545On test failures please add the output of 
    4646 
    47   $ ./pdump -h t/native_pbc/number_${N}.pbc 
     47  $ ./pbc_dump -h t/native_pbc/number_${N}.pbc 
    4848 
    4949into your report. We need your wordsize/floattype/endianess. 
    5050 
  • t/native_pbc/number.t

     
    3232# please add it: 
    3333 
    3434  $ ./parrot -o n.pbc t/op/number_1.pasm 
    35   $ make pdump 
    36   $ ./pdump -h n.pbc 
     35  $ make pbc_dump 
     36  $ ./pbc_dump -h n.pbc 
    3737  $ mv n.pbc t/native_pbc/number_$(N).pbc 
    3838 
    3939# then 
    4040# - increase number of tests 
    41 # - include the pdump header info for reference 
     41# - include the pbc_dump header info for reference 
    4242# - put the file into MANIFEST 
    4343# - add the file as binary (svn add) and commit it 
    4444# thanks -leo 
    4545 
    4646On test failures please add the output of 
    4747 
    48   $ ./pdump -h t/native_pbc/number_${N}.pbc 
     48  $ ./pbc_dump -h t/native_pbc/number_${N}.pbc 
    4949 
    5050into your report. We need your wordsize/floattype/endianess. 
    5151 
  • tools/dev/mk_native_pbc

     
    2525./parrot -o n.pbc t/op/number_1.pasm 
    2626mv n.pbc t/native_pbc/number_1.pbc 
    2727 
    28 make pdump 
    29 ./pdump -h t/native_pbc/number_1.pbc 
    30 ./pdump -h t/native_pbc/number_2.pbc 
     28make pbc_dump 
     29./pbc_dump -h t/native_pbc/number_1.pbc 
     30./pbc_dump -h t/native_pbc/number_2.pbc 
    3131 
    3232perl t/harness t/native_pbc/number.t 
  • tools/dev/pbc_header.pl

     
    3030 
    3131=head1 SEE ALSO 
    3232 
    33 The C<pdump> utility does a much more thorough job of showing bytecode file 
     33The C<pbc_dump> utility does a much more thorough job of showing bytecode file 
    3434headers. 
    3535 
    3636=cut 
  • tools/install/smoke.pl

     
    8080$out = `$exe`; 
    8181ok($out =~ /^pbc_merge/, "check pbc_merge"); 
    8282 
    83 $exe = catfile($bindir, 'pdump'); 
     83$exe = catfile($bindir, 'pbc_dump'); 
    8484$out = `$exe`; 
    85 ok($out =~ /^pdump/, "check pdump"); 
     85ok($out =~ /^pbc_dump/, "check pbc_dump"); 
    8686 
    8787ok(system("$parrot -V") == 0, "display parrot version"); 
    8888