The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Devel::DTrace::DOF::Section::Strtab - a DOF ELF-style string table

SYNOPSIS

  my $index = 0;
  my $strtab = Devel::DTrace::DOF::Section::Strtab->new(0);
  $strtab->add('foo');
  $strtab->add('bar');
  my $length = $sec->generate();
  my $dof = $sec->dof();

DESCRIPTION

Implements an ELF-style string table as a DOF section. Strings can be added incrementally, but are not uniqued - there will be one instance of a string in the table for every invocation of add().

METHODS

new($index)

Constructor. Takes the index of the string table in the DOF, often 0.

add($string)

Adds a string to the table, returning its index in the string table (a byte offset from the start of the table) as required by other DOF sections.

SEE ALSO

Devel::DTrace::DOF::Section