*/
- int bits_big_endian;
int short_bit;
int int_bit;
int long_bit;
const char * stap_gdb_register_suffix;
gdbarch_stap_is_single_operand_ftype *stap_is_single_operand;
gdbarch_stap_parse_special_token_ftype *stap_parse_special_token;
+ gdbarch_stap_adjust_register_ftype *stap_adjust_register;
gdbarch_dtrace_parse_probe_argument_ftype *dtrace_parse_probe_argument;
gdbarch_dtrace_probe_is_enabled_ftype *dtrace_probe_is_enabled;
gdbarch_dtrace_enable_probe_ftype *dtrace_enable_probe;
char ** disassembler_options;
const disasm_options_and_args_t * valid_disassembler_options;
gdbarch_type_align_ftype *type_align;
+ gdbarch_get_pc_address_flags_ftype *get_pc_address_flags;
};
/* Create a new ``struct gdbarch'' based on information provided by
gdbarch->target_desc = info->target_desc;
/* Force the explicit initialization of these. */
- gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG);
gdbarch->short_bit = 2*TARGET_CHAR_BIT;
gdbarch->int_bit = 4*TARGET_CHAR_BIT;
gdbarch->long_bit = 4*TARGET_CHAR_BIT;
gdbarch->gnu_triplet_regexp = default_gnu_triplet_regexp;
gdbarch->addressable_memory_unit_size = default_addressable_memory_unit_size;
gdbarch->type_align = default_type_align;
+ gdbarch->get_pc_address_flags = default_get_pc_address_flags;
/* gdbarch_alloc() */
return gdbarch;
if (gdbarch->bfd_arch_info == NULL)
log.puts ("\n\tbfd_arch_info");
/* Check those that need to be defined for the given multi-arch level. */
- /* Skip verify of bits_big_endian, invalid_p == 0 */
/* Skip verify of short_bit, invalid_p == 0 */
/* Skip verify of int_bit, invalid_p == 0 */
/* Skip verify of long_bit, invalid_p == 0 */
/* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */
/* Skip verify of stap_is_single_operand, has predicate. */
/* Skip verify of stap_parse_special_token, has predicate. */
+ /* Skip verify of stap_adjust_register, has predicate. */
/* Skip verify of dtrace_parse_probe_argument, has predicate. */
/* Skip verify of dtrace_probe_is_enabled, has predicate. */
/* Skip verify of dtrace_enable_probe, has predicate. */
/* Skip verify of disassembler_options, invalid_p == 0 */
/* Skip verify of valid_disassembler_options, invalid_p == 0 */
/* Skip verify of type_align, invalid_p == 0 */
+ /* Skip verify of get_pc_address_flags, invalid_p == 0 */
if (!log.empty ())
internal_error (__FILE__, __LINE__,
_("verify_gdbarch: the following are invalid ...%s"),
fprintf_unfiltered (file,
"gdbarch_dump: bfd_arch_info = %s\n",
gdbarch_bfd_arch_info (gdbarch)->printable_name);
- fprintf_unfiltered (file,
- "gdbarch_dump: bits_big_endian = %s\n",
- plongest (gdbarch->bits_big_endian));
fprintf_unfiltered (file,
"gdbarch_dump: breakpoint_from_pc = <%s>\n",
host_address_to_string (gdbarch->breakpoint_from_pc));
fprintf_unfiltered (file,
"gdbarch_dump: get_longjmp_target = <%s>\n",
host_address_to_string (gdbarch->get_longjmp_target));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: get_pc_address_flags = <%s>\n",
+ host_address_to_string (gdbarch->get_pc_address_flags));
fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n",
gdbarch_get_siginfo_type_p (gdbarch));
fprintf_unfiltered (file,
"gdbarch_dump: stack_frame_destroyed_p = <%s>\n",
host_address_to_string (gdbarch->stack_frame_destroyed_p));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: gdbarch_stap_adjust_register_p() = %d\n",
+ gdbarch_stap_adjust_register_p (gdbarch));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: stap_adjust_register = <%s>\n",
+ host_address_to_string (gdbarch->stap_adjust_register));
fprintf_unfiltered (file,
"gdbarch_dump: stap_gdb_register_prefix = %s\n",
pstring (gdbarch->stap_gdb_register_prefix));
return gdbarch->target_desc;
}
-int
-gdbarch_bits_big_endian (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- /* Skip verify of bits_big_endian, invalid_p == 0 */
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n");
- return gdbarch->bits_big_endian;
-}
-
-void
-set_gdbarch_bits_big_endian (struct gdbarch *gdbarch,
- int bits_big_endian)
-{
- gdbarch->bits_big_endian = bits_big_endian;
-}
-
int
gdbarch_short_bit (struct gdbarch *gdbarch)
{
return gdbarch->core_pid_to_str != NULL;
}
-const char *
+std::string
gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
{
gdb_assert (gdbarch != NULL);
gdbarch->stap_parse_special_token = stap_parse_special_token;
}
+int
+gdbarch_stap_adjust_register_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->stap_adjust_register != NULL;
+}
+
+std::string
+gdbarch_stap_adjust_register (struct gdbarch *gdbarch, struct stap_parse_info *p, const std::string ®name, int regnum)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->stap_adjust_register != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_adjust_register called\n");
+ return gdbarch->stap_adjust_register (gdbarch, p, regname, regnum);
+}
+
+void
+set_gdbarch_stap_adjust_register (struct gdbarch *gdbarch,
+ gdbarch_stap_adjust_register_ftype stap_adjust_register)
+{
+ gdbarch->stap_adjust_register = stap_adjust_register;
+}
+
int
gdbarch_dtrace_parse_probe_argument_p (struct gdbarch *gdbarch)
{
}
void
-gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, struct parser_state *pstate, int narg)
+gdbarch_dtrace_parse_probe_argument (struct gdbarch *gdbarch, struct expr_builder *builder, int narg)
{
gdb_assert (gdbarch != NULL);
gdb_assert (gdbarch->dtrace_parse_probe_argument != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_dtrace_parse_probe_argument called\n");
- gdbarch->dtrace_parse_probe_argument (gdbarch, pstate, narg);
+ gdbarch->dtrace_parse_probe_argument (gdbarch, builder, narg);
}
void
gdbarch->infcall_munmap = infcall_munmap;
}
-char *
+std::string
gdbarch_gcc_target_options (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
gdbarch->type_align = type_align;
}
+std::string
+gdbarch_get_pc_address_flags (struct gdbarch *gdbarch, frame_info *frame, CORE_ADDR pc)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->get_pc_address_flags != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_get_pc_address_flags called\n");
+ return gdbarch->get_pc_address_flags (frame, pc);
+}
+
+void
+set_gdbarch_get_pc_address_flags (struct gdbarch *gdbarch,
+ gdbarch_get_pc_address_flags_ftype get_pc_address_flags)
+{
+ gdbarch->get_pc_address_flags = get_pc_address_flags;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */