XED
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
xed-print-info.h
Go to the documentation of this file.
1 /*BEGIN_LEGAL
2 Intel Open Source License
3 
4 Copyright (c) 2002-2014 Intel Corporation. All rights reserved.
5 
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are
8 met:
9 
10 Redistributions of source code must retain the above copyright notice,
11 this list of conditions and the following disclaimer. Redistributions
12 in binary form must reproduce the above copyright notice, this list of
13 conditions and the following disclaimer in the documentation and/or
14 other materials provided with the distribution. Neither the name of
15 the Intel Corporation nor the names of its contributors may be used to
16 endorse or promote products derived from this software without
17 specific prior written permission.
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR
23 ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 END_LEGAL */
31 
32 #if !defined(_XED_PRINT_INFO_H_)
33 # define _XED_PRINT_INFO_H_
34 
35 #include "xed-types.h"
36 #include "xed-decoded-inst.h"
37 #include "xed-disas.h" // callback function type
38 #include "xed-syntax-enum.h"
39 #include "xed-format-options.h"
40 
45 typedef struct {
46 
48  // REQUIRED FIELDS - users should set these
50 
53 
55  char* buf;
56 
58  int blen;
59 
61  // OPTIONAL FIELDS - user can set these
63 
67  xed_uint64_t runtime_address;
68 
72 
74  void* context;
75 
78 
83 
84 
86  // NONPUBLIC FIELDS - Users should not use these!
88 
91 
93  unsigned int operand_indx;
94 
96  unsigned int skip_operand;
97 
100 
102 
103 // This function initializes the #xed_print_info_t structure.
104 // You must still set the required fields of that structure.
107 
108 #endif
xed_disassembly_callback_fn_t disassembly_callback
disassembly_callback MUST be set to zero if not used! If zero, the default disassembly callback is us...
unsigned int skip_operand
internal, do not use
The main container for instructions.
unsigned int operand_indx
internal, do not use
xed_syntax_enum_t
xed_format_options_t format_options
XED_DLL_EXPORT void xed_init_print_info(xed_print_info_t *pi)
unsigned int xed_bool_t
Definition: xed-types.h:68
xed_syntax_enum_t syntax
default is Intel-syntax (dest on left)
int format_options_valid
1=indicated the format_options field is valid, 0=use default formating options from xed_format_set_op...
xed_reg_enum_t extra_index_operand
internal, do not use
Options for the disasembly formatting functions.
xed_reg_enum_t
Definition: xed-reg-enum.h:39
const xed_decoded_inst_t * p
the decoded instruction to print
char * buf
pointer to the output buffer
int(* xed_disassembly_callback_fn_t)(xed_uint64_t address, char *symbol_buffer, xed_uint32_t buffer_length, xed_uint64_t *offset, void *context)
A xed_disassembly_callback_fn_t takes an address, a pointer to a symbol buffer of buffer_length bytes...
Definition: xed-disas.h:58
xed_bool_t emitted
internal, do not use
void * context
passed to disassembly callback. Can be zero if not used.
xed_uint64_t runtime_address
program counter location.
int blen
length of the output buffer. (bytes) Must be > 25 to start.
#define XED_DLL_EXPORT
This contains the information used by the various disassembly printers.