1PT_INSN_GET_IMAGE(3) PT_INSN_GET_IMAGE(3)
2
3
4
6 pt_insn_get_image, pt_insn_set_image, pt_blk_get_image, pt_blk_set_im‐
7 age - get/set an Intel(R) Processor Trace instruction flow or block de‐
8 coder’s traced memory image descriptor
9
11 #include <intel-pt.h>
12 struct pt_image *pt_insn_get_image(struct pt_insn_decoder *decoder);
13 struct pt_image *pt_blk_get_image(struct pt_block_decoder *decoder);
14 int pt_insn_set_image(struct pt_insn_decoder *decoder,
15 struct pt_image *image);
16 int pt_blk_set_image(struct pt_block_decoder *decoder,
17 struct pt_image *image);
18
19 Link with -lipt.
20
22 pt_insn_get_image() and pt_blk_get_image() return the traced memory im‐
23 age descriptor that decoder uses for reading instruction memory. See
24 pt_image_alloc(3). Every decoder comes with a default pt_image* object
25 that is initially empty and that will automatically be destroyed when
26 the decoder is freed.
27
28 pt_insn_set_image() and pt_blk_set_image() set the traced memory image
29 descriptor that decoder uses for reading instruction memory. If the
30 image argument is NULL, sets decoder’s image to be its default image.
31 The user is responsible for freeing the pt_image object that image
32 points to when it is no longer needed.
33
35 pt_insn_get_image() and pt_blk_get_image() return a pointer to de‐
36 coder’s pt_image object. The returned pointer is NULL if the decoder
37 argument is NULL.
38
39 pt_insn_set_image() and pt_blk_set_image() return zero on success or a
40 negative pt_error_code enumeration constant in case of an error.
41
43 pte_invalid
44 The decoder argument is NULL.
45
47 One pt_image object must not be shared between multiple decoders. Use
48 pt_image_copy(3) to copy a common image.
49
51 pt_insn_alloc_decoder(3), pt_insn_free_decoder(3), pt_insn_next(3),
52 pt_blk_alloc_decoder(3), pt_blk_free_decoder(3), pt_blk_next(3)
53
54
55
56 PT_INSN_GET_IMAGE(3)