diff options
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r-- | gdb/i386-tdep.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 5b4a5a3..f876675 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -3926,14 +3926,23 @@ i386_stap_parse_special_token (struct gdbarch *gdbarch, void i386_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { + static const char *const stap_integer_prefixes[] = { "$", NULL }; + static const char *const stap_register_prefixes[] = { "%", NULL }; + static const char *const stap_register_indirection_prefixes[] = { "(", + NULL }; + static const char *const stap_register_indirection_suffixes[] = { ")", + NULL }; + /* We typically use stabs-in-ELF with the SVR4 register numbering. */ set_gdbarch_stab_reg_to_regnum (gdbarch, i386_svr4_reg_to_regnum); /* Registering SystemTap handlers. */ - set_gdbarch_stap_integer_prefix (gdbarch, "$"); - set_gdbarch_stap_register_prefix (gdbarch, "%"); - set_gdbarch_stap_register_indirection_prefix (gdbarch, "("); - set_gdbarch_stap_register_indirection_suffix (gdbarch, ")"); + set_gdbarch_stap_integer_prefixes (gdbarch, stap_integer_prefixes); + set_gdbarch_stap_register_prefixes (gdbarch, stap_register_prefixes); + set_gdbarch_stap_register_indirection_prefixes (gdbarch, + stap_register_indirection_prefixes); + set_gdbarch_stap_register_indirection_suffixes (gdbarch, + stap_register_indirection_suffixes); set_gdbarch_stap_is_single_operand (gdbarch, i386_stap_is_single_operand); set_gdbarch_stap_parse_special_token (gdbarch, |