GDBserver

Classes | Enumerations | Functions | Variables
ax.h File Reference
`#include "regcache.h"`

Go to the source code of this file.

## Classes
struct | agent_expr
struct | eval_agent_expr_context
struct | emit_ops

## Enumerations
enum | eval_result_type { expr_eval_no_error, expr_eval_empty_expression, expr_eval_empty_stack, expr_eval_stack_overflow, expr_eval_stack_underflow, expr_eval_unhandled_opcode, expr_eval_unrecognized_opcode, expr_eval_divide_by_zero, expr_eval_invalid_goto }

## Functions
struct agent_expr * | gdb_parse_agent_expr (const char **actparm)
void | gdb_free_agent_expr (struct agent_expr *aexpr)
char * | gdb_unparse_agent_expr (struct agent_expr *aexpr)
void | emit_prologue (void)
void | emit_epilogue (void)
enum eval_result_type | compile_bytecodes (struct agent_expr *aexpr)
enum eval_result_type | gdb_eval_agent_expr (struct eval_agent_expr_context *ctx, struct agent_expr *aexpr, ULONGEST *rslt)

## Variables
CORE_ADDR | current_insn_ptr
int | emit_error

## Enumeration Type Documentation

## ◆ eval_result_type

enum eval_result_type

Enumerator
expr_eval_no_error |
expr_eval_empty_expression |
expr_eval_empty_stack |
expr_eval_stack_overflow |
expr_eval_stack_underflow |
expr_eval_unhandled_opcode |
expr_eval_unrecognized_opcode |
expr_eval_divide_by_zero |
expr_eval_invalid_goto |

Definition at line 34 of file ax.h.

## Function Documentation

## ◆ compile_bytecodes()

enum eval_result_type compile_bytecodes | ( | struct agent_expr * | aexpr | ) |

Definition at line 402 of file ax.c.

References bytecode_address::address, ax_debug, bytecode_address_table, agent_expr::bytes, current_insn_ptr, emit_add(), emit_bit_and(), emit_bit_not(), emit_bit_or(), emit_bit_xor(), emit_const(), emit_eq_goto(), emit_equal(), emit_error, emit_ext(), emit_ge_goto(), emit_goto(), emit_gt_goto(), emit_if_goto(), emit_int_call_1(), emit_le_goto(), emit_less_signed(), emit_less_unsigned(), emit_log_not(), emit_lsh(), emit_lt_goto(), emit_mul(), emit_ne_goto(), emit_pop(), emit_ref(), emit_reg(), emit_rsh_signed(), emit_rsh_unsigned(), emit_stack_adjust(), emit_stack_flush(), emit_sub(), emit_swap(), emit_void_call_2(), emit_zero_ext(), expr_eval_empty_expression, expr_eval_invalid_goto, expr_eval_no_error, expr_eval_unhandled_opcode, expr_eval_unrecognized_opcode, bytecode_address::from_offset, bytecode_address::from_size, gdb_agent_op_name(), get_get_tsv_func_addr(), get_set_tsv_func_addr(), bytecode_address::goto_pc, is_goto_target(), agent_expr::length, bytecode_address::next, paddress(), bytecode_address::pc, target_emit_ops, UNHANDLED, write_goto_address(), and XNEW.

Referenced by compile_tracepoint_condition().

## ◆ emit_epilogue()

void emit_epilogue | ( | void |  | ) |

Definition at line 162 of file ax.c.

References target_emit_ops.

Referenced by compile_tracepoint_condition().

## ◆ emit_prologue()

void emit_prologue | ( | void |  | ) |

Definition at line 156 of file ax.c.

References target_emit_ops.

Referenced by compile_tracepoint_condition().

## ◆ gdb_eval_agent_expr()

enum eval_result_type gdb_eval_agent_expr | ( | struct eval_agent_expr_context * | ctx,
|  | struct agent_expr * | aexpr,
|  | ULONGEST * | rslt
| ) |  |

Definition at line 928 of file ax.c.

References _, agent_get_trace_state_variable_value(), agent_mem_read(), agent_mem_read_string(), agent_set_trace_state_variable_value(), agent_tsv_read(), ax_debug, ax_printf(), agent_expr::bytes, collect_register(), error(), expr_eval_divide_by_zero, expr_eval_empty_expression, expr_eval_empty_stack, expr_eval_no_error, expr_eval_stack_overflow, expr_eval_stack_underflow, expr_eval_unhandled_opcode, expr_eval_unrecognized_opcode, gdb_agent_op_name(), internal_error(), agent_expr::length, bytecode_address::pc, phex_nz(), pulongest(), eval_agent_expr_context::regcache, register_size(), sp, STACK_MAX, and regcache::tdesc.

Referenced by condition_true_at_tracepoint(), do_action_at_tracepoint(), gdb_condition_true_at_breakpoint_z_type(), and run_breakpoint_commands_z_type().

## ◆ gdb_free_agent_expr()

void gdb_free_agent_expr | ( | struct agent_expr * | aexpr | ) |

Definition at line 116 of file ax.c.

References agent_expr::bytes, and free().

Referenced by clear_breakpoint_commands(), and clear_breakpoint_conditions().

## ◆ gdb_parse_agent_expr()

struct agent_expr* gdb_parse_agent_expr | ( | const char ** | actparm | ) |

Definition at line 98 of file ax.c.

References agent_expr::bytes, hex2bin(), agent_expr::length, unpack_varlen_hex(), xmalloc(), and XNEW.

Referenced by add_breakpoint_commands(), add_breakpoint_condition(), add_tracepoint_action(), and cmd_qtdp().

## ◆ gdb_unparse_agent_expr()

char* gdb_unparse_agent_expr | ( | struct agent_expr * | aexpr | ) |

Definition at line 130 of file ax.c.

References bin2hex(), agent_expr::bytes, agent_expr::length, and xmalloc().

Referenced by response_tracepoint().

## Variable Documentation

## ◆ current_insn_ptr

CORE_ADDR current_insn_ptr

Definition at line 141 of file ax.c.

Referenced by add_insns(), compile_bytecodes(), compile_tracepoint_condition(), emit_insns(), emit_ops_insns(), i386_emit_call(), i386_emit_const(), i386_emit_int_call_1(), i386_emit_reg(), i386_emit_stack_adjust(), i386_emit_void_call_2(), and s390_emit_litpool().

## ◆ emit_error

int emit_error

Definition at line 143 of file ax.c.

Referenced by aarch64_emit_ref(), compile_bytecodes(), i386_emit_ext(), i386_emit_lsh(), i386_emit_mul(), i386_emit_rsh_signed(), i386_emit_rsh_unsigned(), i386_emit_zero_ext(), i386_write_goto_address(), ppc_emit_ext(), ppc_emit_stack_adjust(), ppc_emit_zero_ext(), ppc_write_goto_address(), s390_emit_mul(), s390_emit_ref(), and s390_write_goto_address().