GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  B::DISASSEMBLER (3)

.ds Aq ’

NAME

B::Disassembler - Disassemble Perl bytecode

CONTENTS

SYNOPSIS



        use Disassembler qw(print_insn);
        my $fh = new FileHandle "<$ARGV[0]";
        disassemble_fh($fh, \&print_insn);



DESCRIPTION

disassemble_fh takes an filehandle with bytecode and a printer function. The printer function gets three arguments: insn, arg (optional) and the comment.

See lib/B/Disassembler.pm and scripts/disassemble.

disassemble_fh (filehandle, printer_coderef, [ verbose ])

disassemble_fh takes an filehandle with bytecode and a printer coderef.

Two default printer functions are provided:



  print_insn print_insn_bare



print_insn

Callback function for disassemble_fh, which gets three arguments from the disassembler. insn (a string), arg (a string or number or undef) and the comment (an optional string).

This supports the new behaviour in scripts/disassemble. It prints each insn and optional argument with some additional comments, which looks similar to B::Assembler with option -S (commented source).

print_insn_bare

This is the same as the old behaviour of scripts/disassemble. It prints each insn and optional argument without any comments. Line per line.

get_header

Returns the .plc header as array of



  ( magic, archname, blversion, ivsize, ptrsize,
    byteorder, longsize, archflag, perlversion )



in ARRAY context, or in SCALAR context the array from above as named hash.

<B>magicB> is always PLBC. PLJC is reserved for JIT’ted code also loaded via ByteLoader.

<B>archnameB> is the archname string and is in the ByteLoader up to 0.06 checked strictly. Starting with ByteLoader 0.06_05 platform compatibility is implemented by checking the $archflag, and doing byteorder swapping for same length longsize, and adjusting the ivsize and ptrsize.

<B>blversionB> is the ByteLoader version from the header as string. Up to ByteLoader 0.06 this version must have matched exactly, since 0.07 earlier ByteLoader versions are also accepted in the ByteLoader.

<B>ivsizeB> matches $Config{ivsize} of the assembling perl. A number, 4 or 8 only supported.

<B>ptrsizeB> matches $Config{ptrsize} of the assembling perl. A number, 4 or 8 only supported.

<B>longsizeB> is $Config{longsize} of the assembling perl. A number, 4 or 8. Only since blversion 0.06_03.

<B>byteorderB> is a string of 0x12345678 on big-endian or 0x78563412 (?) on little-endian machines. The beginning 0x is stripped for compatibility with intermediate ByteLoader versions, i.e. 5.6.1 to 5.8.0, Added with blversion 0.06_03, and also with blversion 0.04. See BcVersions

<B>archflagB> is a bitmask of opcode platform-dependencies. Currently used:
bit 1 for USE_ITHREADS
bit 2 for MULTIPLICITY Added with blversion 0.06_05.

<B>perlversionB> $] of the perl which produced this bytecode as string. Added with blversion 0.06_06.

AUTHORS

Malcolm Beattie MICB at cpan.org (retired), Reini Urban perl-compiler@googlegroups.com since 2008.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 B::DISASSEMBLER (3) 2014-08-21

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.