c2ph

c2ph, pstruct is a Perl module that can dump C structures as generated from cc -g -S stabs.
Download

c2ph Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Tom Christiansen
  • Publisher web site:
  • http://search.cpan.org/~nwclark/perl-5.8.8/pod/perltoot.pod

c2ph Tags


c2ph Description

c2ph, pstruct is a Perl module that can dump C structures as generated from cc -g -S stabs. c2ph, pstruct is a Perl module that can dump C structures as generated from cc -g -S stabs.SYNOPSIS c2ph OPTIONS Options: -w wide; short for: type_width=45 member_width=35 offset_width=8 -x hex; short for: offset_fmt=x offset_width=08 size_fmt=x size_width=04 -n do not generate perl code (default when invoked as pstruct) -p generate perl code (default when invoked as c2ph) -v generate perl code, with C decls as comments -i do NOT recompute sizes for intrinsic datatypes -a dump information on intrinsics also -t trace execution -d spew reams of debugging output -slist give comma-separated list a structures to dumpOnce upon a time, I wrote a program called pstruct. It was a perl program that tried to parse out C structures and display their member offsets for you. This was especially useful for people looking at binary dumps or poking around the kernel.Pstruct was not a pretty program. Neither was it particularly robust. The problem, you see, was that the C compiler was much better at parsing C than I could ever hope to be.So I got smart: I decided to be lazy and let the C compiler parse the C, which would spit out debugger stabs for me to read. These were much easier to parse. It's still not a pretty program, but at least it's more robust. Requirements: · Perl


c2ph Related Software