Ticket #258 (closed todo: fixed)

Opened 13 years ago

Last modified 13 years ago

pcb_disassemble options -[bho?], enable roundtrips

Reported by: rurban Owned by: rurban
Priority: normal Milestone:
Component: none Version:
Severity: medium Keywords:
Cc: Language:
Patch status: applied Platform:

Description

Attached patch changes the pcb_disassemble output to enable roundtrips, to print proper pasm on -b.

./pbc_disassemble -?
pbc_disassemble - dump or convert parrot bytecode (PBC) files
usage:
pbc_disassemble [-bh] [--bare|--header-only] [file.pbc]
pbc_disassemble -o converted.pasm file.pbc

  -b             ... bare .pasm without header and left column
  -h             ... dump Constant-table header only
  -o filename    ... output to filename

$ parrot -o i.pbc -a - <<EOF
print 0x10203040
end
EOF
$ ./pbc_disassemble -b i.pbc
=head1 Constant-table

PMC_CONST(0): 'ParrotInterpreter'
PMC_CONST(1): i.pasm
PMC_CONST(2):
PMC_CONST(3): (null)

=cut

# Current Source Filename 'i.pasm'
        print_ic 270544960
        end

In detail: =head1 Constant-table ... and =cut

embed.h needs a new enum Parrot_disassemble_options, because Parrot_disassemble() sits in embed.c

Reading from stdin is supported.

-o filename is ignored for now.

Attachments

tt258-pbc_disassemble-options.patch Download (8.0 KB) - added by rurban 13 years ago.

Change History

Changed 13 years ago by rurban

  • status changed from new to assigned

Changed 13 years ago by rurban

Changed 13 years ago by rurban

  • status changed from assigned to closed
  • resolution set to fixed

patch went in with 0.9.1, r36671

Note: See TracTickets for help on using tickets.