mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
218c200f67
Consolidate capstone print functions, to reduce duplication. Amend call sites to use a file pointer for output, which is consistent with most perf tools print functions. Add print_opts with an option to print also the hex value of a resolved symbol+offset. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/20240401210925.209671-4-ak@linux.intel.com Signed-off-by: Andi Kleen <ak@linux.intel.com> [ Added missing inttypes.h include to use PRIx64 in util/print_insn.c ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
23 lines
687 B
C
23 lines
687 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef PERF_PRINT_INSN_H
|
|
#define PERF_PRINT_INSN_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdio.h>
|
|
|
|
struct perf_sample;
|
|
struct thread;
|
|
struct machine;
|
|
struct perf_insn;
|
|
|
|
#define PRINT_INSN_IMM_HEX (1<<0)
|
|
|
|
size_t sample__fprintf_insn_asm(struct perf_sample *sample, struct thread *thread,
|
|
struct machine *machine, FILE *fp, struct addr_location *al);
|
|
size_t sample__fprintf_insn_raw(struct perf_sample *sample, FILE *fp);
|
|
ssize_t fprintf_insn_asm(struct machine *machine, struct thread *thread, u8 cpumode,
|
|
bool is64bit, const uint8_t *code, size_t code_size,
|
|
uint64_t ip, int *lenp, int print_opts, FILE *fp);
|
|
|
|
#endif /* PERF_PRINT_INSN_H */
|