yorick banner

Home

Manual

Packages

Global Index

Keywords

Quick Reference

Yorick Language Reference

Opening Non-PDB Files

Yorick expects binary files to be in PDB format, but it can be trained to recognize any file whose format can be described using its Contents Log file description language. The basic idea is that if you can figure out how to compute the names, data types, dimensions, and disk addresses of the data in the file, you can train Yorick to open the file; once open, all of Yorick's machinery to manipulate the data will grind away as usual.

The following functions can be used to teach Yorick about a non-PDB file; use help to get complete details:

_read, f, address, var
raw binary read
install_struct, f, struct_name, size, align, order, layout
define a primitive data type
add_variable, f, address, name, type, dimlist
add a variable
add_member, f, struct_name, offset, name, type, dimlist
build up a data structure
install_struct, f, struct_name
finish add_member struct
data_align, f, alignment
specify default data alignment
struct_align, f, alignment
specify default struct alignment
add_record, f, time, ncyc, address
declare record
add_next_file, f, filename
open new family member

To write a plain text description of any binary file, use:

dump_clog, f, clogname  write Contents Log for f