+2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
+
+ * ada-lang.c (ada_collect_symbol_completion_matches): Remove
+ unused variables.
+ (ada_is_redundant_range_encoding): Likewise.
+ * ada-varobj.c (ada_varobj_get_value_of_array_variable):
+ Likewise.
+ * alpha-tdep.c (alpha_software_single_step): Likewise.
+ * arm-tdep.c (_initialize_arm_tdep): Likewise.
+ * auto-load.c (info_auto_load_cmd): Likewise.
+ * break-catch-syscall.c (insert_catch_syscall): Likewise.
+ (remove_catch_syscall): Likewise.
+ * breakpoint.c (condition_completer): Likewise.
+ (clear_command): Likewise.
+ (update_breakpoint_locations): Likewise.
+ * btrace.c (btrace_disable): Likewise.
+ (btrace_teardown): Likewise.
+ (btrace_maint_update_pt_packets): Likewise.
+ (maint_btrace_clear_cmd): Likewise.
+ * cli/cli-decode.c (lookup_cmd_1): Likewise.
+ (lookup_cmd_composition): Likewise.
+ * cli/cli-dump.c (scan_filename): Likewise.
+ (restore_command): Likewise.
+ * compile/compile-loc2c.c (compute_stack_depth): Likewise.
+ * compile/compile-object-load.c (compile_object_load): Likewise.
+ * compile/compile-object-run.c (compile_object_run): Likewise.
+ * compile/compile.c (compile_to_object): Likewise.
+ * completer.c (filename_completer): Likewise.
+ (complete_files_symbols): Likewise.
+ (complete_expression): Likewise.
+ * corelow.c (core_open): Likewise.
+ * ctf.c (ctf_start): Likewise.
+ (ctf_write_status): Likewise.
+ (ctf_write_uploaded_tsv): Likewise.
+ (ctf_write_definition_end): Likewise.
+ (ctf_open_dir): Likewise.
+ (ctf_xfer_partial): Likewise.
+ (ctf_trace_find): Likewise.
+ * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
+ Likewise.
+ * dwarf2loc.c (allocate_piece_closure): Likewise.
+ (indirect_pieced_value): Likewise.
+ (dwarf2_evaluate_loc_desc_full): Likewise.
+ * dwarf2read.c (dw2_expand_marked_cus): Likewise.
+ (dw2_expand_symtabs_matching): Likewise.
+ (dw2_map_symbol_filenames): Likewise.
+ (read_and_check_comp_unit_head): Likewise.
+ (read_cutu_die_from_dwo): Likewise.
+ (lookup_dwo_unit): Likewise.
+ (read_comp_units_from_section): Likewise.
+ (dwarf2_compute_name): Likewise.
+ (handle_DW_AT_stmt_list): Likewise.
+ (create_cus_hash_table): Likewise.
+ (create_dwp_v2_section): Likewise.
+ (dwarf2_rnglists_process): Likewise.
+ (dwarf2_ranges_process): Likewise.
+ (dwarf2_record_block_ranges): Likewise.
+ (is_vtable_name): Likewise.
+ (read_formatted_entries): Likewise.
+ (skip_form_bytes): Likewise.
+ * elfread.c (elf_symtab_read): Likewise.
+ * exec.c (exec_file_command): Likewise.
+ * f-valprint.c (f_val_print): Likewise.
+ (info_common_command_for_block): Likewise.
+ * guile/guile.c (initialize_scheme_side): Likewise.
+ * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
+ * guile/scm-cmd.c (cmdscm_completer): Likewise.
+ (gdbscm_register_command_x): Likewise.
+ * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
+ * guile/scm-param.c (gdbscm_parameter_value): Likewise.
+ * guile/scm-ports.c (file_port_magic): Likewise.
+ * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
+ (ppscm_pretty_print_one_value): Likewise.
+ (ppscm_print_children): Likewise.
+ * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
+ * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
+ * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
+ * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
+ * i386-tdep.c (i386_register_reggroup_p): Likewise.
+ * infcmd.c (run_command_1): Likewise.
+ (until_next_fsm_clean_up): Likewise.
+ * linespec.c (linespec_complete): Likewise.
+ (find_label_symbols): Likewise.
+ * m2-valprint.c (m2_val_print): Likewise.
+ * memattr.c (require_user_regions): Likewise.
+ (lookup_mem_region): Likewise.
+ (disable_mem_command): Likewise.
+ (mem_delete): Likewise.
+ * mep-tdep.c (mep_register_name): Likewise.
+ (mep_analyze_prologue): Likewise.
+ * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
+ * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
+ * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
+ * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
+ * minidebug.c (lzma_open): Likewise.
+ * minsyms.c (lookup_minimal_symbol): Likewise.
+ * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
+ * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
+ (mips_o64_return_value): Likewise.
+ (mips_single_step_through_delay): Likewise.
+ (_initialize_mips_tdep): Likewise.
+ * nios2-tdep.c (nios2_push_dummy_call): Likewise.
+ (nios2_software_single_step): Likewise.
+ * parse.c (find_minsym_type_and_address): Likewise.
+ * psymtab.c (psym_relocate): Likewise.
+ * python/py-breakpoint.c (bppy_get_commands): Likewise.
+ (gdbpy_breakpoint_modified): Likewise.
+ * python/py-infevents.c (create_inferior_call_event_object):
+ Likewise.
+ * python/py-record-btrace.c (btpy_list_item): Likewise.
+ * python/py-type.c (typy_str): Likewise.
+ * python/py-value.c (valpy_call): Likewise.
+ * python/python.c (do_start_initialization): Likewise.
+ * record-btrace.c (record_btrace_insn_history_range): Likewise.
+ (record_btrace_call_history_range): Likewise.
+ (record_btrace_record_method): Likewise.
+ (record_btrace_xfer_partial): Likewise.
+ (btrace_get_frame_function): Likewise.
+ * record-full.c (record_full_open): Likewise.
+ * record.c (get_context_size): Likewise.
+ * registry.h (DEFINE_REGISTRY): Likewise.
+ * remote-fileio.c (remote_fileio_request): Likewise.
+ * remote.c (remote_update_thread_list): Likewise.
+ (remote_check_symbols): Likewise.
+ (remote_commit_resume): Likewise.
+ (remote_interrupt): Likewise.
+ (remote_insert_breakpoint): Likewise.
+ (compare_sections_command): Likewise.
+ * rust-exp.y (super_name): Likewise.
+ (lex_string): Likewise.
+ (convert_ast_to_type): Likewise.
+ (convert_ast_to_expression): Likewise.
+ * rust-lang.c (rust_print_struct_def): Likewise.
+ (rust_print_type): Likewise.
+ (rust_evaluate_subexp): Likewise.
+ * rx-tdep.c (rx_register_type): Likewise.
+ * ser-event.c (serial_event_clear): Likewise.
+ * serial.c (serial_open): Likewise.
+ * spu-tdep.c (spu_overlay_new_objfile): Likewise.
+ * symfile.c (section_is_overlay): Likewise.
+ (overlay_unmapped_address): Likewise.
+ (overlay_mapped_address): Likewise.
+ (simple_overlay_update_1): Likewise.
+ (simple_overlay_update): Likewise.
+ * symtab.c (symbol_find_demangled_name): Likewise.
+ (search_symbols): Likewise.
+ * target-descriptions.c (tdesc_predefined_type): Likewise.
+ * target.c (target_commit_resume): Likewise.
+ * thread.c (print_selected_thread_frame): Likewise.
+ * top.c (new_ui_command): Likewise.
+ (gdb_readline_no_editing): Likewise.
+ * tracefile-tfile.c (tfile_open): Likewise.
+ * tracepoint.c (create_tsv_from_upload): Likewise.
+ * utils.c (quit): Likewise.
+ (defaulted_query): Likewise.
+ * valarith.c (value_concat): Likewise.
+ * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
+ * xml-tdesc.c (target_fetch_description_xml): Likewise.
+ * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
+ (xtensa_pseudo_register_write): Likewise.
+
2017-12-04 Tom Tromey <tom@tromey.com>
* NEWS: Mention Rust trait object inspection.
struct minimal_symbol *msymbol;
struct objfile *objfile;
const struct block *b, *surrounding_static_block = 0;
- int i;
struct block_iterator iter;
struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
ada_is_redundant_range_encoding (struct type *range_type,
struct type *encoding_type)
{
- struct type *fixed_range_type;
const char *bounds_str;
int n;
LONGEST lo, hi;
struct type *type,
struct value_print_options *opts)
{
- char *result;
const int numchild = ada_varobj_get_array_number_of_children (value, type);
/* If we have a string, provide its contents in the "value" field.
std::vector<CORE_ADDR>
alpha_software_single_step (struct regcache *regcache)
{
- struct gdbarch *gdbarch = regcache->arch ();
- CORE_ADDR pc;
-
- pc = alpha_next_pc (regcache, regcache_read_pc (regcache));
+ CORE_ADDR pc = alpha_next_pc (regcache, regcache_read_pc (regcache));
return {pc};
}
_initialize_arm_tdep (void)
{
long length;
- const char *setname;
- const char *setdesc;
int i, j;
char regdesc[1024], *rdptr = regdesc;
size_t rest = sizeof (regdesc);
info_auto_load_cmd (const char *args, int from_tty)
{
struct cmd_list_element *list;
- struct cleanup *infolist_chain;
struct ui_out *uiout = current_uiout;
ui_out_emit_tuple tuple_emitter (uiout, "infolist");
{
for (int iter : c->syscalls_to_be_caught)
{
- int elem;
-
if (iter >= inf_data->syscalls_counts.size ())
inf_data->syscalls_counts.resize (iter + 1);
++inf_data->syscalls_counts[iter];
{
for (int iter : c->syscalls_to_be_caught)
{
- int elem;
if (iter >= inf_data->syscalls_counts.size ())
/* Shouldn't happen. */
continue;
{
int len;
struct breakpoint *b;
- VEC (char_ptr) *result = NULL;
if (text[0] == '$')
{
{
struct breakpoint *b;
int default_match;
- int i;
std::vector<symtab_and_line> decoded_sals;
symtab_and_line last_sal;
gdb::array_view<const symtab_and_line> sals,
gdb::array_view<const symtab_and_line> sals_end)
{
- int i;
struct bp_location *existing_locations;
if (!sals_end.empty () && (sals.size () != 1 || sals_end.size () != 1))
btrace_disable (struct thread_info *tp)
{
struct btrace_thread_info *btp = &tp->btrace;
- int errcode = 0;
if (btp->target == NULL)
return;
btrace_teardown (struct thread_info *tp)
{
struct btrace_thread_info *btp = &tp->btrace;
- int errcode = 0;
if (btp->target == NULL)
return;
static void
btrace_maint_update_pt_packets (struct btrace_thread_info *btinfo)
{
- volatile struct gdb_exception except;
struct pt_packet_decoder *decoder;
struct btrace_data_pt *pt;
struct pt_config config;
static void
maint_btrace_clear_cmd (const char *args, int from_tty)
{
- struct btrace_thread_info *btinfo;
struct thread_info *tp;
if (args != NULL && *args != 0)
struct cmd_list_element **result_list, int ignore_help_classes)
{
char *command;
- int len, tmp, nfound;
+ int len, nfound;
struct cmd_list_element *found, *c;
const char *line = *text;
struct cmd_list_element **cmd)
{
char *command;
- int len, tmp, nfound;
+ int len, nfound;
struct cmd_list_element *cur_list;
struct cmd_list_element *prev_cmd;
scan_filename (const char **cmd, const char *defname)
{
gdb::unique_xmalloc_ptr<char> filename;
- char *fullname;
/* FIXME: Need to get the ``/a(ppend)'' flag from somewhere. */
restore_command (const char *args, int from_tty)
{
struct callback_data data;
- bfd *ibfd;
int binary_flag = 0;
if (!target_has_execution)
int initial_depth,
std::vector<struct insn_info> *info)
{
- unsigned char *set;
std::vector<int> to_do;
int stack_depth, i;
{
struct cleanup *cleanups;
struct setup_sections_data setup_sections_data;
- CORE_ADDR addr, regs_addr, out_value_addr = 0;
+ CORE_ADDR regs_addr, out_value_addr = 0;
struct symbol *func_sym;
struct type *func_type;
struct bound_minimal_symbol bmsym;
long storage_needed;
asymbol **symbol_table, **symp;
long number_of_symbols, missing_symbols;
- struct type *dptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
- unsigned dptr_type_len = TYPE_LENGTH (dptr_type);
struct compile_module *retval;
struct type *regs_type, *out_value_type = NULL;
char **matching;
compile_object_run (struct compile_module *module)
{
struct value *func_val;
- struct frame_id dummy_id;
- struct cleanup *cleanups;
struct do_module_cleanup *data;
const char *objfile_name_s = objfile_name (module->objfile);
int dtor_found, executed = 0;
int argc;
char **argv;
int ok;
- FILE *src;
struct gdbarch *gdbarch = get_current_arch ();
char *triplet_rx;
char *error_message;
const char *text, const char *word)
{
int subsequent_name;
- VEC (char_ptr) *return_val = NULL;
subsequent_name = 0;
while (1)
complete_files_symbols (completion_tracker &tracker,
const char *text, const char *word)
{
- int ix;
completion_list fn_list;
const char *p;
int quote_found = 0;
if (!fn_list.empty () && !tracker.have_completions ())
{
- char *fn;
-
/* If we only have file names as possible completion, we should
bring them in sync with what rl_complete expects. The
problem is that if the user types "break /foo/b TAB", and the
}
else if (fieldname && code != TYPE_CODE_UNDEF)
{
- VEC (char_ptr) *result;
struct cleanup *cleanup = make_cleanup (xfree, fieldname);
collect_symbol_completion_matches_type (tracker, fieldname, fieldname,
const char *p;
int siggy;
struct cleanup *old_chain;
- char *temp;
int scratch_chan;
int flags;
{
struct ctf_trace_file_writer *writer
= (struct ctf_trace_file_writer *) self;
- int i;
mode_t hmode = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH;
/* Create DIRNAME. */
struct ctf_trace_file_writer *writer
= (struct ctf_trace_file_writer *) self;
uint32_t id;
- int32_t int32;
ctf_save_write_metadata (&writer->tcs, "\n");
ctf_save_write_metadata (&writer->tcs,
= (struct ctf_trace_file_writer *) self;
int32_t int32;
int64_t int64;
- unsigned int len;
const gdb_byte zero = 0;
/* Event Id. */
static void
ctf_write_definition_end (struct trace_file_writer *self)
{
- struct ctf_trace_file_writer *writer
- = (struct ctf_trace_file_writer *) self;
-
self->ops->frame_ops->end (self);
}
ctf_open_dir (const char *dirname)
{
struct bt_iter_pos begin_pos;
- struct bt_iter_pos *pos;
unsigned int count, i;
struct bt_ctf_event_decl * const *list;
for (i = 0; i < count; i++)
if (strcmp ("register", bt_ctf_get_decl_event_name (list[i])) == 0)
{
- unsigned int j;
const struct bt_ctf_field_decl * const *field_list;
const struct bt_declaration *decl;
if (get_traceframe_number () != -1)
{
struct bt_iter_pos *pos;
- int i = 0;
enum target_xfer_status res;
/* Records the lowest available address of all blocks that
intersects the requested range. */
ULONGEST amt;
uint64_t maddr;
uint16_t mlen;
- enum bfd_endian byte_order
- = gdbarch_byte_order (target_gdbarch ());
const struct bt_definition *scope;
const struct bt_definition *def;
struct bt_ctf_event *event
{
const struct bt_definition *array
= bt_ctf_get_field (event, scope, "contents");
- const struct bt_declaration *decl
- = bt_ctf_get_decl_from_def (array);
gdb_byte *contents;
int k;
ctf_trace_find (struct target_ops *self, enum trace_find_type type, int num,
CORE_ADDR addr1, CORE_ADDR addr2, int *tpp)
{
- int ret = -1;
int tfnum = 0;
int found = 0;
- struct bt_iter_pos pos;
if (num == -1)
{
while (1)
{
- int id;
struct bt_ctf_event *event;
const char *name;
{
CORE_ADDR end_pc;
bfd_byte data;
- int err;
const char *spacer = "";
/* Build the opcodes using a temporary stream so we can
struct frame_info *frame)
{
struct piece_closure *c = new piece_closure;
- int i;
c->refc = 1;
c->per_cu = per_cu;
= (struct piece_closure *) value_computed_closure (value);
struct type *type;
struct frame_info *frame;
- struct dwarf2_locexpr_baton baton;
int i, bit_length;
LONGEST bit_offset;
struct dwarf_expr_piece *piece = NULL;
{
struct piece_closure *c;
ULONGEST bit_size = 0;
- int i;
for (dwarf_expr_piece &piece : ctx.pieces)
bit_size += piece.size;
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
search_domain kind)
{
- const char *name;
offset_type *vec, vec_len, vec_idx;
bool global_seen = false;
enum search_domain kind)
{
int i;
- offset_type iter;
dw2_setup (objfile);
for (int i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
{
- int j;
struct dwarf2_per_cu_data *per_cu = dw2_get_cu (i);
struct quick_file_names *file_data;
void **slot;
rcuh_kind section_kind)
{
const gdb_byte *beg_of_comp_unit = info_ptr;
- bfd *abfd = get_section_bfd_owner (section);
header->sect_off = (sect_offset) (beg_of_comp_unit - section->buffer);
struct dwarf2_section_info *section;
bfd *abfd;
const gdb_byte *begin_info_ptr, *info_ptr;
- ULONGEST signature; /* Or dwo_id. */
struct attribute *comp_dir, *stmt_list, *low_pc, *high_pc, *ranges;
int i,num_extra_attrs;
struct dwarf2_section_info *dwo_abbrev_section;
struct die_info *comp_unit_die)
{
struct dwarf2_cu *cu = this_cu->cu;
- struct attribute *attr;
ULONGEST signature;
struct dwo_unit *dwo_unit;
const char *comp_dir, *dwo_name;
struct dwarf2_per_cu_data ***all_comp_units)
{
const gdb_byte *info_ptr;
- bfd *abfd = get_section_bfd_owner (section);
if (dwarf_read_debug)
fprintf_unfiltered (gdb_stdlog, "Reading %s for %s\n",
{
if (die_needs_namespace (die, cu))
{
- long length;
const char *prefix;
const char *canonical_name = NULL;
struct attribute *attr;
struct line_header line_header_local;
hashval_t line_header_local_hash;
- unsigned u;
void **slot;
int decode_mapping;
htab_t &cus_htab)
{
struct objfile *objfile = dwarf2_per_objfile->objfile;
- const struct dwarf2_section_info *abbrev_section = &dwo_file.sections.abbrev;
const gdb_byte *info_ptr, *end_ptr;
dwarf2_read_section (objfile, §ion);
if (sectp == NULL
|| offset + size > bfd_get_section_size (sectp))
{
- bfd *abfd = sectp->owner;
-
error (_("Dwarf Error: Bad DWP V2 section info, doesn't fit"
" in section %s [in module %s]"),
sectp ? bfd_section_name (abfd, sectp) : "<unknown>",
Callback &&callback)
{
struct objfile *objfile = cu->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
- struct comp_unit_head *cu_header = &cu->header;
bfd *obfd = objfile->obfd;
- unsigned int addr_size = cu_header->addr_size;
- CORE_ADDR mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1));
/* Base address selection entry. */
CORE_ADDR base;
int found_base;
- unsigned int dummy;
const gdb_byte *buffer;
- CORE_ADDR low = 0;
- CORE_ADDR high = 0;
CORE_ADDR baseaddr;
bool overflow = false;
Callback &&callback)
{
struct objfile *objfile = cu->objfile;
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
struct comp_unit_head *cu_header = &cu->header;
bfd *obfd = objfile->obfd;
unsigned int addr_size = cu_header->addr_size;
attr = dwarf2_attr (die, DW_AT_ranges, cu);
if (attr)
{
- bfd *obfd = objfile->obfd;
/* DW_AT_ranges_base does not apply to DIEs from the DWO skeleton.
We take advantage of the fact that DW_AT_ranges does not appear
in DW_TAG_compile_unit of DWO files. */
is_vtable_name (const char *name, struct dwarf2_cu *cu)
{
static const char vptr[] = "_vptr";
- static const char vtable[] = "vtable";
/* Look for the C++ form of the vtable. */
if (startswith (name, vptr) && is_cplus_marker (name[sizeof (vptr) - 1]))
ULONGEST data_count, datai;
const gdb_byte *buf = *bufp;
const gdb_byte *format_header_data;
- int i;
unsigned int bytes_read;
format_count = read_1_byte (abfd, buf);
default:
{
- complain:
complaint (&symfile_complaints,
_("invalid form 0x%x in `%s'"),
form, get_section_name (section));
/* Name of the last file symbol. This is either a constant string or is
saved on the objfile's filename cache. */
const char *filesymname = "";
- struct dbx_symfile_info *dbx = DBX_SYMFILE_INFO (objfile);
int stripped = (bfd_get_symcount (objfile->obfd) == 0);
int elf_make_msymbol_special_p
= gdbarch_elf_make_msymbol_special_p (gdbarch);
static void
exec_file_command (const char *args, int from_tty)
{
- char *filename;
-
if (from_tty && target_has_execution
&& !query (_("A program is being debugged already.\n"
"Are you sure you want to change the file? ")))
const struct value_print_options *options)
{
struct gdbarch *gdbarch = get_type_arch (type);
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
int printed_field = 0; /* Number of fields printed. */
struct type *elttype;
CORE_ADDR addr;
{
struct block_iterator iter;
struct symbol *sym;
- const char *name;
struct value_print_options opts;
get_user_print_options (&opts);
+2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
+
+ * regcache.c (registers_to_string): Remove unused variable.
+
2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
* inferiors.c (for_each_inferior_with_data): Remove.
for (int i = 0; i < tdesc->reg_defs.size (); ++i)
{
- struct reg *reg = tdesc->reg_defs[i];
-
if (regcache->register_status[i] == REG_VALID)
{
bin2hex (registers, buf, register_size (tdesc, i));
initialize_scheme_side (void)
{
char *boot_scm_path;
- char *msg;
guile_datadir = concat (gdb_datadir, SLASH_STRING, "guile", (char *) NULL);
boot_scm_path = concat (guile_datadir, SLASH_STRING, "gdb",
breakpoint_smob *bp_smob
= bpscm_get_valid_breakpoint_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
struct breakpoint *bp;
- long length;
SCM result;
bp = bp_smob->bp;
{
command_smob *c_smob/*obj*/ = (command_smob *) get_cmd_context (command);
SCM completer_result_scm;
- SCM text_scm, word_scm, result_scm;
+ SCM text_scm, word_scm;
gdb_assert (c_smob != NULL);
gdb_assert (gdbscm_is_procedure (c_smob->complete));
{
command_smob *c_smob
= cmdscm_get_command_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
- char *cmd_name, *pfx_name;
+ char *cmd_name;
struct cmd_list_element **cmd_list;
struct cmd_list_element *cmd = NULL;
gdbscm_frame_read_var (SCM self, SCM symbol_scm, SCM rest)
{
SCM keywords[] = { block_keyword, SCM_BOOL_F };
- int rc;
frame_smob *f_smob;
int block_arg_pos = -1;
SCM block_scm = SCM_UNDEFINED;
char *name;
SCM except_scm;
struct cmd_list_element *alias, *prefix, *cmd;
- const char *arg;
char *newarg;
int found = -1;
struct gdb_exception except = exception_none;
static SCM output_port_scm;
static SCM error_port_scm;
-/* Magic number to identify port ui-files.
- Actually, the address of this variable is the magic number. */
-static int file_port_magic;
-
/* Internal enum for specifying output port. */
enum oport { GDB_STDOUT, GDB_STDERR };
SCM matcher = scm_car (list);
SCM worker;
pretty_printer_smob *pp_smob;
- int rc;
if (!ppscm_is_pretty_printer (matcher))
{
*out_value = NULL;
TRY
{
- int rc;
pretty_printer_worker_smob *w_smob
= (pretty_printer_worker_smob *) SCM_SMOB_DATA (printer);
= (pretty_printer_worker_smob *) SCM_SMOB_DATA (printer);
int is_map, is_array, done_flag, pretty;
unsigned int i;
- SCM children, status;
+ SCM children;
SCM iter = SCM_BOOL_F; /* -Wall */
struct cleanup *cleanups;
done_flag = 0;
for (i = 0; i < options->print_max; ++i)
{
- int rc;
SCM scm_name, v_scm;
char *name;
SCM item = itscm_safe_call_next_x (iter, gdbscm_memory_error_p);
gdbscm_string_to_argv (SCM string_scm)
{
char *string;
- int i;
SCM result = SCM_EOL;
gdbscm_parse_function_args (FUNC_NAME, SCM_ARG1, NULL, "s",
gdbscm_sal_symtab (SCM self)
{
sal_smob *s_smob = stscm_get_valid_sal_smob_arg (self, SCM_ARG1, FUNC_NAME);
- const struct symtab_and_line *sal = &s_smob->sal;
return s_smob->symtab_scm;
}
type_smob *t_smob;
struct type *type;
SCM it_scm, result, progress, object;
- int field, rc;
+ int field;
it_scm = itscm_get_iterator_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
i_smob = (iterator_smob *) SCM_SMOB_DATA (it_scm);
{
va_list args;
const char *p;
- int i, have_rest, num_keywords, length, position;
+ int i, have_rest, num_keywords, position;
int have_optional = 0;
SCM status;
SCM rest = SCM_EOL;
const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int fp_regnum_p, mmx_regnum_p, xmm_regnum_p, mxcsr_regnum_p,
ymm_regnum_p, ymmh_regnum_p, ymm_avx512_regnum_p, ymmh_avx512_regnum_p,
- bndr_regnum_p, bnd_regnum_p, k_regnum_p, zmm_regnum_p, zmmh_regnum_p,
- zmm_avx512_regnum_p, mpx_ctrl_regnum_p, xmm_avx512_regnum_p,
+ bndr_regnum_p, bnd_regnum_p, zmm_regnum_p, zmmh_regnum_p,
+ mpx_ctrl_regnum_p, xmm_avx512_regnum_p,
avx512_p, avx_p, sse_p, pkru_regnum_p;
/* Don't include pseudo registers, except for MMX, in any register
struct ui_out *uiout = current_uiout;
struct target_ops *run_target;
int async_exec;
- CORE_ADDR pc;
dont_repeat ();
static void
until_next_fsm_clean_up (struct thread_fsm *self, struct thread_info *thread)
{
- struct until_next_fsm *sm = (struct until_next_fsm *) self;
-
delete_longjmp_breakpoint (thread->global_num);
}
the ':', then complete_linespec_component won't try to
complete on source filenames. */
- const char *text = parser.completion_word;
const char *word = parser.completion_word;
complete_linespec_component (&parser, tracker,
{
int ix;
const struct block *block;
- struct symbol *sym;
struct symbol *fn_sym;
VEC (symbolp) *result = NULL;
struct value *original_value,
const struct value_print_options *options)
{
- struct gdbarch *gdbarch = get_type_arch (type);
unsigned len;
struct type *elttype;
CORE_ADDR addr;
static void
require_user_regions (int from_tty)
{
- struct mem_region *m;
- int ix, length;
-
/* If we're already using a user-provided list, nothing to do. */
if (!mem_use_target ())
return;
lookup_mem_region (CORE_ADDR addr)
{
static struct mem_region region (0, 0);
- struct mem_region *m;
CORE_ADDR lo;
CORE_ADDR hi;
- int ix;
require_target_regions ();
if (args == NULL || *args == '\0')
{
- struct mem_region *m;
- int ix;
-
for (mem_region &m : *mem_region_list)
m.enabled_p = false;
}
static void
mem_delete (int num)
{
- struct mem_region *m;
- int ix;
-
if (!mem_region_list)
{
printf_unfiltered (_("No memory region number %d.\n"), num);
static const char *
mep_register_name (struct gdbarch *gdbarch, int regnr)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
/* General-purpose registers. */
static const char *gpr_names[] = {
"r0", "r1", "r2", "r3", /* 0 */
CORE_ADDR pc;
unsigned long insn;
int rn;
- int found_lp = 0;
pv_t reg[MEP_NUM_REGS];
CORE_ADDR after_last_frame_setup_insn = start_pc;
struct ui_out *uiout = current_uiout;
const char *pattern;
struct so_list *so = NULL;
- struct gdbarch *gdbarch = target_gdbarch ();
switch (argc)
{
static void
mi_on_sync_execution_done (void)
{
- struct ui *ui = current_ui;
struct mi_interp *mi = as_mi_interp (top_level_interpreter ());
if (mi == NULL)
/* Explicitly wholly collected variables. */
{
- int i;
-
ui_out_emit_list list_emitter (uiout, "explicit-variables");
const std::vector<std::string> &wholly_collected
= clist->wholly_collected ();
/* Computed expressions. */
{
- char *p;
- int i;
-
ui_out_emit_list list_emitter (uiout, "computed-expressions");
const std::vector<std::string> &computed = clist->computed ();
microblaze_linux_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
linux_init_abi (info, gdbarch);
set_gdbarch_memory_remove_breakpoint (gdbarch,
gdb_byte footer[LZMA_STREAM_HEADER_SIZE];
gdb_byte *indexdata;
lzma_index *index;
- int ret;
uint64_t memlimit = UINT64_MAX;
struct gdb_lzma_stream *lstream;
size_t pos;
objfile != NULL && found.external_symbol.minsym == NULL;
objfile = objfile->next)
{
- struct minimal_symbol *msymbol;
-
if (objf == NULL || objf == objfile
|| objf == objfile->separate_debug_objfile_backlink)
{
mips64_elf_fpregset_t *fpregsetp, int regno)
{
struct gdbarch *gdbarch = regcache->arch ();
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
gdb_byte *to;
if ((regno >= gdbarch_fp0_regnum (gdbarch))
struct frame_info *this_frame, void **this_cache)
{
gdb_byte dummy[4];
- struct obj_section *s;
CORE_ADDR pc = get_frame_address_in_block (this_frame);
struct bound_minimal_symbol msym;
{
CORE_ADDR func_addr = function ? find_function_addr (function, NULL) : 0;
int mips16 = mips_pc_is_mips16 (gdbarch, func_addr);
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum mips_fval_reg fval_reg;
fval_reg = readbuf ? mips16 ? mips_fval_gpr : mips_fval_fpr : mips_fval_both;
mips_single_step_through_delay (struct gdbarch *gdbarch,
struct frame_info *frame)
{
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR pc = get_frame_pc (frame);
enum mips_isa isa;
ULONGEST insn;
- int status;
int size;
if ((mips_pc_is_mips (pc)
_initialize_mips_tdep (void)
{
static struct cmd_list_element *mipsfpulist = NULL;
- struct cmd_list_element *c;
mips_abi_string = mips_abi_strings[MIPS_ABI_UNKNOWN];
if (MIPS_ABI_LAST + 1
int struct_return, CORE_ADDR struct_addr)
{
int argreg;
- int float_argreg;
int argnum;
int len = 0;
int stack_offset = 0;
static std::vector<CORE_ADDR>
nios2_software_single_step (struct regcache *regcache)
{
- struct gdbarch *gdbarch = regcache->arch ();
CORE_ADDR next_pc = nios2_get_next_pc (regcache, regcache_read_pc (regcache));
return {next_pc};
if (address_p != NULL)
*address_p = addr;
- struct type *the_type;
-
switch (type)
{
case mst_text:
const struct section_offsets *new_offsets,
const struct section_offsets *delta)
{
- struct partial_symbol **psym;
struct partial_symtab *p;
ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, p)
{
gdbpy_breakpoint_object *self_bp = (gdbpy_breakpoint_object *) self;
struct breakpoint *bp = self_bp->bp;
- long length;
- PyObject *result;
BPPY_REQUIRE_VALID (self_bp);
int num = b->number;
PyGILState_STATE state;
struct breakpoint *bp = NULL;
- gdbpy_breakpoint_object *bp_obj;
state = PyGILState_Ensure ();
bp = get_breakpoint (num);
CORE_ADDR addr)
{
gdbpy_ref<> event;
- int failed;
switch (flag)
{
btpy_list_item (PyObject *self, Py_ssize_t index)
{
const btpy_list_object * const obj = (btpy_list_object *) self;
- struct thread_info * const tinfo = find_thread_ptid (obj->ptid);
Py_ssize_t number;
if (index < 0 || index >= btpy_list_length (self))
typy_str (PyObject *self)
{
string_file thetype;
- PyObject *result;
TRY
{
struct value *function = ((value_object *) self)->value;
struct value **vargs = NULL;
struct type *ftype = NULL;
- struct value *mark = value_mark ();
PyObject *result = NULL;
TRY
do_start_initialization ()
{
#ifdef IS_PY3K
- int i;
size_t progsize, count;
wchar_t *progname_copy;
#endif
gdb_disassembly_flags flags)
{
struct btrace_thread_info *btinfo;
- struct btrace_insn_history *history;
struct btrace_insn_iterator begin, end;
struct ui_out *uiout;
unsigned int low, high;
int int_flags)
{
struct btrace_thread_info *btinfo;
- struct btrace_call_history *history;
struct btrace_call_iterator begin, end;
struct ui_out *uiout;
unsigned int low, high;
static enum record_method
record_btrace_record_method (struct target_ops *self, ptid_t ptid)
{
- const struct btrace_config *config;
struct thread_info * const tp = find_thread_ptid (ptid);
if (tp == NULL)
const gdb_byte *writebuf, ULONGEST offset,
ULONGEST len, ULONGEST *xfered_len)
{
- struct target_ops *t;
-
/* Filter out requests that don't make sense during replay. */
if (replay_memory_access == replay_memory_access_read_only
&& !record_btrace_generating_corefile
btrace_get_frame_function (struct frame_info *frame)
{
const struct btrace_frame_cache *cache;
- const struct btrace_function *bfun;
struct btrace_frame_cache pattern;
void **slot;
static void
record_full_open (const char *name, int from_tty)
{
- struct target_ops *t;
-
if (record_debug)
fprintf_unfiltered (gdb_stdlog, "Process record: record_full_open\n");
{
const char *pos;
char *end;
- int number;
pos = skip_spaces (*arg);
register_ ## TAG ## _data_with_cleanup (void (*save) (struct TAG *, void *), \
void (*free) (struct TAG *, void *)) \
{ \
- struct registry_data_registration **curr; \
- \
return (struct TAG ## _data *) \
register_data_with_cleanup (&TAG ## _data_registry, \
(registry_data_callback) save, \
void *data) \
{ \
struct TAG *tagged_container = (struct TAG *) container; \
- struct registry_fields *rdata \
- = &ACCESS (tagged_container)->registry_data; \
\
registry_ ## TAG ## _callback tagged_func \
= (registry_ ## TAG ## _callback) func; \
void
remote_fileio_request (char *buf, int ctrlc_pending_p)
{
- int ex;
-
/* Save the previous quit handler, so we can restore it. No need
for a cleanup since we catch all exceptions below. Note that the
quit handler is also restored by remote_fileio_reply just before
|| remote_get_threads_with_qthreadinfo (ops, &context)
|| remote_get_threads_with_ql (ops, &context))
{
- int i;
struct thread_info *tp, *tmp;
got_list = 1;
static void
remote_check_symbols (void)
{
- struct remote_state *rs = get_remote_state ();
char *msg, *reply, *tmp;
int end;
long reply_size;
static void
remote_commit_resume (struct target_ops *ops)
{
- struct remote_state *rs = get_remote_state ();
struct inferior *inf;
struct thread_info *tp;
int any_process_wildcard;
static void
remote_interrupt (struct target_ops *self, ptid_t ptid)
{
- struct remote_state *rs = get_remote_state ();
-
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "remote_interrupt called\n");
CORE_ADDR addr = bp_tgt->reqstd_address;
struct remote_state *rs;
char *p, *endbuf;
- int bpsize;
/* Make sure the remote is pointing at the right process, if
necessary. */
compare_sections_command (const char *args, int from_tty)
{
asection *s;
- gdb_byte *sectdata;
const char *sectname;
bfd_size_type size;
bfd_vma lma;
if (n_supers > 0)
{
- int i;
int len;
std::vector<int> offsets;
unsigned int current_len;
{
int is_byte = lexptr[0] == 'b';
int raw_length;
- int len_in_chars = 0;
if (is_byte)
++lexptr;
std::vector<struct type *> args
(convert_params_to_types (state, operation->left.params));
int i;
- struct type *type;
const char *name;
obstack_1grow (work_obstack, '(');
case OP_AGGREGATE:
{
- int i;
int length;
rust_set_vector *fields = operation->right.field_inits;
struct type *type;
for (i = 0; i < TYPE_NFIELDS (type); ++i)
{
- const char *name;
-
QUIT;
if (field_is_static (&TYPE_FIELD (type, i)))
continue;
case TYPE_CODE_UNION:
{
/* ADT enums. */
- int i, len = 0;
+ int i;
/* Skip the discriminant field. */
int skip_to = 1;
if (noside == EVAL_NORMAL)
{
- CORE_ADDR addr;
int i;
std::vector<struct value *> eltvec (copies);
static struct type *
rx_register_type (struct gdbarch *gdbarch, int reg_nr)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
if (reg_nr == RX_PC_REGNUM)
return builtin_type (gdbarch)->builtin_func_ptr;
else if (reg_nr == RX_PSW_REGNUM || reg_nr == RX_BPSW_REGNUM)
serial_event_clear (struct serial_event *event)
{
struct serial *ser = (struct serial *) event;
- struct serial_event_state *state = (struct serial_event_state *) ser->state;
#ifndef USE_WIN32API
int r;
}
while (r > 0 || (r < 0 && errno == EINTR));
#else
+ struct serial_event_state *state = (struct serial_event_state *) ser->state;
ResetEvent (state->event);
#endif
}
struct serial *
serial_open (const char *name)
{
- struct serial *scb;
const struct serial_ops *ops;
const char *open_name = name;
/* Now go and fiddle with all the LMAs. */
ALL_OBJFILE_OSECTIONS (objfile, osect)
{
- bfd *obfd = objfile->obfd;
asection *bsect = osect->the_bfd_section;
int ndx = osect - objfile->sections;
{
if (overlay_debugging && section)
{
- bfd *abfd = section->objfile->obfd;
asection *bfd_section = section->the_bfd_section;
if (bfd_section_lma (abfd, bfd_section) != 0
{
if (section_is_overlay (section) && pc_in_mapped_range (pc, section))
{
- bfd *abfd = section->objfile->obfd;
asection *bfd_section = section->the_bfd_section;
return pc + bfd_section_lma (abfd, bfd_section)
{
if (section_is_overlay (section) && pc_in_unmapped_range (pc, section))
{
- bfd *abfd = section->objfile->obfd;
asection *bfd_section = section->the_bfd_section;
return pc + bfd_section_vma (abfd, bfd_section)
simple_overlay_update_1 (struct obj_section *osect)
{
int i;
- bfd *obfd = osect->objfile->obfd;
asection *bsect = osect->the_bfd_section;
struct gdbarch *gdbarch = get_objfile_arch (osect->objfile);
int word_size = gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT;
if (section_is_overlay (osect))
{
int i;
- bfd *obfd = osect->objfile->obfd;
asection *bsect = osect->the_bfd_section;
for (i = 0; i < cache_novlys; i++)
{
char *demangled = NULL;
int i;
- int recognized;
if (gsymbol->language == language_unknown)
gsymbol->language = language_auto;
and <TYPENAME> or <OPERATOR>. */
const char *opend;
const char *opname = operator_chars (regexp, &opend);
- int errcode;
if (*opname)
{
static struct tdesc_type *
tdesc_predefined_type (enum tdesc_type_kind kind)
{
- int ix;
- struct tdesc_type *type;
-
- for (ix = 0; ix < ARRAY_SIZE (tdesc_predefined_types); ix++)
+ for (int ix = 0; ix < ARRAY_SIZE (tdesc_predefined_types); ix++)
if (tdesc_predefined_types[ix].kind == kind)
return &tdesc_predefined_types[ix];
void
target_commit_resume (void)
{
- struct target_ops *t;
-
if (defer_target_commit_resume)
return;
user_selected_what selection)
{
struct thread_info *tp = inferior_thread ();
- struct inferior *inf = current_inferior ();
if (selection & USER_SELECTED_THREAD)
{
static void
new_ui_command (const char *args, int from_tty)
{
- struct interp *interp;
gdb_file_up stream[3];
int i;
- int res;
int argc;
const char *interpreter_name;
const char *tty_name;
while (1)
{
int c;
- int numfds;
fd_set readfds;
QUIT;
static void
tfile_open (const char *arg, int from_tty)
{
- char *temp;
int flags;
int scratch_chan;
char header[TRACE_HEADER_SIZE];
std::string buf;
int try_num = 0;
struct trace_state_variable *tsv;
- struct cleanup *old_chain;
if (utsv->name)
{
void
quit (void)
{
- struct ui *ui = current_ui;
-
if (sync_quit_force_run)
{
sync_quit_force_run = 0;
static int ATTRIBUTE_PRINTF (1, 0)
defaulted_query (const char *ctlstr, const char defchar, va_list args)
{
- int ans2;
int retval;
int def_value;
char def_answer, not_def_answer;
struct value *outval = NULL;
int inval1len, inval2len;
int count, idx;
- char *ptr;
char inchar;
struct type *type1 = check_typedef (value_type (arg1));
struct type *type2 = check_typedef (value_type (arg2));
{
struct syscalls_info *syscalls_info = gdbarch_syscalls_info (gdbarch);
struct syscall_group_desc *groupdesc;
- struct syscall_desc *sysdesc;
struct syscall *syscalls = NULL;
int nsyscalls;
int i;
return {};
#else
- struct target_desc *tdesc;
-
gdb::unique_xmalloc_ptr<char>
tdesc_str = fetch_available_features_from_target ("target.xml", ops);
if (tdesc_str == NULL)
int regnum,
gdb_byte *buffer)
{
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-
DEBUGTRACE ("xtensa_pseudo_register_read (... regnum = %d (%s) ...)\n",
regnum, xtensa_register_name (gdbarch, regnum));
int regnum,
const gdb_byte *buffer)
{
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
-
DEBUGTRACE ("xtensa_pseudo_register_write (... regnum = %d (%s) ...)\n",
regnum, xtensa_register_name (gdbarch, regnum));