Ticket #440: pbc_info_remove.diff
| File pbc_info_remove.diff, 19.6 KB (added by jkeenan, 4 years ago) |
|---|
-
DEPRECATED.pod
264 264 265 265 * = item may be kept but reimplemented. 266 266 267 =item functions in src/pbc_info.c [eligible in 1.5] 268 269 L<https://trac.parrot.org/parrot/ticket/440> 270 To be moved to F<examples/c/pbc_info.c>. Will no longer be built by F<make>. 271 267 272 =back 268 273 269 274 =head1 Compiler tools -
src/pbc_info.c
1 /*2 Copyright (C) 2001-2003, Parrot Foundation.3 $Id$4 5 =head1 NAME6 7 pbc_info - PackFile demo8 9 =head1 SYNOPSIS10 11 pbc_info file.pbc12 13 =head1 DESCRIPTION14 15 Sample program for dumping PackFile segment names by iterating16 over the main directory.17 18 =head2 Functions19 20 =over 421 22 =cut23 24 */25 26 #include "parrot/parrot.h"27 #include "parrot/embed.h"28 29 /*30 31 =item C<static INTVAL iter(PARROT_INTERP, PackFile_Segment *seg, void32 *user_data)>33 34 This function is passed the callback to PackFile_map_segments() to print out35 the name of each segment in the directory.36 37 =cut38 39 */40 41 static INTVAL42 iter(PARROT_INTERP, PackFile_Segment *seg, void *user_data)43 {44 long ident = (long)user_data;45 int length = ident;46 printf("%*.0s%s\n", length, "", seg->name);47 if (seg->type == PF_DIR_SEG)48 PackFile_map_segments(interp, (PackFile_Directory*)seg,49 iter, (void*)(ident+2));50 return 0;51 }52 53 /*54 55 =item C<int main(int argc, char *argv[])>56 57 Reads the PBC from argv[1], adds a few extra sections, and then iterates over58 the directory using PackFile_map_segments() and iter().59 60 =cut61 62 */63 64 int65 main(SHIM(int argc), char *argv[])66 {67 PackFile *pf;68 Interp *interp;69 PackFile_Segment *seg;70 71 interp = Parrot_new(NULL);72 73 pf = Parrot_pbc_read(interp, argv[1], PFOPT_UTILS);74 75 /*76 * add some more segments77 */78 seg = PackFile_Segment_new_seg(interp,79 &pf->directory, PF_DIR_SEG, "dir2", 1);80 seg = PackFile_Segment_new_seg(interp,81 (PackFile_Directory*)seg, PF_BYTEC_SEG, "code", 1);82 seg = PackFile_Segment_new_seg(interp,83 &pf->directory, PF_DIR_SEG, "dir3", 1);84 85 /*86 * show these87 */88 printf("%s\n", pf->directory.base.name);89 PackFile_map_segments(interp, &pf->directory, iter, (void*)2);90 91 Parrot_exit(interp, 0);92 }93 94 /*95 96 =back97 98 =head1 SEE ALSO99 100 F<src/packfile.c>, F<include/parrot/packfile.h>.101 102 =cut103 104 */105 106 107 /*108 * Local variables:109 * c-file-style: "parrot"110 * End:111 * vim: expandtab shiftwidth=4:112 */113 -
docs/dev/fhs.pod
55 55 =head3 /usr/bin 56 56 57 57 This is the primary directory of executable commands on the system. All 58 executables that are intended to be called directly by the user (i.e. 59 parrot , parrot_debugger, pbc_disassemble, pbc_dump, pbc_info, pbg_merge, ...)60 should go here. The current version number should be appended to the 61 binaries itself and a symlink needs to be created that points from the 62 binary with version number to the normal name of the file without a 63 version. That makes installing more thanone version possible.58 executables that are intended to be called directly by the user (i.e. parrot, 59 parrot_debugger, pbc_disassemble, pbc_dump, pbg_merge, ...) should go here. 60 The current version number should be appended to the binaries itself and a 61 symlink needs to be created that points from the binary with version number to 62 the normal name of the file without a version. That makes installing more than 63 one version possible. 64 64 65 65 Executables that are for internal use only are stored elsewhere. 66 66 -
tools/dev/pbc_header.pl
99 99 return; 100 100 } 101 101 102 sub pbc_info {103 for my $f (@ARGV) {104 open my $F, "<", "$f" or die "Can't open $f: $!";105 binmode $F;106 print "$f\n";107 108 show_pbc_file_info($F);109 }110 111 return;112 }113 114 102 my @pbc_header_type_names; 115 103 BEGIN { 116 104 @pbc_header_type_names = qw( directory default fixup constant -
MANIFEST
1 1 # ex: set ro: 2 2 # $Id$ 3 3 # 4 # generated by tools/dev/mk_manifest_and_skip.pl Sun May 24 16:30:09 2009 UT4 # generated by tools/dev/mk_manifest_and_skip.pl Tue May 26 23:30:19 2009 UT 5 5 # 6 6 # See tools/dev/install_files.pl for documentation on the 7 7 # format of this file. … … 631 631 examples/benchmarks/vpm.py [examples] 632 632 examples/benchmarks/vpm.rb [examples] 633 633 examples/c/nanoparrot.c [examples] 634 examples/c/pbc_info.c [examples] 634 635 examples/c/test_main.c [examples] 635 636 examples/compilers/Makefile [examples] 636 637 examples/compilers/japhc.c [examples] … … 1361 1362 src/parrot_debugger.c [] 1362 1363 src/pbc_disassemble.c [] 1363 1364 src/pbc_dump.c [] 1364 src/pbc_info.c []1365 1365 src/pbc_merge.c [] 1366 1366 src/pic.c [] 1367 1367 src/pic_jit.c [] … … 2026 2026 t/tools/install/testlib/parrot.pc [test] 2027 2027 t/tools/install/testlib/phony [test] 2028 2028 t/tools/install/testlib/phony.exe [test] 2029 t/tools/install/testlib/runtime/parrot/include/sockets.pasm [test] 2029 2030 t/tools/install/testlib/runtime/parrot/library/TGE.pbc [test] 2030 2031 t/tools/install/testlib/src/ops/ops.num [test] 2031 2032 t/tools/install/testlib/src/pmc/pmc_object.h [test] -
ports/suse/parrot.spec.suse
134 134 %{_bindir}/parrot_config 135 135 %{_bindir}/parrot_debugger 136 136 %{_bindir}/pbc_disassemble 137 %{_bindir}/pbc_info138 137 %{_bindir}/pbc_merge 139 138 %{_bindir}/pbc_to_exe 140 139 %{_bindir}/pbc_dump -
ports/fedora/parrot.spec.fedora
235 235 %{_bindir}/parrot_config 236 236 %{_bindir}/parrot_debugger 237 237 %{_bindir}/pbc_disassemble 238 %{_bindir}/pbc_info239 238 %{_bindir}/pbc_merge 240 239 %{_bindir}/pbc_to_exe 241 240 %{_bindir}/pbc_dump -
ports/mandriva/parrot.spec.mandriva
158 158 %{_bindir}/parrot_config 159 159 %{_bindir}/parrot_debugger 160 160 %{_bindir}/pbc_disassemble 161 %{_bindir}/pbc_info162 161 %{_bindir}/pbc_merge 163 162 %{_bindir}/pbc_to_exe 164 163 %{_bindir}/pbc_dump -
ports/debian/rules
44 44 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_dump.c debian/pbc_dump.1 45 45 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_disassemble.c debian/pbc_disassemble.1 46 46 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/parrot_debugger.c debian/parrot_debugger.1 47 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_info.c debian/pbc_info.148 47 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_merge.c debian/pbc_merge.1 49 48 touch build-stamp 50 49 51 50 clean: debian-control-stamp 52 51 dh_testdir 53 52 dh_testroot 54 rm -f build-stamp configure-stamp debian-control-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/main.o installable_pbc_to_exe ext/Parrot-Embed/Makefile.PL test.c test.ldo53 rm -f build-stamp configure-stamp debian-control-stamp debian/parrot.1 debian/parrot_config.1 debian/pbc_dump.1 debian/pbc_disassemble.1 debian/parrot-debugger.1 debian/pbc_merge.1 debian/libparrot$(SOVERSION).install src/main.o installable_pbc_to_exe ext/Parrot-Embed/Makefile.PL test.c test.ldo 55 54 [ ! -f Makefile ] || $(MAKE) distclean 56 55 dh_clean 57 56 … … 89 88 dh_testroot -a 90 89 dh_installchangelogs -a ChangeLog 91 90 dh_installman -pparrot-minimal debian/parrot.1 92 dh_installman -pparrot-devel debian/parrot_debugger.1 debian/pbc_disassemble.1 debian/pbc_dump.1 debian/pbc_ info.1 debian/pbc_merge.1 debian/parrot_config.191 dh_installman -pparrot-devel debian/parrot_debugger.1 debian/pbc_disassemble.1 debian/pbc_dump.1 debian/pbc_merge.1 debian/parrot_config.1 93 92 dh_installdocs -a 94 93 dh_strip -a 95 94 dh_compress -a -
ports/debian/parrot-devel.install.in
1 1 usr/bin/parrot_debugger 2 2 usr/bin/pbc_disassemble 3 3 usr/bin/pbc_dump 4 usr/bin/pbc_info5 4 usr/bin/pbc_merge 6 5 usr/bin/parrot_config 7 6 usr/lib/parrot/@VERSION@/tools/* -
ports/macports/Portfile
55 55 56 56 set executables { 57 57 parrot parrot_config parrot_debugger 58 pbc_disassemble pbc_ info pbc_merge pbc_to_exe pbc_dump58 pbc_disassemble pbc_merge pbc_to_exe pbc_dump 59 59 } 60 60 61 61 foreach exe $executables { -
MANIFEST.SKIP
1 1 # ex: set ro: 2 2 # $Id$ 3 # generated by tools/dev/mk_manifest_and_skip.pl Fri May 15 17:05:402009 UT3 # generated by tools/dev/mk_manifest_and_skip.pl Wed May 27 02:14:55 2009 UT 4 4 # 5 5 # This file should contain a transcript of the svn:ignore properties 6 6 # of the directories in the Parrot subversion repository. (Needed for -
include/parrot/packfile.h
55 55 /* 56 56 ** Parrot_pbc_read() options: 57 57 ** parrot, pbc_merge, parrot_debugger use 0 58 ** pbc_dump, pbc_disassemble , pbc_infouse 1 to skip the version check58 ** pbc_dump, pbc_disassemble use 1 to skip the version check 59 59 ** pbc_dump -h requires 2 60 60 ** The rest is for TRACE_PACKFILE debugging with switch -D in pbc_dump 61 61 */ -
t/codingstd/c_function_docs.t
134 134 src/jit/ppc/exec_dep.c 135 135 src/nci_test.c 136 136 src/pbc_dump.c 137 src/pbc_info.c138 137 src/pic.c 139 138 src/pic_jit.c 140 139 src/string/charset/ascii.c -
MANIFEST.generated
57 57 installable_pbc_disassemble [main]bin 58 58 installable_pbc_dump.exe [main]bin 59 59 installable_pbc_dump [main]bin 60 installable_pbc_info.exe [main]bin61 installable_pbc_info [main]bin62 60 installable_pbc_merge.exe [main]bin 63 61 installable_pbc_merge [main]bin 64 62 installable_pbc_to_exe.exe [main]bin -
config/gen/makefiles/root.in
483 483 MINIPARROT := $(CUR_DIR)/miniparrot$(EXE) 484 484 DIS := $(CUR_DIR)/pbc_disassemble$(EXE) 485 485 PDUMP := $(CUR_DIR)/pbc_dump$(EXE) 486 PINFO := $(CUR_DIR)/pbc_info$(EXE)487 486 PBCMERGE := $(CUR_DIR)/pbc_merge$(EXE) 488 487 PDB := $(CUR_DIR)/parrot_debugger$(EXE) 489 488 PBC_TO_EXE := $(CUR_DIR)/pbc_to_exe$(EXE) … … 494 493 INSTALLABLEPARROT := $(CUR_DIR)/installable_parrot$(EXE) 495 494 INSTALLABLEDIS := $(CUR_DIR)/installable_pbc_disassemble$(EXE) 496 495 INSTALLABLEPDUMP := $(CUR_DIR)/installable_pbc_dump$(EXE) 497 INSTALLABLEPINFO := $(CUR_DIR)/installable_pbc_info$(EXE)498 496 INSTALLABLEPBCMERGE := $(CUR_DIR)/installable_pbc_merge$(EXE) 499 497 INSTALLABLEPBCTOEXE := $(CUR_DIR)/installable_pbc_to_exe$(EXE) 500 498 INSTALLABLEPDB := $(CUR_DIR)/installable_parrot_debugger$(EXE) … … 585 583 $(PBCMERGE) \ 586 584 $(PDB) \ 587 585 $(PDUMP) \ 588 $(PINFO) \589 586 590 587 $(GEN_LIBRARY) : $(PARROT) 591 588 … … 655 652 @echo " world: 'all' and 'parrot_utils'." 656 653 @echo " installable: same as 'world', but targets for installation" 657 654 @echo "" 658 @echo " parrot_utils: $(PDUMP), $(DIS), $(P INFO), $(PDB), $(PBCMERGE) and $(PBC_TO_EXE) $(PARROT_CONFIG)"655 @echo " parrot_utils: $(PDUMP), $(DIS), $(PDB), $(PBCMERGE) and $(PBC_TO_EXE) $(PARROT_CONFIG)" 659 656 @echo " $(PDUMP):" 660 657 @echo " Parrot Dumper" 661 658 @echo " $(DIS):" 662 659 @echo " Parrot Disassembler" 663 @echo " $(PINFO):"664 @echo " Information about Parrot Byte Code"665 660 @echo " $(PDB):" 666 661 @echo " Parrot Debugger" 667 662 @echo " $(PBCMERGE):" … … 759 754 760 755 world : all parrot_utils 761 756 762 parrot_utils : $(PDUMP) $(DIS) $(P INFO) $(PDB) $(PBCMERGE) $(PBC_TO_EXE) $(PARROT_CONFIG)757 parrot_utils : $(PDUMP) $(DIS) $(PDB) $(PBCMERGE) $(PBC_TO_EXE) $(PARROT_CONFIG) 763 758 764 installable: all $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) $(INSTALLABLEP INFO) $(INSTALLABLEPDB) $(INSTALLABLEPBCMERGE) $(INSTALLABLEPBCTOEXE) $(INSTALLABLECONFIG)759 installable: all $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) $(INSTALLABLEPDB) $(INSTALLABLEPBCMERGE) $(INSTALLABLEPBCTOEXE) $(INSTALLABLECONFIG) 765 760 766 761 767 762 flags_dummy : … … 958 953 #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 959 954 960 955 961 # pbc_info962 $(PINFO) : $(SRC_DIR)/pbc_info$(O) $(LIBPARROT)963 $(LINK) @ld_out@$@ \964 $(SRC_DIR)/pbc_info$(O) \965 @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)966 #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1967 956 968 $(SRC_DIR)/pbc_info$(O) : $(INC_DIR)/parrot.h $(GEN_HEADERS)969 970 $(INSTALLABLEPINFO) : $(SRC_DIR)/pbc_info$(O) $(LIBPARROT)971 $(LINK) @ld_out@$@ \972 $(SRC_DIR)/pbc_info$(O) \973 @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)974 #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1975 976 957 # 977 958 # Parrot Bytecode File Merger 978 959 # … … 1667 1648 $(INSTALLABLEPARROT) \ 1668 1649 $(INSTALLABLEDIS) \ 1669 1650 $(INSTALLABLEPDUMP) \ 1670 $(INSTALLABLEPINFO) \1671 1651 $(INSTALLABLEPBCMERGE) \ 1672 1652 $(INSTALLABLEPBCTOEXE) \ 1673 1653 $(INSTALLABLEPDB) \ … … 1676 1656 parrot_config$(EXE) parrot_config.c parrot_config$(O) parrot_config.pbc \ 1677 1657 $(IMCC_DIR)/main$(O) \ 1678 1658 $(PDUMP) $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) \ 1679 $(SRC_DIR)/pbc_info$(O) $(PINFO) \1680 1659 $(PDB) $(SRC_DIR)/parrot_debugger$(O) \ 1681 1660 $(PBCMERGE) $(SRC_DIR)/pbc_merge$(O) \ 1682 1661 $(DIS) $(SRC_DIR)/pbc_disassemble$(O) … … 1707 1686 $(INSTALLABLEPARROT) \ 1708 1687 $(INSTALLABLEDIS) \ 1709 1688 $(INSTALLABLEPDUMP) \ 1710 $(INSTALLABLEPINFO) \1711 1689 $(INSTALLABLEPBCMERGE) \ 1712 1690 $(INSTALLABLEPDB) \ 1713 1691 $(INSTALLABLECONFIG) \ 1714 1692 $(IMCC_DIR)/main$(O) \ 1715 1693 $(PDUMP) $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) \ 1716 $(PINFO) $(SRC_DIR)/pbc_info$(O) \1717 1694 $(PDB) $(SRC_DIR)/parrot_debugger$(O) \ 1718 1695 $(PBCMERGE) $(SRC_DIR)/pbc_merge$(O) \ 1719 1696 $(DIS) $(SRC_DIR)/pbc_disassemble$(O) \ -
examples/c/pbc_info.c
1 /* 2 Copyright (C) 2001-2003, Parrot Foundation. 3 $Id$ 4 5 =head1 NAME 6 7 pbc_info - PackFile demo 8 9 =head1 SYNOPSIS 10 11 pbc_info file.pbc 12 13 =head1 DESCRIPTION 14 15 Sample program for dumping PackFile segment names by iterating 16 over the main directory. 17 18 =head2 Functions 19 20 =over 4 21 22 =cut 23 24 */ 25 26 #include "parrot/parrot.h" 27 #include "parrot/embed.h" 28 29 /* 30 31 =item C<static INTVAL iter(PARROT_INTERP, PackFile_Segment *seg, void *user_data)> 32 33 This function is passed the callback to PackFile_map_segments() to print out 34 the name of each segment in the directory. 35 36 =cut 37 38 */ 39 40 static INTVAL 41 iter(PARROT_INTERP, PackFile_Segment *seg, void *user_data) 42 { 43 long ident = (long)user_data; 44 int length = ident; 45 printf("%*.0s%s\n", length, "", seg->name); 46 if (seg->type == PF_DIR_SEG) 47 PackFile_map_segments(interp, (PackFile_Directory*)seg, 48 iter, (void*)(ident+2)); 49 return 0; 50 } 51 52 /* 53 54 =item C<int main(int argc, char *argv[])> 55 56 Reads the PBC from argv[1], adds a few extra sections, and then iterates over 57 the directory using PackFile_map_segments() and iter(). 58 59 =cut 60 61 */ 62 63 int 64 main(SHIM(int argc), char *argv[]) 65 { 66 PackFile *pf; 67 Interp *interp; 68 PackFile_Segment *seg; 69 70 interp = Parrot_new(NULL); 71 72 pf = Parrot_pbc_read(interp, argv[1], PFOPT_UTILS); 73 74 /* 75 * add some more segments 76 */ 77 seg = PackFile_Segment_new_seg(interp, 78 &pf->directory, PF_DIR_SEG, "dir2", 1); 79 seg = PackFile_Segment_new_seg(interp, 80 (PackFile_Directory*)seg, PF_BYTEC_SEG, "code", 1); 81 seg = PackFile_Segment_new_seg(interp, 82 &pf->directory, PF_DIR_SEG, "dir3", 1); 83 84 /* 85 * show these 86 */ 87 printf("%s\n", pf->directory.base.name); 88 PackFile_map_segments(interp, &pf->directory, iter, (void*)2); 89 90 Parrot_exit(interp, 0); 91 } 92 93 /* 94 95 =back 96 97 =head1 SEE ALSO 98 99 F<src/packfile.c>, F<include/parrot/packfile.h>. 100 101 =cut 102 103 */ 104 105 106 /* 107 * Local variables: 108 * c-file-style: "parrot" 109 * End: 110 * vim: expandtab shiftwidth=4: 111 */ 112
