Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pctolf(1) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pctolf(1)

NAME

pctolf − translate hex pc values into source line number and file name

SYNOPSIS

pctolf [−e pat] [−f file] [−o file] [−p prog [−H] [files...]

DESCRIPTION

The pctolf command will filter files which contain hexadecimal numbers that correspond to program counter addresses in some program. It reads the debug table information from the program and adds source file name and line number information following each pc address. 

pctolf determines which hex numbers to treat as addresses by looking for patterns specified with the −e and −f options. These patterns can be arbitrary regular expressions, but each one should contain the pattern \([0-9a-fA-F]∗\). The \( \) escaped parenthesis pair marks the position of the hex number that represents a program address. There should be exactly one \( \) pair in each pattern. 

If no pattern is specified, the default pattern 0[xX]\([0-9a-fA-F]∗\) is used. This pattern matches any hex number that starts with the strings 0x or 0X. 

Normally, pctolf reads from standard input, but a list of files may be given on the command line following the options and it will read those instead. 

pctolf recognizes the following options:

−e pattern
Specify a regular expression pattern to match an address. This option may appear any number of times.

−f file
Specify a file containing a list of patterns. Each line in the file is treated as a separate pattern. This option may appear multiple times and be freely mixed with the −e option. 

−o file
pctolf normally writes to standard output. If the −o option is used to specify a file, it writes to that file instead. 

−p program
pctolf normally reads the debug information from the program file a.out in the current directory. The −p option is used to name a different file to get the debug information from. 

−H This option causes pctolf to print a summary help message and exit. 

BUGS

If patterns that do not actually match hex numbers are specified, the results are indeterminate. 

CX/UX User’s Reference Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026