+2016-05-07 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
+
+ * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Remove unused
+ variables.
+ * aarch64-tdep.c (aarch64_skip_prologue): Likewise.
+ (aarch64_scan_prologue): Likewise.
+ (aarch64_prologue_prev_register): Likewise.
+ (aarch64_dwarf2_prev_register): Likewise.
+ (pass_in_v): Likewise.
+ (aarch64_push_dummy_call): Likewise.
+ (aarch64_breakpoint_from_pc): Likewise.
+ (aarch64_return_in_memory): Likewise.
+ (aarch64_return_value): Likewise.
+ (aarch64_displaced_step_b_cond): Likewise.
+ (aarch64_displaced_step_cb): Likewise.
+ (aarch64_displaced_step_tb): Likewise.
+ (aarch64_gdbarch_init): Likewise.
+ (aarch64_process_record): Likewise.
+ * alpha-mdebug-tdep.c (alpha_mdebug_init_abi): Likewise.
+ * alpha-tdep.c (_initialize_alpha_tdep): Likewise.
+ * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
+ * amd64-linux-tdep.c (amd64_dtrace_parse_probe_argument): Likewise.
+ * amd64-tdep.c (fixup_riprel): Likewise.
+ * amd64-windows-tdep.c (amd64_windows_frame_decode_epilogue): Likewise.
+ (amd64_windows_frame_decode_insns): Likewise.
+ (amd64_windows_frame_cache): Likewise.
+ (amd64_windows_frame_prev_register): Likewise.
+ (amd64_windows_frame_this_id): Likewise.
+ (amd64_windows_init_abi): Likewise.
+ * arm-linux-tdep.c (arm_linux_get_syscall_number): Likewise.
+ (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
+ * arm-symbian-tdep.c (arm_symbian_init_abi): Likewise.
+ * arm-tdep.c (arm_make_epilogue_frame_cache): Likewise.
+ (arm_epilogue_frame_prev_register): Likewise.
+ (arm_record_vdata_transfer_insn): Likewise.
+ (arm_record_exreg_ld_st_insn): Likewise.
+ * auto-load.c (execute_script_contents): Likewise.
+ (print_scripts): Likewise.
+ * avr-tdep.c (avr_frame_prev_register): Likewise.
+ (avr_push_dummy_call): Likewise.
+ * bfin-linux-tdep.c (bfin_linux_sigframe_init): Likewise.
+ * bfin-tdep.c (bfin_gdbarch_init): Likewise.
+ * blockframe.c (find_pc_partial_function_gnu_ifunc): Likewise.
+ * break-catch-throw.c (fetch_probe_arguments): Likewise.
+ * breakpoint.c (breakpoint_xfer_memory): Likewise.
+ (breakpoint_init_inferior): Likewise.
+ (breakpoint_inserted_here_p): Likewise.
+ (software_breakpoint_inserted_here_p): Likewise.
+ (hardware_breakpoint_inserted_here_p): Likewise.
+ (bpstat_what): Likewise.
+ (break_range_command): Likewise.
+ (save_breakpoints): Likewise.
+ * coffread.c (coff_symfile_read): Likewise.
+ * cris-tdep.c (cris_push_dummy_call): Likewise.
+ (cris_scan_prologue): Likewise.
+ (cris_register_size): Likewise.
+ (_initialize_cris_tdep): Likewise.
+ * d-exp.y: Likewise.
+ * dbxread.c (dbx_read_symtab): Likewise.
+ (process_one_symbol): Likewise.
+ (coffstab_build_psymtabs): Likewise.
+ (elfstab_build_psymtabs): Likewise.
+ * dicos-tdep.c (dicos_init_abi): Likewise.
+ * disasm.c (do_mixed_source_and_assembly): Likewise.
+ (gdb_disassembly): Likewise.
+ * dtrace-probe.c (dtrace_process_dof): Likewise.
+ * dwarf2read.c (error_check_comp_unit_head): Likewise.
+ (build_type_psymtabs_1): Likewise.
+ (skip_one_die): Likewise.
+ (process_imported_unit_die): Likewise.
+ (dwarf2_physname): Likewise.
+ (read_file_scope): Likewise.
+ (setup_type_unit_groups): Likewise.
+ (create_dwo_cu_reader): Likewise.
+ (create_dwo_cu): Likewise.
+ (create_dwo_unit_in_dwp_v1): Likewise.
+ (create_dwo_unit_in_dwp_v2): Likewise.
+ (lookup_dwo_unit_in_dwp): Likewise.
+ (free_dwo_file): Likewise.
+ (check_producer): Likewise.
+ (dwarf2_add_typedef): Likewise.
+ (dwarf2_add_member_fn): Likewise.
+ (read_unsigned_leb128): Likewise.
+ (read_signed_leb128): Likewise.
+ (dwarf2_const_value): Likewise.
+ (follow_die_sig_1): Likewise.
+ (dwarf_decode_macro_bytes): Likewise.
+ * extension.c (restore_active_ext_lang): Likewise.
+ * frv-linux-tdep.c (frv_linux_sigtramp_frame_cache): Likewise.
+ * ft32-tdep.c (ft32_analyze_prologue): Likewise.
+ * gdbtypes.c (lookup_typename): Likewise.
+ (resolve_dynamic_range): Likewise.
+ (check_typedef): Likewise.
+ * h8300-tdep.c (h8300_is_argument_spill): Likewise.
+ (h8300_gdbarch_init): Likewise.
+ * hppa-tdep.c (hppa32_push_dummy_call): Likewise.
+ (hppa_frame_this_id): Likewise.
+ (_initialize_hppa_tdep): Likewise.
+ * hppanbsd-tdep.c (hppanbsd_sigtramp_cache_init): Likewise.
+ * hppaobsd-tdep.c (hppaobsd_supply_fpregset): Likewise.
+ * i386-dicos-tdep.c (i386_dicos_init_abi): Likewise.
+ * i386-tdep.c (i386_bnd_type): Likewise.
+ (i386_gdbarch_init): Likewise.
+ (i386_mpx_bd_base): Likewise.
+ * i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Likewise.
+ * i386obsd-tdep.c (i386obsd_elf_init_abi): Likewise.
+ * ia64-tdep.c (examine_prologue): Likewise.
+ (ia64_frame_cache): Likewise.
+ (ia64_push_dummy_call): Likewise.
+ * infcmd.c (finish_command_fsm_async_reply_reason): Likewise.
+ (default_print_one_register_info): Likewise.
+ * infrun.c (infrun_thread_ptid_changed): Likewise.
+ (thread_still_needs_step_over): Likewise.
+ (stop_all_threads): Likewise.
+ (restart_threads): Likewise.
+ (keep_going_stepped_thread): Likewise.
+ * iq2000-tdep.c (iq2000_scan_prologue): Likewise.
+ * language.c (language_init_primitive_type_symbols): Likewise.
+ * linespec.c (add_sal_to_sals): Likewise.
+ * linux-nat.c (status_callback): Likewise.
+ (kill_unfollowed_fork_children): Likewise.
+ (linux_nat_kill): Likewise.
+ * linux-tdep.c (linux_fill_prpsinfo): Likewise.
+ * linux-thread-db.c (thread_db_notice_clone): Likewise.
+ (record_thread): Likewise.
+ * location.c (string_to_event_location_basic): Likewise.
+ * m32c-tdep.c (m32c_prev_register): Likewise.
+ * m32r-linux-tdep.c (m32r_linux_init_abi): Likewise.
+ * m32r-tdep.c (decode_prologue): Likewise.
+ * m68klinux-tdep.c (m68k_linux_sigtramp_frame_cache): Likewise.
+ * machoread.c (macho_symtab_read): Likewise.
+ (macho_symfile_read): Likewise.
+ (macho_symfile_offsets): Likewise.
+ * maint.c (set_per_command_cmd): Likewise.
+ * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Likewise.
+ (mi_cmd_stack_list_variables): Likewise.
+ * mi/mi-main.c (mi_cmd_exec_run): Likewise.
+ (output_register): Likewise.
+ (mi_cmd_execute): Likewise.
+ (mi_cmd_trace_define_variable): Likewise.
+ (print_variable_or_computed): Likewise.
+ * minsyms.c (prim_record_minimal_symbol_full): Likewise.
+ * mn10300-tdep.c (mn10300_frame_prev_register): Likewise.
+ * msp430-tdep.c (msp430_pseudo_register_write): Likewise.
+ * mt-tdep.c (mt_registers_info): Likewise.
+ * nios2-tdep.c (nios2_analyze_prologue): Likewise.
+ (nios2_push_dummy_call): Likewise.
+ (nios2_frame_unwind_cache): Likewise.
+ (nios2_stub_frame_cache): Likewise.
+ (nios2_stub_frame_sniffer): Likewise.
+ (nios2_gdbarch_init): Likewise.
+ * ppc-ravenscar-thread.c: Likewise.
+ * ppcfbsd-tdep.c (ppcfbsd_sigtramp_frame_cache): Likewise.
+ * python/py-evts.c (add_new_registry): Likewise.
+ * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
+ (bpfinishpy_detect_out_scope_cb): Likewise.
+ * python/py-framefilter.c (py_print_value): Likewise.
+ * python/py-inferior.c (infpy_write_memory): Likewise.
+ * python/py-infevents.c (create_inferior_call_event_object): Likewise.
+ * python/py-infthread.c (thpy_get_ptid): Likewise.
+ * python/py-linetable.c (ltpy_get_pcs_for_line): Likewise.
+ (ltpy_get_all_source_lines): Likewise.
+ (ltpy_is_valid): Likewise.
+ (ltpy_iternext): Likewise.
+ * python/py-symtab.c (symtab_and_line_to_sal_object): Likewise.
+ * python/py-unwind.c (pyuw_object_attribute_to_pointer): Likewise.
+ (unwind_infopy_str): Likewise.
+ * python/py-varobj.c (py_varobj_get_iterator): Likewise.
+ * ravenscar-thread.c (ravenscar_inferior_created): Likewise.
+ * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
+ * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
+ * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Likewise.
+ * s390-linux-tdep.c (s390_supply_tdb_regset): Likewise.
+ (s390_frame_prev_register): Likewise.
+ (s390_dwarf2_frame_init_reg): Likewise.
+ (s390_record_vr): Likewise.
+ (s390_process_record): Likewise.
+ * score-tdep.c (score_push_dummy_call): Likewise.
+ (score3_analyze_prologue): Likewise.
+ * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
+ * sh64-tdep.c (sh64_analyze_prologue): Likewise.
+ (sh64_push_dummy_call): Likewise.
+ (sh64_extract_return_value): Likewise.
+ (sh64_do_fp_register): Likewise.
+ * solib-aix.c (solib_aix_get_section_offsets): Likewise.
+ * solib-darwin.c (darwin_read_exec_load_addr_from_dyld): Likewise.
+ (darwin_solib_read_all_image_info_addr): Likewise.
+ * solib-dsbt.c (enable_break): Likewise.
+ * solib-frv.c (enable_break2): Likewise.
+ (frv_fdpic_find_canonical_descriptor): Likewise.
+ * solib-svr4.c (svr4_handle_solib_event): Likewise.
+ * sparc-tdep.c (sparc_skip_stack_check): Likewise.
+ * sparc64-linux-tdep.c (sparc64_linux_get_longjmp_target): Likewise.
+ * sparcobsd-tdep.c (sparc32obsd_init_abi): Likewise.
+ * spu-tdep.c (info_spu_dma_cmdlist): Likewise.
+ * stack.c (read_frame_local): Likewise.
+ * symfile.c (symbol_file_add_separate): Likewise.
+ (remove_symbol_file_command): Likewise.
+ * symmisc.c (maintenance_print_one_line_table): Likewise.
+ * symtab.c (symbol_cache_flush): Likewise.
+ (basic_lookup_transparent_type): Likewise.
+ (sort_search_symbols_remove_dups): Likewise.
+ * target.c (target_memory_map): Likewise.
+ (target_detach): Likewise.
+ (target_resume): Likewise.
+ (acquire_fileio_fd): Likewise.
+ (target_store_registers): Likewise.
+ * thread.c (print_thread_info_1): Likewise.
+ * tic6x-tdep.c (tic6x_analyze_prologue): Likewise.
+ * tilegx-linux-tdep.c (tilegx_linux_sigframe_init): Likewise.
+ * tilegx-tdep.c (tilegx_push_dummy_call): Likewise.
+ (tilegx_analyze_prologue): Likewise.
+ (tilegx_stack_frame_destroyed_p): Likewise.
+ (tilegx_frame_cache): Likewise.
+ * tracefile.c (trace_save): Likewise.
+ * tracepoint.c (encode_actions_and_make_cleanup): Likewise.
+ (start_tracing): Likewise.
+ (print_one_static_tracepoint_marker): Likewise.
+ * tui/tui.c (tui_enable): Likewise.
+ * valops.c (value_struct_elt_bitpos): Likewise.
+ (find_overload_match): Likewise.
+ (find_oload_champ): Likewise.
+ * value.c (value_contents_copy_raw): Likewise.
+ * windows-tdep.c (windows_get_tlb_type): Likewise.
+ * x86-linux-nat.c (x86_linux_enable_btrace): Likewise.
+ * xcoffread.c (record_minimal_symbol): Likewise.
+ (scan_xcoff_symtab): Likewise.
+ * xtensa-tdep.c (execute_code): Likewise.
+ (xtensa_gdbarch_init): Likewise.
+ (_initialize_xtensa_tdep): Likewise.
+
2016-05-04 Ulrich Weigand <uweigand@de.ibm.com>
* spu-linux-nat.c (spu_bfd_iovec_pread): Add pointer cast for C++.
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
- struct gdbarch *gdbarch = get_frame_arch (this_frame);
CORE_ADDR sp = get_frame_register_unsigned (this_frame, AARCH64_SP_REGNUM);
CORE_ADDR sigcontext_addr =
sp
static CORE_ADDR
aarch64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
{
- unsigned long inst;
- CORE_ADDR skip_pc;
CORE_ADDR func_addr, limit_pc;
- struct symtab_and_line sal;
/* See if we can determine the end of the prologue via the symbol
table. If so, then return either PC, or the PC after the
else
{
CORE_ADDR frame_loc;
- LONGEST saved_fp;
- LONGEST saved_lr;
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
frame_loc = get_frame_register_unsigned (this_frame, AARCH64_FP_REGNUM);
if (frame_loc == 0)
aarch64_prologue_prev_register (struct frame_info *this_frame,
void **this_cache, int prev_regnum)
{
- struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct aarch64_prologue_cache *cache
= aarch64_make_prologue_cache (this_frame, this_cache);
aarch64_dwarf2_prev_register (struct frame_info *this_frame,
void **this_cache, int regnum)
{
- struct gdbarch *gdbarch = get_frame_arch (this_frame);
CORE_ADDR lr;
switch (regnum)
{
if (info->nsrn < 8)
{
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int regnum = AARCH64_V0_REGNUM + info->nsrn;
gdb_byte reg[V_REGISTER_SIZE];
struct value **args, CORE_ADDR sp, int struct_return,
CORE_ADDR struct_addr)
{
- int nstack = 0;
int argnum;
- int x_argreg;
- int v_argreg;
struct aarch64_call_info info;
struct type *func_type;
struct type *return_type;
aarch64_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
int *lenptr)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
*lenptr = sizeof (aarch64_default_breakpoint);
return aarch64_default_breakpoint;
}
static int
aarch64_return_in_memory (struct gdbarch *gdbarch, struct type *type)
{
- int nRc;
- enum type_code code;
-
type = check_typedef (type);
if (is_hfa_or_hva (type))
struct type *valtype, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (TYPE_CODE (valtype) == TYPE_CODE_STRUCT
|| TYPE_CODE (valtype) == TYPE_CODE_UNION
{
struct aarch64_displaced_step_data *dsd
= (struct aarch64_displaced_step_data *) data;
- int32_t new_offset = data->insn_addr - dsd->new_addr + offset;
/* GDB has to fix up PC after displaced step this instruction
differently according to the condition is true or false. Instead
{
struct aarch64_displaced_step_data *dsd
= (struct aarch64_displaced_step_data *) data;
- int32_t new_offset = data->insn_addr - dsd->new_addr + offset;
/* The offset is out of range for a compare and branch
instruction. We can use the following instructions instead:
{
struct aarch64_displaced_step_data *dsd
= (struct aarch64_displaced_step_data *) data;
- int32_t new_offset = data->insn_addr - dsd->new_addr + offset;
/* The offset is out of range for a test bit and branch
instruction We can use the following instructions instead:
struct tdesc_arch_data *tdesc_data = NULL;
const struct target_desc *tdesc = info.target_desc;
int i;
- int have_fpa_registers = 1;
int valid_p = 1;
const struct tdesc_feature *feature;
int num_regs = 0;
uint32_t rec_no = 0;
uint8_t insn_size = 4;
uint32_t ret = 0;
- ULONGEST t_bit = 0, insn_id = 0;
gdb_byte buf[insn_size];
insn_decode_record aarch64_record;
void
alpha_mdebug_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
frame_unwind_append_unwinder (gdbarch, &alpha_mdebug_frame_unwind);
frame_base_append_sniffer (gdbarch, alpha_mdebug_frame_base_sniffer);
}
void
_initialize_alpha_tdep (void)
{
- struct cmd_list_element *c;
gdbarch_register (bfd_arch_alpha, alpha_gdbarch_init, NULL);
static void
amd64_dicos_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
amd64_init_abi (info, gdbarch);
dicos_init_abi (gdbarch);
struct parser_state *pstate,
int narg)
{
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- struct frame_info *this_frame = get_selected_frame (NULL);
struct stoken str;
/* DTrace probe arguments can be found on the ABI-defined places for
else
{
/* Additional arguments are passed on the stack. */
- CORE_ADDR sp;
const char *regname = user_reg_map_regnum_to_name (gdbarch, AMD64_RSP_REGNUM);
/* Displacement. */
fixup_riprel (struct gdbarch *gdbarch, struct displaced_step_closure *dsc,
CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
{
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
const struct amd64_insn *insn_details = &dsc->insn_details;
int modrm_offset = insn_details->modrm_offset;
gdb_byte *insn = insn_details->raw_insn + modrm_offset;
CORE_ADDR rip_base;
- int32_t disp;
int insn_length;
int arch_tmp_regno, tmp_regno;
ULONGEST orig_value;
++insn;
/* Compute the rip-relative address. */
- disp = extract_signed_integer (insn, sizeof (int32_t), byte_order);
insn_length = gdb_buffered_insn_length (gdbarch, dsc->insn_buf,
dsc->max_len, from);
rip_base = from + insn_length;
{
/* rex jmp reg */
gdb_byte op1;
- unsigned int reg;
- gdb_byte buf[8];
if (target_read_memory (pc + 2, &op1, 1) != 0)
return -1;
address is odd (http://www.codemachine.com/article_x64deepdive.html).
*/
struct external_pex64_runtime_function d;
- CORE_ADDR sa, ea;
if (target_read_memory (cache->image_base + (unwind_info & ~1),
(gdb_byte *) &d, sizeof (d)) != 0)
gdb_byte *end_insns;
unsigned char codes_count;
unsigned char frame_reg;
- unsigned char frame_off;
CORE_ADDR start;
/* Read and decode header. */
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct amd64_windows_frame_cache *cache;
gdb_byte buf[8];
- struct obj_section *sec;
- pe_data_type *pe;
- IMAGE_DATA_DIRECTORY *dir;
- CORE_ADDR image_base;
CORE_ADDR pc;
- struct objfile *objfile;
- unsigned long lo, hi;
CORE_ADDR unwind_info = 0;
if (*this_cache)
void **this_cache, int regnum)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct amd64_windows_frame_cache *cache =
amd64_windows_frame_cache (this_frame, this_cache);
- struct value *val;
CORE_ADDR prev;
if (frame_debug)
amd64_windows_frame_this_id (struct frame_info *this_frame, void **this_cache,
struct frame_id *this_id)
{
- struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct amd64_windows_frame_cache *cache =
amd64_windows_frame_cache (this_frame, this_cache);
static void
amd64_windows_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
/* The dwarf2 unwinder (appended very early by i386_gdbarch_init) is
preferred over the SEH one. The reasons are:
- binaries without SEH but with dwarf2 debug info are correcly handled
ptid_t ptid)
{
struct regcache *regs = get_thread_regcache (ptid);
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
ULONGEST pc;
ULONGEST cpsr;
CORE_ADDR pc = regcache_read_pc (self->regcache);
int is_thumb = arm_is_thumb (self->regcache);
ULONGEST svc_number = 0;
- struct gdbarch *gdbarch = get_regcache_arch (self->regcache);
if (is_thumb)
{
arm_symbian_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
/* Shared library handling. */
set_gdbarch_skip_trampoline_code (gdbarch, arm_symbian_skip_trampoline_code);
arm_make_epilogue_frame_cache (struct frame_info *this_frame)
{
struct arm_prologue_cache *cache;
- CORE_ADDR sp;
int reg;
cache = FRAME_OBSTACK_ZALLOC (struct arm_prologue_cache);
arm_epilogue_frame_prev_register (struct frame_info *this_frame,
void **this_cache, int regnum)
{
- struct arm_prologue_cache *cache;
-
if (*this_cache == NULL)
*this_cache = arm_make_epilogue_frame_cache (this_frame);
- cache = (struct arm_prologue_cache *) *this_cache;
return arm_prologue_prev_register (this_frame, this_cache, regnum);
}
uint32_t bits_a, bit_c, bit_l, reg_t, reg_v;
uint32_t record_buf[4];
- const int num_regs = gdbarch_num_regs (arm_insn_r->gdbarch);
reg_t = bits (arm_insn_r->arm_insn, 12, 15);
reg_v = bits (arm_insn_r->arm_insn, 21, 23);
bits_a = bits (arm_insn_r->arm_insn, 21, 23);
ULONGEST u_regval = 0;
struct regcache *reg_cache = arm_insn_r->regcache;
- const int num_regs = gdbarch_num_regs (arm_insn_r->gdbarch);
opcode = bits (arm_insn_r->arm_insn, 20, 24);
single_reg = !bit (arm_insn_r->arm_insn, 8);
{
objfile_script_executor_func *executor;
const char *newline, *script_text;
- char *name, *end;
+ char *name;
int is_safe, in_hash_table;
struct cleanup *cleanups;
static void
print_scripts (VEC (loaded_script_ptr) *scripts)
{
- struct ui_out *uiout = current_uiout;
int i;
loaded_script_ptr script;
avr_frame_prev_register (struct frame_info *this_frame,
void **this_prologue_cache, int regnum)
{
- struct gdbarch *gdbarch = get_frame_arch (this_frame);
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct avr_unwind_cache *info
= avr_frame_unwind_cache (this_frame, this_prologue_cache);
int nargs, struct value **args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int i;
gdb_byte buf[3];
int call_length = gdbarch_tdep (gdbarch)->call_length;
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
- struct gdbarch *gdbarch = get_frame_arch (this_frame);
CORE_ADDR sp = get_frame_sp (this_frame);
CORE_ADDR pc = get_frame_pc (this_frame);
CORE_ADDR sigcontext = sp + SIGCONTEXT_OFFSET;
CORE_ADDR struct_addr)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- gdb_byte buf[4];
int i;
long reg_r0, reg_r1, reg_r2;
int total_len = 0;
- enum bfin_abi abi = bfin_abi (gdbarch);
- CORE_ADDR func_addr = find_function_addr (function, NULL);
for (i = nargs - 1; i >= 0; i--)
{
{
struct gdbarch_tdep *tdep;
struct gdbarch *gdbarch;
- int elf_flags;
enum bfin_abi abi;
- /* Extract the ELF flags, if available. */
- if (info.abfd && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
- elf_flags = elf_elfheader (info.abfd)->e_flags;
- else
- elf_flags = 0;
-
abi = BFIN_ABI_FLAT;
/* If there is already a candidate, use it. */
struct bound_minimal_symbol msymbol;
struct compunit_symtab *compunit_symtab = NULL;
struct objfile *objfile;
- int i;
CORE_ADDR mapped_pc;
/* To ensure that the symbol returned belongs to the correct setion
struct frame_info *frame = get_selected_frame (_("No frame selected"));
CORE_ADDR pc = get_frame_pc (frame);
struct bound_probe pc_probe;
- const struct sym_probe_fns *pc_probe_fns;
unsigned n_args;
pc_probe = find_probe_by_pc (pc);
/* Left boundary, right boundary and median element of our binary
search. */
unsigned bc_l, bc_r, bc;
- size_t i;
/* Find BC_L which is a leftmost element which may affect BUF
content. It is safe to report lower value but a failure to
for (bc = bc_l; bc < bp_location_count; bc++)
{
struct bp_location *bl = bp_location[bc];
- CORE_ADDR bp_addr = 0;
- int bp_size = 0;
- int bptoffset = 0;
/* bp_location array has BL->OWNER always non-NULL. */
if (bl->owner->type == bp_none)
breakpoint_init_inferior (enum inf_context context)
{
struct breakpoint *b, *b_tmp;
- struct bp_location *bl, **blp_tmp;
+ struct bp_location *bl;
int ix;
struct program_space *pspace = current_program_space;
breakpoint_inserted_here_p (struct address_space *aspace, CORE_ADDR pc)
{
struct bp_location **blp, **blp_tmp = NULL;
- struct bp_location *bl;
ALL_BP_LOCATIONS_AT_ADDR (blp, blp_tmp, pc)
{
CORE_ADDR pc)
{
struct bp_location **blp, **blp_tmp = NULL;
- struct bp_location *bl;
ALL_BP_LOCATIONS_AT_ADDR (blp, blp_tmp, pc)
{
CORE_ADDR pc)
{
struct bp_location **blp, **blp_tmp = NULL;
- struct bp_location *bl;
ALL_BP_LOCATIONS_AT_ADDR (blp, blp_tmp, pc)
{
bpstat_what (bpstat bs_head)
{
struct bpstat_what retval;
- int jit_event = 0;
bpstat bs;
retval.main_action = BPSTAT_WHAT_KEEP_CHECKING;
}
break;
case bp_jit_event:
- jit_event = 1;
this_action = BPSTAT_WHAT_SINGLE;
break;
case bp_call_dummy:
static void
break_range_command (char *arg, int from_tty)
{
- char *arg_start, *addr_string_start, *addr_string_end;
+ char *arg_start, *addr_string_start;
struct linespec_result canonical_start, canonical_end;
int bp_count, can_use_bp, length;
CORE_ADDR end;
if (tp->type != bp_dprintf && tp->commands)
{
- struct gdb_exception exception;
-
fprintf_unfiltered (fp, " commands\n");
ui_out_redirect (current_uiout, fp);
coff_symfile_read (struct objfile *objfile, int symfile_flags)
{
struct coff_symfile_info *info;
- struct dbx_symfile_info *dbxinfo;
bfd *abfd = objfile->obfd;
coff_data_type *cdata = coff_data (abfd);
char *name = bfd_get_filename (abfd);
info = (struct coff_symfile_info *) objfile_data (objfile,
coff_objfile_data_key);
- dbxinfo = DBX_SYMFILE_INFO (objfile);
symfile_bfd = abfd; /* Kludge for swap routines. */
/* WARNING WILL ROBINSON! ACCESSING BFD-PRIVATE DATA HERE! FIXME! */
int struct_return, CORE_ADDR struct_addr)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- int stack_offset;
int argreg;
int argnum;
- /* The function's arguments and memory allocated by gdb for the arguments to
- point at reside in separate areas on the stack.
- Both frame pointers grow toward higher addresses. */
- CORE_ADDR fp_arg;
- CORE_ADDR fp_mem;
-
struct stack_item *si = NULL;
/* Push the return address. */
/* Now load as many as possible of the first arguments into registers,
and push the rest onto the stack. */
argreg = ARG1_REGNUM;
- stack_offset = 0;
for (argnum = 0; argnum < nargs; argnum++)
{
unsigned short insn_next;
int regno;
- /* Is there a push fp? */
- int have_fp;
-
/* Number of byte on stack used for local variables and movem. */
int val;
static int
cris_register_size (struct gdbarch *gdbarch, int regno)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int i;
int spec_regno;
void
_initialize_cris_tdep (void)
{
- struct cmd_list_element *c;
-
gdbarch_register (bfd_arch_cris, cris_gdbarch_init, cris_dump_tdep);
/* CRIS-specific user-commands. */
if (parsed_float)
{
- const struct builtin_d_type *builtin_d_types;
const char *suffix;
int suffix_len;
char *s, *sp;
static void
dbx_read_symtab (struct partial_symtab *self, struct objfile *objfile)
{
- bfd *sym_bfd;
-
if (self->readin)
{
fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. "
gdb_flush (gdb_stdout);
}
- sym_bfd = objfile->obfd;
-
next_symbol_text_func = dbx_next_symbol_text;
back_to = make_cleanup (null_cleanup, NULL);
source file. Used to detect the SunPRO solaris compiler. */
static int n_opt_found;
- /* The stab type used for the definition of the last function.
- N_STSYM or N_GSYM for SunOS4 acc; N_FUN for other compilers. */
- static int function_stab_type = 0;
-
if (!block_address_function_relative)
{
/* N_LBRAC, N_RBRAC and N_SLINE entries are not relative to the
{
case 'f':
case 'F':
- function_stab_type = type;
-
/* Deal with the SunPRO 3.0 compiler which omits the
address from N_FUN symbols. */
if (type == N_FUN
int val;
bfd *sym_bfd = objfile->obfd;
char *name = bfd_get_filename (sym_bfd);
- struct dbx_symfile_info *info;
unsigned int stabsize;
- /* There is already a dbx_symfile_info allocated by our caller.
- It might even contain some info from the coff symtab to help us. */
- info = DBX_SYMFILE_INFO (objfile);
-
DBX_TEXT_ADDR (objfile) = textaddr;
DBX_TEXT_SIZE (objfile) = textsize;
int val;
bfd *sym_bfd = objfile->obfd;
char *name = bfd_get_filename (sym_bfd);
- struct dbx_symfile_info *info;
struct cleanup *back_to = make_cleanup (null_cleanup, NULL);
- /* There is already a dbx_symfile_info allocated by our caller.
- It might even contain some info from the ELF symtab to help us. */
- info = DBX_SYMFILE_INFO (objfile);
-
/* Find the first and last text address. dbx_symfile_read seems to
want this. */
find_text_range (sym_bfd, objfile);
void
dicos_init_abi (struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
set_solib_ops (gdbarch, &solib_target_so_ops);
/* Every process, although has its own address space, sees the same
CORE_ADDR low, CORE_ADDR high,
int how_many, int flags, struct ui_file *stb)
{
- int newlines = 0;
const struct linetable_entry *le, *first_le;
- struct symtab_and_line sal;
int i, nlines;
- int out_of_order = 0;
- int next_line = 0;
int num_displayed = 0;
print_source_lines_flags psl_flags = 0;
struct cleanup *cleanups;
while (pc < high)
{
- struct linetable_entry *le = NULL;
struct symtab_and_line sal;
CORE_ADDR end_pc;
int start_preceding_line_to_display = 0;
struct cleanup *cleanups = make_cleanup_ui_file_delete (stb);
struct disassemble_info di = gdb_disassemble_info (gdbarch, stb);
struct symtab *symtab;
- struct linetable_entry *le = NULL;
int nlines = -1;
/* Assume symtab is valid for whole PC range. */
dtrace_process_dof (asection *sect, struct objfile *objfile,
VEC (probe_p) **probesp, struct dtrace_dof_hdr *dof)
{
- bfd *abfd = objfile->obfd;
- int size = bfd_get_arch_size (abfd) / 8;
struct gdbarch *gdbarch = get_objfile_arch (objfile);
struct dtrace_dof_sect *section;
int i;
struct dwarf2_section_info *section,
struct dwarf2_section_info *abbrev_section)
{
- bfd *abfd = get_section_bfd_owner (section);
const char *filename = get_section_file_name (section);
if (header->version != 2 && header->version != 3 && header->version != 4)
static void
build_type_psymtabs_1 (void)
{
- struct objfile *objfile = dwarf2_per_objfile->objfile;
struct tu_stats *tu_stats = &dwarf2_per_objfile->tu_stats;
struct cleanup *cleanups;
struct abbrev_table *abbrev_table;
sect_offset abbrev_offset;
struct tu_abbrev_offset *sorted_by_abbrev;
- struct type_unit_group **iter;
int i;
/* It's up to the caller to not call us multiple times. */
struct dwarf2_cu *cu = reader->cu;
const gdb_byte *buffer = reader->buffer;
const gdb_byte *buffer_end = reader->buffer_end;
- const gdb_byte *start_info_ptr = info_ptr;
unsigned int form, i;
for (i = 0; i < abbrev->num_attrs; i++)
if (attr != NULL)
{
struct dwarf2_per_cu_data *per_cu;
- struct symtab *imported_symtab;
sect_offset offset;
int is_dwz;
dwarf2_physname (const char *name, struct die_info *die, struct dwarf2_cu *cu)
{
struct objfile *objfile = cu->objfile;
- struct attribute *attr;
const char *retval, *mangled = NULL, *canon = NULL;
struct cleanup *back_to;
int need_copy = 1;
const char *name = NULL;
const char *comp_dir = NULL;
struct die_info *child_die;
- bfd *abfd = objfile->obfd;
CORE_ADDR baseaddr;
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
static void
setup_type_unit_groups (struct die_info *die, struct dwarf2_cu *cu)
{
- struct objfile *objfile = dwarf2_per_objfile->objfile;
struct dwarf2_per_cu_data *per_cu = cu->per_cu;
struct type_unit_group *tu_group;
int first_time;
void *datap)
{
struct dwarf2_cu *cu = reader->cu;
- struct objfile *objfile = dwarf2_per_objfile->objfile;
sect_offset offset = cu->per_cu->offset;
struct dwarf2_section_info *section = cu->per_cu->section;
struct create_dwo_cu_data *data = (struct create_dwo_cu_data *) datap;
{
struct objfile *objfile = dwarf2_per_objfile->objfile;
struct dwarf2_section_info *section = &dwo_file->sections.info;
- bfd *abfd;
- htab_t cu_htab;
const gdb_byte *info_ptr, *end_ptr;
struct create_dwo_cu_data create_dwo_cu_data;
struct dwo_unit *dwo_unit;
if (info_ptr == NULL)
return NULL;
- /* We can't set abfd until now because the section may be empty or
- not present, in which case section->asection will be NULL. */
- abfd = get_section_bfd_owner (section);
-
if (dwarf_read_debug)
{
fprintf_unfiltered (gdb_stdlog, "Reading %s for %s:\n",
struct virtual_v1_dwo_sections sections;
void **dwo_file_slot;
char *virtual_dwo_name;
- struct dwarf2_section_info *cutu;
struct cleanup *cleanups;
int i;
struct virtual_v2_dwo_sections sections;
void **dwo_file_slot;
char *virtual_dwo_name;
- struct dwarf2_section_info *cutu;
struct cleanup *cleanups;
int i;
uint32_t hash2 = ((signature >> 32) & mask) | 1;
unsigned int i;
void **slot;
- struct dwo_unit find_dwo_cu, *dwo_cu;
+ struct dwo_unit find_dwo_cu;
memset (&find_dwo_cu, 0, sizeof (find_dwo_cu));
find_dwo_cu.signature = signature;
static void
free_dwo_file (struct dwo_file *dwo_file, struct objfile *objfile)
{
- int ix;
- struct dwarf2_section_info *section;
/* Note: dbfd is NULL for virtual DWO files. */
gdb_bfd_unref (dwo_file->dbfd);
static void
check_producer (struct dwarf2_cu *cu)
{
- const char *cs;
int major, minor;
if (cu->producer == NULL)
dwarf2_add_typedef (struct field_info *fip, struct die_info *die,
struct dwarf2_cu *cu)
{
- struct objfile *objfile = cu->objfile;
struct typedef_field_list *new_field;
- struct attribute *attr;
struct typedef_field *fp;
- char *fieldname = "";
/* Allocate a new field list entry and link it in. */
new_field = XCNEW (struct typedef_field_list);
&& DW_BLOCK (attr)->data[0] == DW_OP_deref_size
&& DW_BLOCK (attr)->data[1] == cu->header.addr_size))
{
- struct dwarf_block blk;
- int offset;
-
- offset = (DW_BLOCK (attr)->data[0] == DW_OP_deref
- ? 1 : 2);
- blk.size = DW_BLOCK (attr)->size - offset;
- blk.data = DW_BLOCK (attr)->data + offset;
fnp->voffset = decode_locdesc (DW_BLOCK (attr), cu);
if ((fnp->voffset % cu->header.addr_size) != 0)
dwarf2_complex_location_expr_complaint ();
{
ULONGEST result;
unsigned int num_read;
- int i, shift;
+ int shift;
unsigned char byte;
result = 0;
shift = 0;
num_read = 0;
- i = 0;
while (1)
{
byte = bfd_get_8 (abfd, buf);
unsigned int *bytes_read_ptr)
{
LONGEST result;
- int i, shift, num_read;
+ int shift, num_read;
unsigned char byte;
result = 0;
shift = 0;
num_read = 0;
- i = 0;
while (1)
{
byte = bfd_get_8 (abfd, buf);
struct dwarf2_cu *cu)
{
struct objfile *objfile = cu->objfile;
- struct comp_unit_head *cu_header = &cu->header;
LONGEST value;
const gdb_byte *bytes;
struct dwarf2_locexpr_baton *baton;
follow_die_sig_1 (struct die_info *src_die, struct signatured_type *sig_type,
struct dwarf2_cu **ref_cu)
{
- struct objfile *objfile = (*ref_cu)->objfile;
struct die_info temp_die;
struct dwarf2_cu *sig_cu;
struct die_info *die;
void **slot;
bfd *include_bfd = abfd;
struct dwarf2_section_info *include_section = section;
- struct dwarf2_section_info alt_section;
const gdb_byte *include_mac_end = mac_end;
int is_dwz = section_is_dwz;
const gdb_byte *new_mac_ptr;
void
restore_active_ext_lang (struct active_ext_lang_state *previous)
{
- const struct extension_language_defn *current = active_ext_lang;
-
active_ext_lang = previous->ext_lang;
if (target_terminal_is_ours ())
void **this_cache)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct trad_frame_cache *cache;
CORE_ADDR addr;
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR next_addr;
- ULONGEST inst, inst2;
- LONGEST offset;
+ ULONGEST inst;
int regnum, pushreg;
struct bound_minimal_symbol msymbol;
const int first_saved_reg = 13; /* The first saved register. */
const struct block *block, int noerr)
{
struct symbol *sym;
- struct type *type;
sym = lookup_symbol_in_language (name, block, VAR_DOMAIN,
language->la_language, NULL).symbol;
CORE_ADDR value;
struct type *static_range_type, *static_target_type;
const struct dynamic_prop *prop;
- const struct dwarf2_locexpr_baton *baton;
struct dynamic_prop low_bound, high_bound;
gdb_assert (TYPE_CODE (dyn_range_type) == TYPE_CODE_RANGE);
if (TYPE_TARGET_STUB (type))
{
- struct type *range_type;
struct type *target_type = check_typedef (TYPE_TARGET_TYPE (type));
if (TYPE_STUB (target_type) || TYPE_TARGET_STUB (target_type))
}
else if (IS_MOVL_EXT (w2))
{
- int w3 = read_memory_integer (pc + 4, 2, byte_order);
-
if (IS_MOVL_Rn24_SP (read_memory_integer (pc + 4, 2, byte_order)))
{
LONGEST disp = read_memory_integer (pc + 6, 4, byte_order);
static struct gdbarch *
h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
- struct gdbarch_tdep *tdep = NULL;
struct gdbarch *gdbarch;
arches = gdbarch_list_lookup_by_info (arches, &info);
if (arches != NULL)
return arches->gdbarch;
-#if 0
- tdep = XNEW (struct gdbarch_tdep);
-#endif
-
if (info.bfd_arch_info->arch != bfd_arch_h8300)
return NULL;
/* Stack base address at which the first parameter is stored. */
CORE_ADDR param_end = 0;
- /* The inner most end of the stack after all the parameters have
- been pushed. */
- CORE_ADDR new_sp = 0;
-
/* Two passes. First pass computes the location of everything,
second pass writes the bytes out. */
int write_pass;
struct frame_id *this_id)
{
struct hppa_frame_cache *info;
- CORE_ADDR pc = get_frame_pc (this_frame);
struct unwind_table_entry *u;
info = hppa_frame_cache (this_frame, this_cache);
void
_initialize_hppa_tdep (void)
{
- struct cmd_list_element *c;
-
gdbarch_register (bfd_arch_hppa, hppa_gdbarch_init, hppa_dump_tdep);
hppa_objfile_priv_data = register_objfile_data ();
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
- struct gdbarch *gdbarch = get_frame_arch (this_frame);
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
CORE_ADDR sp = get_frame_register_unsigned (this_frame, HPPA_SP_REGNUM);
CORE_ADDR base;
int *reg_offset;
struct regcache *regcache,
int regnum, const void *fpregs, size_t len)
{
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
const gdb_byte *regs = (const gdb_byte *) fpregs;
int i;
static void
i386_dicos_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
dicos_init_abi (gdbarch);
}
if (!tdep->i386_bnd_type)
{
- struct type *t, *bound_t;
+ struct type *t;
const struct builtin_type *bt = builtin_type (gdbarch);
/* The type we're building is described bellow: */
int ymm0_regnum;
int bnd0_regnum;
int num_bnd_cooked;
- int k0_regnum;
- int zmm0_regnum;
/* If there is already a candidate, use it. */
arches = gdbarch_list_lookup_by_info (arches, &info);
struct gdbarch_tdep *tdep;
ULONGEST ret;
enum register_status regstatus;
- struct gdb_exception except;
rcache = get_current_regcache ();
tdep = gdbarch_tdep (get_regcache_arch (rcache));
CORE_ADDR func)
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR sp = get_frame_register_unsigned (this_frame, I386_ESP_REGNUM);
CORE_ADDR base;
static void
i386obsd_elf_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
/* It's still OpenBSD. */
i386obsd_init_abi (info, gdbarch);
#define NUM_IA64_RAW_REGS 462
static int sp_regnum = IA64_GR12_REGNUM;
-static int fp_regnum = IA64_VFP_REGNUM;
-static int lr_regnum = IA64_VRAP_REGNUM;
/* NOTE: we treat the register stack registers r32-r127 as
pseudo-registers because they may not be accessible via the ptrace
&& it == M && ((instr & 0x1ee0000003fLL) == 0x02c00000000LL))
{
/* alloc - start of a regular function. */
- int sor = (int) ((instr & 0x00078000000LL) >> 27);
int sol = (int) ((instr & 0x00007f00000LL) >> 20);
int sof = (int) ((instr & 0x000000fe000LL) >> 13);
int rN = (int) ((instr & 0x00000001fc0LL) >> 6);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct ia64_frame_cache *cache;
gdb_byte buf[8];
- CORE_ADDR cfm, psr;
+ CORE_ADDR cfm;
if (*this_cache)
return (struct ia64_frame_cache *) *this_cache;
cache->bsp = extract_unsigned_integer (buf, 8, byte_order);
get_frame_register (this_frame, IA64_PSR_REGNUM, buf);
- psr = extract_unsigned_integer (buf, 8, byte_order);
get_frame_register (this_frame, IA64_CFM_REGNUM, buf);
cfm = extract_unsigned_integer (buf, 8, byte_order);
int nslots, rseslots, memslots, slotnum, nfuncargs;
int floatreg;
ULONGEST bsp;
- CORE_ADDR funcdescaddr, pc, global_pointer;
+ CORE_ADDR funcdescaddr, global_pointer;
CORE_ADDR func_addr = find_function_addr (function, NULL);
nslots = 0;
static enum async_reply_reason
finish_command_fsm_async_reply_reason (struct thread_fsm *self)
{
- struct finish_command_fsm *f = (struct finish_command_fsm *) self;
-
if (execution_direction == EXEC_REVERSE)
return EXEC_ASYNC_END_STEPPING_RANGE;
else
if (TYPE_CODE (regtype) == TYPE_CODE_FLT
|| TYPE_CODE (regtype) == TYPE_CODE_DECFLOAT)
{
- int j;
struct value_print_options opts;
const gdb_byte *valaddr = value_contents_for_printing (val);
enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (regtype));
/* Detach new forked process? */
if (detach_fork)
{
- struct cleanup *old_chain;
-
/* Before detaching from the child, remove all breakpoints
from it. If we forked, then this has already been taken
care of by infrun.c. If we vforked however, any
static void
infrun_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid)
{
- struct displaced_step_request *it;
struct displaced_step_inferior_state *displaced;
if (ptid_equal (inferior_ptid, old_ptid))
static step_over_what
thread_still_needs_step_over (struct thread_info *tp)
{
- struct inferior *inf = find_inferior_ptid (tp->ptid);
step_over_what what = 0;
if (thread_still_needs_step_over_bp (tp))
{
enum gdb_signal sig;
struct regcache *regcache;
- struct address_space *aspace;
if (debug_infrun)
{
restart_threads (struct thread_info *event_thread)
{
struct thread_info *tp;
- struct thread_info *step_over = NULL;
/* In case the instruction just stepped spawned a new thread. */
update_thread_list ();
keep_going_stepped_thread (struct thread_info *tp)
{
struct frame_info *frame;
- struct gdbarch *gdbarch;
struct execution_control_state ecss;
struct execution_control_state *ecs = &ecss;
stop_pc = regcache_read_pc (get_thread_regcache (tp->ptid));
frame = get_current_frame ();
- gdbarch = get_frame_arch (frame);
/* If the PC of the thread we were trying to single-step has
changed, then that thread has trapped or been signaled, but the
struct symtab_and_line sal;
CORE_ADDR pc;
CORE_ADDR loop_end;
- int found_store_lr = 0;
- int found_decr_sp = 0;
int srcreg;
int tgtreg;
signed short offset;
cache->saved_regs[tgtreg] = -((signed short) (insn & 0xffff));
if (tgtreg == E_LR_REGNUM)
- found_store_lr = 1;
continue;
}
{
/* addi %1, %1, -N == addi %sp, %sp, -N */
/* LEGACY -- from assembly-only port. */
- found_decr_sp = 1;
cache->framesize = -((signed short) (insn & 0xffff));
continue;
}
struct gdbarch *gdbarch)
{
int n;
- struct compunit_symtab *cust;
- struct symtab *symtab;
- struct block *static_block, *global_block;
gdb_assert (lai->primitive_type_vector != NULL);
canonical = &self->canonical_names[sals->nelts - 1];
if (!literal_canonical && sal->symtab)
{
- const char *fullname = symtab_to_fullname (sal->symtab);
-
/* Note that the filter doesn't have to be a valid linespec
input. We only apply the ":LINE" treatment to Ada for
the time being. */
|| lp->stop_reason == TARGET_STOPPED_BY_HW_BREAKPOINT)
{
struct regcache *regcache = get_thread_regcache (lp->ptid);
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
CORE_ADDR pc;
int discard = 0;
ptid_t child_ptid = ws->value.related_pid;
int child_pid = ptid_get_pid (child_ptid);
int child_lwp = ptid_get_lwp (child_ptid);
- int status;
kill_one_lwp (child_lwp);
kill_wait_one_lwp (child_lwp);
static void
linux_nat_kill (struct target_ops *ops)
{
- struct target_waitstatus last;
-
/* If we're stopped while forking and we haven't followed yet,
kill the other task. We need to do this first because the
parent will be sleeping if this is a vfork. */
int n_fields = 0;
/* Cleanups. */
struct cleanup *c;
- int i;
gdb_assert (p != NULL);
int
thread_db_notice_clone (ptid_t parent, ptid_t child)
{
- td_thrhandle_t th;
- td_thrinfo_t ti;
- td_err_e err;
struct thread_db_info *info;
info = get_thread_db_info (ptid_get_pid (child));
ptid_t ptid, const td_thrhandle_t *th_p,
const td_thrinfo_t *ti_p)
{
- td_err_e err;
struct private_thread_info *priv;
- int new_thread = (tp == NULL);
/* A thread ID of zero may mean the thread library has not
initialized yet. Leave private == NULL until the thread library
const struct language_defn *language)
{
struct event_location *location;
- const char *arg, *orig, *cs;
+ const char *cs;
/* Try the input as a probe spec. */
cs = *stringp;
struct m32c_prologue *p
= m32c_analyze_frame_prologue (this_frame, this_prologue_cache);
CORE_ADDR frame_base = m32c_frame_base (this_frame, this_prologue_cache);
- int reg_size = register_size (get_frame_arch (this_frame), regnum);
if (regnum == tdep->sp->num)
return frame_unwind_got_constant (this_frame, regnum, frame_base);
static void
m32r_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
linux_init_abi (info, gdbarch);
if ((insn & 0xf0ff) == 0x207f)
{ /* st reg, @-sp */
- int regno;
framesize += 4;
- regno = ((insn >> 8) & 0xf);
after_prologue = 0;
continue;
}
struct frame_id this_id;
struct trad_frame_cache *cache;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct m68k_linux_sigtramp_info info;
gdb_byte buf[4];
VEC (oso_el) **oso_vector_ptr)
{
long i;
- const asymbol *dir_so = NULL;
const asymbol *file_so = NULL;
asymbol **oso_file = NULL;
unsigned int nbr_syms = 0;
else
{
file_so = sym;
- dir_so = NULL;
state = S_FIRST_SO;
}
}
else if (state == S_FIRST_SO)
{
/* Second SO stab for the file name. */
- dir_so = file_so;
file_so = sym;
state = S_SECOND_SO;
}
{
complaint (&symfile_complaints, _("Missing nul SO"));
file_so = sym;
- dir_so = NULL;
state = S_FIRST_SO;
}
}
macho_symfile_read (struct objfile *objfile, int symfile_flags)
{
bfd *abfd = objfile->obfd;
- CORE_ADDR offset;
long storage_needed;
bfd *dsym_bfd;
VEC (oso_el) *oso_vector = NULL;
dsym_bfd = macho_check_dsym (objfile, &dsym_filename);
if (dsym_bfd != NULL)
{
- int ix;
- oso_el *oso;
struct bfd_section *asect, *dsect;
make_cleanup (xfree, dsym_filename);
const struct section_addr_info *addrs)
{
unsigned int i;
- unsigned int num_sections;
struct obj_section *osect;
/* Allocate section_offsets. */
set_per_command_cmd (char *args, int from_tty)
{
struct cmd_list_element *list;
- size_t length;
int val;
val = parse_cli_boolean_value (args);
enum print_values print_value;
int oind = 0;
int skip_unavailable = 0;
- int i;
if (argc > 1)
{
- int i;
enum opt
{
NO_FRAME_FILTERS,
if (argc > 1)
{
- int i;
enum opt
{
NO_FRAME_FILTERS,
void
mi_cmd_exec_run (char *command, char **argv, int argc)
{
- int i;
int start_p = 0;
/* Parse the command options. */
output_register (struct frame_info *frame, int regnum, int format,
int skip_unavailable)
{
- struct gdbarch *gdbarch = get_frame_arch (frame);
struct ui_out *uiout = current_uiout;
struct value *val = value_of_register (regnum, frame);
struct cleanup *tuple_cleanup;
mi_cmd_execute (struct mi_parse *parse)
{
struct cleanup *cleanup;
- enum language saved_language;
cleanup = prepare_execute_command ();
void
mi_cmd_trace_define_variable (char *command, char **argv, int argc)
{
- struct expression *expr;
LONGEST initval = 0;
struct trace_state_variable *tsv;
char *name = 0;
struct cleanup *old_chain;
struct value *val;
struct ui_file *stb;
- struct value_print_options opts;
struct type *type;
struct ui_out *uiout = current_uiout;
int section,
struct objfile *objfile)
{
- struct obj_section *obj_section;
struct msym_bunch *newobj;
struct minimal_symbol *msymbol;
mn10300_frame_prev_register (struct frame_info *this_frame,
void **this_prologue_cache, int regnum)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (this_frame));
struct mn10300_prologue *p
= mn10300_analyze_frame_prologue (this_frame, this_prologue_cache);
CORE_ADDR frame_base = mn10300_frame_base (this_frame, this_prologue_cache);
- int reg_size = register_size (get_frame_arch (this_frame), regnum);
if (regnum == E_SP_REGNUM)
return frame_unwind_got_constant (this_frame, regnum, frame_base);
struct regcache *regcache,
int regnum, const gdb_byte *buffer)
{
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
if (MSP430_NUM_REGS <= regnum && regnum < MSP430_NUM_TOTAL_REGS)
{
{
/* Special output handling for 38-bit context register. */
unsigned char *buff;
- unsigned int *bytes, i, regsize;
+ unsigned int i, regsize;
regsize = register_size (gdbarch, regnum);
buff = (unsigned char *) alloca (regsize);
- bytes = XALLOCAVEC (unsigned int, regsize);
deprecated_frame_register_read (frame, regnum, buff);
Note that this number should not be too large, else we can
potentially end up iterating through unmapped memory. */
int ninsns, max_insns = 50;
- int regno;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
unsigned long mach = gdbarch_bfd_arch_info (gdbarch)->mach;
- int is_r2 = (mach == bfd_mach_nios2r2);
/* Does the frame set up the FP register? */
int base_reg = 0;
for (argnum = 0; argnum < nargs; argnum++)
{
const gdb_byte *val;
- gdb_byte valbuf[MAX_REGISTER_SIZE];
struct value *arg = args[argnum];
struct type *arg_type = check_typedef (value_type (arg));
int len = TYPE_LENGTH (arg_type);
- enum type_code typecode = TYPE_CODE (arg_type);
val = value_contents (arg);
struct gdbarch *gdbarch = get_frame_arch (this_frame);
CORE_ADDR current_pc;
struct nios2_unwind_cache *cache;
- int i;
if (*this_prologue_cache)
return (struct nios2_unwind_cache *) *this_prologue_cache;
CORE_ADDR stack_addr;
struct trad_frame_cache *this_trad_cache;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
- int num_regs = gdbarch_num_regs (gdbarch);
if (*this_cache != NULL)
return (struct trad_frame_cache *) *this_cache;
struct frame_info *this_frame, void **cache)
{
gdb_byte dummy[4];
- struct obj_section *s;
CORE_ADDR pc = get_frame_address_in_block (this_frame);
/* Use the stub unwinder for unreadable code. */
{
struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep;
- int register_bytes, i;
+ int i;
struct tdesc_arch_data *tdesc_data = NULL;
const struct target_desc *tdesc = info.target_desc;
struct regcache *regcache, int regnum)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- const int sp_regnum = gdbarch_sp_regnum (gdbarch);
const int num_regs = gdbarch_num_regs (gdbarch);
int current_regnum;
CORE_ADDR current_address;
{
struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct trad_frame_cache *cache;
CORE_ADDR addr, base, func;
gdb_byte buf[PPC_INSN_SIZE];
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
add_new_registry (eventregistry_object **registryp, char *name)
{
- int result;
-
*registryp = create_eventregistry_object ();
if (*registryp == NULL)
static char *keywords[] = { "frame", "internal", NULL };
struct finish_breakpoint_object *self_bpfinish =
(struct finish_breakpoint_object *) self;
- int type = bp_breakpoint;
PyObject *frame_obj = NULL;
int thread;
struct frame_info *frame = NULL; /* init for gcc -Wall */
{
struct breakpoint *bp_stopped = (struct breakpoint *) args;
PyObject *py_bp = (PyObject *) b->py_bp_object;
- struct gdbarch *garch = b->gdbarch ? b->gdbarch : get_current_arch ();
/* Trigger out_of_scope if this is a FinishBreakpoint and its frame is
not anymore in the current callstack. */
const struct language_defn *language)
{
int should_print = 0;
- int local_indent = (4 * indent);
-
- /* Never set an indent level for common_val_print if MI. */
- if (ui_out_is_mi_like_p (out))
- local_indent = 0;
/* MI does not print certain values, differentiated by type,
depending on what ARGS_TYPE indicates. Test type against option.
buffer = (const gdb_byte *) pybuf.buf;
buf_len = pybuf.len;
#else
- const void *vbuffer;
-
if (! PyArg_ParseTupleAndKeywords (args, kw, "Os#|O", keywords,
&addr_obj, &buffer, &buf_len,
&length_obj))
create_inferior_call_event_object (inferior_call_kind flag, ptid_t ptid,
CORE_ADDR addr)
{
- int pid;
- long tid, lwp;
PyObject *event;
PyObject *ptid_obj = NULL;
PyObject *addr_obj = NULL;
static PyObject *
thpy_get_ptid (PyObject *self, void *closure)
{
- int pid;
- long tid, lwp;
thread_object *thread_obj = (thread_object *) self;
THPY_REQUIRE_VALID (thread_obj);
struct symtab *symtab;
gdb_py_longest py_line;
struct linetable_entry *best_entry = NULL;
- linetable_entry_object *result;
VEC (CORE_ADDR) *pcs = NULL;
PyObject *tuple;
Py_ssize_t index;
PyObject *source_list, *source_dict, *line;
struct linetable_entry *item;
- Py_ssize_t list_size;
LTPY_REQUIRE_VALID (self, symtab);
ltpy_is_valid (PyObject *self, PyObject *args)
{
struct symtab *symtab = NULL;
- linetable_object *obj = (linetable_object *) self;
symtab = symtab_object_to_symtab (get_symtab (self));
{
ltpy_iterator_object *iter_obj = (ltpy_iterator_object *) self;
struct symtab *symtab;
- int index;
PyObject *obj;
struct linetable_entry *item;
symtab_and_line_to_sal_object (struct symtab_and_line sal)
{
sal_object *sal_obj;
- int success = 0;
sal_obj = PyObject_New (sal_object, &sal_object_type);
if (sal_obj)
if (PyObject_HasAttrString (pyo, attr_name))
{
PyObject *pyo_value = PyObject_GetAttrString (pyo, attr_name);
- struct value *value;
if (pyo_value != NULL && pyo_value != Py_None)
{
{
struct ui_file *strfile = mem_fileopen ();
unwind_info_object *unwind_info = (unwind_info_object *) self;
- pending_frame_object *pending_frame
- = (pending_frame_object *) (unwind_info->pending_frame);
PyObject *result;
fprintf_unfiltered (strfile, "Frame ID: ");
py_varobj_get_iterator (struct varobj *var, PyObject *printer)
{
PyObject *children;
- int i;
PyObject *iter;
struct py_varobj_iter *py_iter;
struct cleanup *back_to = varobj_ensure_python_env (var);
static void
ravenscar_inferior_created (struct target_ops *target, int from_tty)
{
- struct ravenscar_arch_ops *ops;
if (!ravenscar_task_support
|| gdbarch_ravenscar_ops (target_gdbarch ()) == NULL
else
{
/* Argument can fit in one register. No problem. */
- int adj = gdbarch_byte_order (gdbarch)
- == BFD_ENDIAN_BIG ? reg_size - len : 0;
gdb_byte word[MAX_REGISTER_SIZE];
memset (word, 0, reg_size);
else
{
/* Argument can fit in one register. No problem. */
- int adj = gdbarch_byte_order (gdbarch)
- == BFD_ENDIAN_BIG ? reg_size - len : 0;
gdb_byte word[MAX_REGISTER_SIZE];
memset (word, 0, reg_size);
int index;
int last_breakpoint = 0; /* Defaults to 0 (no breakpoints placed). */
const int atomic_sequence_length = 16; /* Instruction sequence length. */
- int opcode; /* Branch instruction's OPcode. */
int bc_insn_count = 0; /* Conditional branch instruction count. */
/* Assume all atomic sequences start with a lwarx/ldarx instruction. */
{
ULONGEST tdw;
enum register_status ret;
- int i;
regcache_supply_regset (regset, regcache, regnum, regs, len);
ret = regcache_cooked_read_unsigned (regcache, S390_TDB_DWORD0_REGNUM, &tdw);
s390_frame_prev_register (struct frame_info *this_frame,
void **this_prologue_cache, int regnum)
{
- struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct s390_unwind_cache *info
= s390_frame_unwind_cache (this_frame, this_prologue_cache);
struct dwarf2_frame_state_reg *reg,
struct frame_info *this_frame)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
/* The condition code (and thus PSW mask) is call-clobbered. */
if (regnum == S390_PSWM_REGNUM)
reg->how = DWARF2_FRAME_REG_UNDEFINED;
static int
s390_record_vr (struct gdbarch *gdbarch, struct regcache *regcache, int i)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
if (i < 16)
{
if (record_full_arch_list_add_reg (regcache, S390_F0_REGNUM + i))
s390_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
CORE_ADDR addr)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
uint16_t insn[3] = {0};
/* Instruction as bytes. */
uint8_t ibyte[6];
enum type_code typecode = TYPE_CODE (arg_type);
const gdb_byte *val = value_contents (arg);
int downward_offset = 0;
- int odd_sized_struct_p;
int arg_last_part_p = 0;
arglen = TYPE_LENGTH (arg_type);
- odd_sized_struct_p = (arglen > SCORE_REGSIZE
- && arglen % SCORE_REGSIZE != 0);
/* If a arg should be aligned to 8 bytes (long long or double),
the value should be put to even register numbers. */
int fp_offset_p = 0;
int inst_len = 0;
- CORE_ADDR prev_pc = -1;
-
sp = get_frame_register_unsigned (this_frame, SCORE_SP_REGNUM);
fp = get_frame_register_unsigned (this_frame, SCORE_FP_REGNUM);
- for (; cur_pc < pc; prev_pc = cur_pc, cur_pc += inst_len)
+ for (; cur_pc < pc; cur_pc += inst_len)
{
inst_t *inst = NULL;
/* addi! r2, offset */
if (pc - cur_pc >= 2)
{
- unsigned int save_v = inst->v;
inst_t *inst2;
cur_pc += inst->len;
/* addi r2, offset */
if (pc - cur_pc >= 2)
{
- unsigned int save_v = inst->v;
inst_t *inst2;
cur_pc += inst->len;
struct gdbarch *gdbarch = get_regcache_arch (regcache);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int len = TYPE_LENGTH (type);
- int return_register = R0_REGNUM;
- int offset;
if (len <= 4)
{
int insn;
int r0_val = 0;
int insn_size;
- int gdb_register_number;
- int register_number;
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
cache->sp_offset = 0;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int stack_offset, stack_alloc;
int int_argreg;
- int float_argreg;
- int double_argreg;
int float_arg_index = 0;
int double_arg_index = 0;
int argnum;
in eight registers available. Loop thru args from first to last. */
int_argreg = ARG0_REGNUM;
- float_argreg = gdbarch_fp0_regnum (gdbarch);
- double_argreg = DR0_REGNUM;
for (argnum = 0, stack_offset = 0; argnum < nargs; argnum++)
{
gdb_byte *valbuf)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int len = TYPE_LENGTH (type);
if (TYPE_CODE (type) == TYPE_CODE_FLT)
unsigned char *raw_buffer;
double flt; /* Double extracted from raw hex data. */
int inv;
- int j;
/* Allocate space for the float. */
raw_buffer = (unsigned char *)
{
struct section_offsets *offsets;
bfd *abfd = objfile->obfd;
- int i;
offsets = XCNEWVEC (struct section_offsets, objfile->num_sections);
darwin_read_exec_load_addr_from_dyld (struct darwin_info *info)
{
struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
- enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
int ptr_len = TYPE_LENGTH (ptr_type);
unsigned int image_info_size = ptr_len * 3;
int i;
{
gdb_byte buf[8];
LONGEST len;
- enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
/* Sanity check. */
static int
enable_break (void)
{
- enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
asection *interp_sect;
struct dsbt_info *info;
char *buf;
bfd *tmp_bfd = NULL;
CORE_ADDR addr;
- gdb_byte addr_buf[TIC6X_PTR_SIZE];
struct int_elf32_dsbt_loadmap *ldm;
int ret;
enable_break2 (void)
{
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
- int success = 0;
- char **bkpt_namep;
asection *interp_sect;
if (enable_break2_done)
const char *name;
CORE_ADDR addr;
CORE_ADDR got_value;
- struct int_elf32_fdpic_loadmap *ldm = 0;
struct symbol *sym;
/* Fetch the corresponding global pointer for the entry point. */
struct cleanup *old_chain, *usm_chain;
struct value *val = NULL;
CORE_ADDR pc, debug_base, lm = 0;
- int is_initial_ns;
struct frame_info *frame = get_current_frame ();
/* Do nothing if not using the probes interface. */
{
CORE_ADDR pc = start_pc;
unsigned long insn;
- int offset_stack_checking_sequence = 0;
int probing_loop = 0;
/* With GCC, all stack checking sequences begin with the same two
sparc64_linux_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
{
struct gdbarch *gdbarch = get_frame_arch (frame);
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
CORE_ADDR jb_addr;
gdb_byte buf[8];
static void
sparc32obsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
/* OpenBSD/sparc is very similar to NetBSD/sparc ELF. */
sparc32nbsd_elf_init_abi (info, gdbarch);
int mfc_cmd_opcode, mfc_cmd_tag, rclass_id, tclass_id;
int list_lsa, list_size, mfc_lsa, mfc_size;
ULONGEST mfc_ea;
- int list_valid_p, noop_valid_p, qw_valid_p, ea_valid_p, cmd_error_p;
+ int list_valid_p, qw_valid_p, ea_valid_p, cmd_error_p;
/* Decode contents of MFC Command Queue Context Save/Restore Registers.
See "Cell Broadband Engine Registers V1.3", section 3.3.2.1. */
mfc_lsa = spu_mfc_get_bitfield (mfc_cq_dw2, 0, 13);
mfc_size = spu_mfc_get_bitfield (mfc_cq_dw2, 14, 24);
- noop_valid_p = spu_mfc_get_bitfield (mfc_cq_dw2, 37, 37);
qw_valid_p = spu_mfc_get_bitfield (mfc_cq_dw2, 38, 38);
ea_valid_p = spu_mfc_get_bitfield (mfc_cq_dw2, 39, 39);
cmd_error_p = spu_mfc_get_bitfield (mfc_cq_dw2, 40, 40);
read_frame_local (struct symbol *sym, struct frame_info *frame,
struct frame_arg *argp)
{
- struct value *val = NULL;
-
argp->sym = sym;
argp->val = NULL;
argp->error = NULL;
symbol_file_add_separate (bfd *bfd, const char *name, int symfile_flags,
struct objfile *objfile)
{
- struct objfile *new_objfile;
struct section_addr_info *sap;
struct cleanup *my_cleanup;
sap = build_section_addr_info_from_objfile (objfile);
my_cleanup = make_cleanup_free_section_addr_info (sap);
- new_objfile = symbol_file_add_with_addrs
+ symbol_file_add_with_addrs
(bfd, name, symfile_flags, sap,
objfile->flags & (OBJF_REORDERED | OBJF_SHARED | OBJF_READNOW
| OBJF_USERLOADED),
struct objfile *objf = NULL;
struct cleanup *my_cleanups;
struct program_space *pspace = current_program_space;
- struct gdbarch *gdbarch = get_current_arch ();
dont_repeat ();
for (i = 0; i < linetable->nitems; ++i)
{
struct linetable_entry *item;
- struct cleanup *row_cleanup;
item = &linetable->item [i];
printf_filtered (_("%-6d %6d %s\n"), i, item->line,
struct symbol_cache *cache
= (struct symbol_cache *) program_space_data (pspace, symbol_cache_key);
int pass;
- size_t total_size;
if (cache == NULL)
return;
struct type *
basic_lookup_transparent_type (const char *name)
{
- struct symbol *sym;
- struct compunit_symtab *cust;
- const struct blockvector *bv;
struct objfile *objfile;
- struct block *block;
struct type *t;
/* Now search all the global symbols. Do the symtab's first, then
struct symbol_search **new_head,
struct symbol_search **new_tail)
{
- struct symbol_search **symbols, *symp, *old_next;
+ struct symbol_search **symbols, *symp;
int i, j, nunique;
gdb_assert (found != NULL && nfound > 0);
VEC(mem_region_s) *result;
struct mem_region *last_one, *this_one;
int ix;
- struct target_ops *t;
-
result = current_target.to_memory_map (¤t_target);
if (result == NULL)
return NULL;
void
target_detach (const char *args, int from_tty)
{
- struct target_ops* t;
-
if (gdbarch_has_global_breakpoints (target_gdbarch ()))
/* Don't remove global breakpoints here. They're removed on
disconnection from the target. */
void
target_resume (ptid_t ptid, int step, enum gdb_signal signal)
{
- struct target_ops *t;
-
target_dcache_invalidate ();
current_target.to_resume (¤t_target, ptid, step, signal);
static int
acquire_fileio_fd (struct target_ops *t, int fd)
{
- fileio_fh_t *fh, buf;
+ fileio_fh_t *fh;
gdb_assert (!is_closed_fileio_fh (fd));
void
target_store_registers (struct regcache *regcache, int regno)
{
- struct target_ops *t;
-
if (!may_write_registers)
error (_("Writing to registers is not allowed (regno %d)"), regno);
ptid_t current_ptid;
struct cleanup *old_chain;
const char *extra_info, *name, *target_id;
- int current_thread = -1;
struct inferior *inf;
int default_inf_num = current_inferior ()->num;
struct cleanup *chain2;
int core;
- if (ptid_equal (tp->ptid, current_ptid))
- current_thread = tp->global_num;
-
if (!should_print_thread (requested_threads, default_inf_num,
global_ids, pid, tp))
continue;
struct tic6x_unwind_cache *cache,
struct frame_info *this_frame)
{
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
unsigned long inst;
unsigned int src_reg, base_reg, dst_reg;
int i;
2nd one is optional. */
while (pc < current_pc)
{
- int offset = 0;
-
unsigned long inst = tic6x_fetch_instruction (gdbarch, pc);
if ((inst & 0x1ffc) == 0x1dc0 || (inst & 0x1ffc) == 0x1bc0
struct trad_frame_cache *this_cache,
CORE_ADDR func)
{
- CORE_ADDR pc = get_frame_register_unsigned (this_frame, 64);
CORE_ADDR sp = get_frame_register_unsigned (this_frame, 54);
/* Base address of register save area. */
CORE_ADDR stack_dest = sp;
int argreg = TILEGX_R0_REGNUM;
int i, j;
- int typelen, slacklen, alignlen;
+ int typelen, slacklen;
static const gdb_byte four_zero_words[16] = { 0 };
/* If struct_return is 1, then the struct return address will
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR next_addr;
CORE_ADDR prolog_end = end_addr;
- ULONGEST inst, inst2;
- LONGEST offset;
- int regnum;
gdb_byte instbuf[32 * TILEGX_BUNDLE_SIZE_IN_BYTES];
CORE_ADDR instbuf_start;
unsigned int instbuf_size;
if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
{
- ULONGEST inst, inst2;
CORE_ADDR addr = func_end - TILEGX_BUNDLE_SIZE_IN_BYTES;
/* FIXME: Find the actual epilogue. */
struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct tilegx_frame_cache *cache;
CORE_ADDR current_pc;
- int i;
if (*this_cache)
return (struct tilegx_frame_cache *) *this_cache;
ULONGEST offset = 0;
#define MAX_TRACE_UPLOAD 2000
gdb_byte buf[MAX_TRACE_UPLOAD];
- int written;
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
/* If the target is to save the data to a file on its own, then just
struct collection_list *tracepoint_list,
struct collection_list *stepping_list)
{
- char *default_collect_line = NULL;
struct command_line *actions;
- struct command_line *default_collect_action = NULL;
int frame_reg;
LONGEST frame_offset;
struct cleanup *back_to, *return_chain;
for (ix = 0; VEC_iterate (breakpoint_p, tp_vec, ix, b); ix++)
{
- struct tracepoint *t = (struct tracepoint *) b;
- struct bp_location *loc;
-
if (b->enable_state == bp_enabled)
any_enabled = 1;
print_one_static_tracepoint_marker (int count,
struct static_tracepoint_marker *marker)
{
- struct command_line *l;
struct symbol *sym;
char wrap_indent[80];
void
tui_enable (void)
{
- struct interp *interp;
-
if (tui_active)
return;
const char *err)
{
struct type *t;
- struct value *v;
int i;
- int nbases;
*argp = coerce_array (*argp);
int method_oload_champ = -1;
int src_method_oload_champ = -1;
int ext_method_oload_champ = -1;
- int src_and_ext_equal = 0;
/* The measure for the current best match. */
struct badness_vector *method_badness = NULL;
switch (compare_badness (ext_method_badness, src_method_badness))
{
case 0: /* Src method and xmethod are equally good. */
- src_and_ext_equal = 1;
/* If src method and xmethod are equally good, then
xmethod should be the winner. Hence, fall through to the
case where a xmethod is better than the source
{
int ix;
int fn_count;
- int xm_worker_vec_n = VEC_length (xmethod_worker_ptr, xm_worker_vec);
/* A measure of how good an overloaded instance is. */
struct badness_vector *bv;
/* Index of best overloaded function. */
value_contents_copy_raw (struct value *dst, int dst_offset,
struct value *src, int src_offset, int length)
{
- range_s *r;
int src_bit_offset, dst_bit_offset, bit_length;
struct gdbarch *arch = get_value_arch (src);
int unit_size = gdbarch_addressable_memory_unit_size (arch);
static struct type *last_tlb_type = NULL;
struct type *dword_ptr_type, *dword32_type, *void_ptr_type;
struct type *peb_ldr_type, *peb_ldr_ptr_type;
- struct type *peb_type, *peb_ptr_type, *list_type, *list_ptr_type;
+ struct type *peb_type, *peb_ptr_type, *list_type;
struct type *module_list_ptr_type;
struct type *tib_type, *seh_type, *tib_ptr_type, *seh_ptr_type;
list_type = arch_composite_type (gdbarch, NULL, TYPE_CODE_STRUCT);
TYPE_NAME (list_type) = xstrdup ("list");
- list_ptr_type = arch_type (gdbarch, TYPE_CODE_PTR,
- TYPE_LENGTH (void_ptr_type), NULL);
-
module_list_ptr_type = void_ptr_type;
append_composite_type_field (list_type, "forward_list",
const struct btrace_config *conf)
{
struct btrace_target_info *tinfo;
- struct gdbarch *gdbarch;
errno = 0;
tinfo = linux_enable_btrace (ptid, conf);
int n_scnum,
struct objfile *objfile)
{
- int section = secnum_to_section (n_scnum, objfile);
if (name[0] == '.')
++name;
const char *filestring = NULL;
const char *namestring;
- int past_first_source_file = 0;
bfd *abfd;
asection *bfd_sect;
unsigned int nsyms;
int ilen, islots, is;
xtensa_opcode opc;
int insn_num = 0;
- int fail = 0;
void (*func) (struct gdbarch *, int, int, int, CORE_ADDR);
uint32_t at, as, offset;
{
struct gdbarch_tdep *tdep;
struct gdbarch *gdbarch;
- struct xtensa_abi_handler *abi_handler;
DEBUGTRACE ("gdbarch_init()\n");
void
_initialize_xtensa_tdep (void)
{
- struct cmd_list_element *c;
-
gdbarch_register (bfd_arch_xtensa, xtensa_gdbarch_init, xtensa_dump_tdep);
xtensa_init_reggroups ();