dr_tracedump.h File Reference

Binary trace dump format for the -tracedump_binary option. More...

Data Structures

struct  _tracedump_file_header_t
 
struct  _tracedump_trace_header_t
 
struct  _tracedump_stub_data
 

Macros

#define BB_ORIGIN_HEADER_SIZE   (sizeof(app_pc) + sizeof(int))
 
#define STUB_DATA_FIXED_SIZE   (offsetof(tracedump_stub_data_t, count))
 

Typedefs

typedef struct _tracedump_file_header_t tracedump_file_header_t
 
typedef struct _tracedump_trace_header_t tracedump_trace_header_t
 
typedef struct _tracedump_stub_data tracedump_stub_data_t
 

Detailed Description

Binary trace dump format for the -tracedump_binary option.

Macro Definition Documentation

◆ BB_ORIGIN_HEADER_SIZE

#define BB_ORIGIN_HEADER_SIZE   (sizeof(app_pc) + sizeof(int))

Size of tag + bb_code_size fields for each bb. tracedump_stub_data_t.stub_size will not exceed this value.

◆ STUB_DATA_FIXED_SIZE

#define STUB_DATA_FIXED_SIZE   (offsetof(tracedump_stub_data_t, count))

The last offset into tracedump_stub_data_t of always-present fields.

Typedef Documentation

◆ tracedump_file_header_t

   Binary trace dump format:
   the file starts with a tracedump_file_header_t
   then, for each trace:
     struct _tracedump_trace_header
     if num_bbs > 0 # tracedump_origins
       foreach bb:
           app_pc tag;
           int bb_code_size;
           byte code[bb_code_size];
     endif
     foreach exit:
       struct _tracedump_stub_data
       if linkcount_size > 0 # deprecated
         linkcount_type_t count; # sizeof == linkcount_size
       endif
       if separate from body
       (i.e., exit_stub < cache_start_pc || exit_stub >= cache_start_pc+code_size):
           byte stub_code[15]; # all separate stubs are 15
       endif
     endfor
     byte code[code_size];

◆ tracedump_stub_data_t

The format of a stub in a trace dump file.

◆ tracedump_trace_header_t

Header for an individual trace in a binary trace dump file.