* charset.c (intermediate_encoding): Remove unused i.
* completer.c (signal_completer): Remove unused i.
* continuations.c (discard_my_continuations_1): Remove unused
continuation_ptr.
* corelow.c (core_close): Remove unuseD name.
(get_core_siginfo): Remove unused pid.
* cp-namespace.c (cp_lookup_symbol_imports_or_template): Remove unused
i, cps.
* dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove unused base_offset.
(loclist_describe_location): Remove unused first.
* event-top.c (command_line_handler): Remove unused got_eof.
* exec.c (exec_close_1): Remove unused need_symtab_cleanup.
(resize_section_table): Remove unused old_value.
* gdb_bfd.c (gdb_bfd_map_section): Remove unused header.
* gnu-v3-abi.c (compute_vtable_size): Remove unused addr.
* i386-tdep.c (i386_process_record): Remove unused rex.
* infcmd.c (get_return_value): Remove unused uiout.
* jv-lang.c (type_from_class): Remove unused is_array.
* jv-valprint.c (java_val_print): Remove unused i.
* linux-nat.c (linux_nat_stop_lwp): Remove unused ptid.
* linux-thread-db.c (thread_db_find_new_threads_2): Remove unuseD pid.
* m2-typeprint.c (m2_print_type): Remove unused code.
* macroexp.c (get_character_constant): Remove unused body_start.
(macro_stringify): Remove unused result.
* objc-lang.c (find_methods): Remove unused gdbarch.
* objfiles.c (filter_overlapping_sections): Remove unused abfd1, abfd2.
* regcache.c (regcache_cooked_read): Remove unused gdbarch.
* stack.c (print_frame_args): Remove unused summary.
* thread.c (thread_apply_command): Remove unused p.
* valarith.c (value_x_unop): Remove unused mangle_ptr.
* valops.c (search_struct_method): Remove unused skip.
* valprint.c (generic_val_print): Remove unused byte_order.
* varobj.c (varobj_update): Remove unused changed.
* cli/cli-cmds.c (complete_command): Remove unused next_item.
(alias_command): Remove unused c.
* mi/mi-cmd-catch.c (mi_catch_load_unload): Remove unused c.
* mi/mi-main.c (mi_cmd_data_write_register_values): Remove unused
format.
(mi_cmd_data_write_memory): Remove unused word_format.
(mi_cmd_data_write_memory_bytes): Remove unused r.
* python/py-gdb-readline.c (gdbpy_readline_wrapper): Remove unused
p_start, p_end.
* python/python.c (_initialize_python): Remove unused cmd_name, cmd.
* tui/tui-disasm.c (tui_set_disassem_content): Remove unused
line_width.
Reference: http://sourceware.org/ml/gdb-patches/2013-01/msg00766.html
+2013-01-31 Aleksandar Ristovski <aristovski@qnx.com>
+
+ * charset.c (intermediate_encoding): Remove unused i.
+ * completer.c (signal_completer): Remove unused i.
+ * continuations.c (discard_my_continuations_1): Remove unused
+ continuation_ptr.
+ * corelow.c (core_close): Remove unuseD name.
+ (get_core_siginfo): Remove unused pid.
+ * cp-namespace.c (cp_lookup_symbol_imports_or_template): Remove unused
+ i, cps.
+ * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove unused base_offset.
+ (loclist_describe_location): Remove unused first.
+ * event-top.c (command_line_handler): Remove unused got_eof.
+ * exec.c (exec_close_1): Remove unused need_symtab_cleanup.
+ (resize_section_table): Remove unused old_value.
+ * gdb_bfd.c (gdb_bfd_map_section): Remove unused header.
+ * gnu-v3-abi.c (compute_vtable_size): Remove unused addr.
+ * i386-tdep.c (i386_process_record): Remove unused rex.
+ * infcmd.c (get_return_value): Remove unused uiout.
+ * jv-lang.c (type_from_class): Remove unused is_array.
+ * jv-valprint.c (java_val_print): Remove unused i.
+ * linux-nat.c (linux_nat_stop_lwp): Remove unused ptid.
+ * linux-thread-db.c (thread_db_find_new_threads_2): Remove unuseD pid.
+ * m2-typeprint.c (m2_print_type): Remove unused code.
+ * macroexp.c (get_character_constant): Remove unused body_start.
+ (macro_stringify): Remove unused result.
+ * objc-lang.c (find_methods): Remove unused gdbarch.
+ * objfiles.c (filter_overlapping_sections): Remove unused abfd1, abfd2.
+ * regcache.c (regcache_cooked_read): Remove unused gdbarch.
+ * stack.c (print_frame_args): Remove unused summary.
+ * thread.c (thread_apply_command): Remove unused p.
+ * valarith.c (value_x_unop): Remove unused mangle_ptr.
+ * valops.c (search_struct_method): Remove unused skip.
+ * valprint.c (generic_val_print): Remove unused byte_order.
+ * varobj.c (varobj_update): Remove unused changed.
+ * cli/cli-cmds.c (complete_command): Remove unused next_item.
+ (alias_command): Remove unused c.
+ * mi/mi-cmd-catch.c (mi_catch_load_unload): Remove unused c.
+ * mi/mi-main.c (mi_cmd_data_write_register_values): Remove unused
+ format.
+ (mi_cmd_data_write_memory): Remove unused word_format.
+ (mi_cmd_data_write_memory_bytes): Remove unused r.
+ * python/py-gdb-readline.c (gdbpy_readline_wrapper): Remove unused
+ p_start, p_end.
+ * python/python.c (_initialize_python): Remove unused cmd_name, cmd.
+ * tui/tui-disasm.c (tui_set_disassem_content): Remove unused
+ line_width.
+
2013-01-31 Aleksandar Ristovski <aristovski@qnx.com>
* dwarf2-frame.c (dwarf2_compile_cfa_to_ax): Remove unused num_regs.
iconv_t desc;
static const char *stored_result = NULL;
char *result;
- int i;
if (stored_result)
return stored_result;
unique item once. */
for (ix = 0; VEC_iterate (char_ptr, completions, ix, item); ++ix)
{
- int next_item;
-
if (prev == NULL || strcmp (item, prev) != 0)
{
printf_unfiltered ("%s%s\n", arg_prefix, item);
char *args2, *equals, *alias, *command;
char **alias_argv, **command_argv;
dyn_string_t alias_dyn_string, command_dyn_string;
- struct cmd_list_element *c;
static const char usage[] = N_("Usage: alias [-a] [--] ALIAS = COMMAND");
if (args == NULL || strchr (args, '=') == NULL)
signal_completer (struct cmd_list_element *ignore,
char *text, char *word)
{
- int i;
VEC (char_ptr) *return_val = NULL;
size_t len = strlen (word);
enum gdb_signal signum;
static void
discard_my_continuations (struct continuation **list)
{
- struct continuation *continuation_ptr = *list;
-
discard_my_continuations_1 (list);
*list = NULL;
}
static void
core_close (int quitting)
{
- char *name;
-
if (core_bfd)
{
int pid = ptid_get_pid (inferior_ptid);
get_core_siginfo (bfd *abfd, gdb_byte *readbuf, ULONGEST offset, LONGEST len)
{
asection *section;
- long pid;
char *section_name;
const char *name = ".note.linuxcore.siginfo";
if (function != NULL && SYMBOL_LANGUAGE (function) == language_cplus)
{
- int i;
- struct cplus_specific *cps
- = function->ginfo.language_specific.cplus_specific;
-
/* Search the function's template parameters. */
if (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION (function))
{
size_t datalen;
struct block *b;
struct symbol *framefunc;
- LONGEST base_offset = 0;
b = block_for_pc (expr->scope);
{
struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol);
const gdb_byte *loc_ptr, *buf_end;
- int first = 1;
struct objfile *objfile = dwarf2_per_cu_objfile (dlbaton->per_cu);
struct gdbarch *gdbarch = get_objfile_arch (objfile);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
char *p;
char *p1;
char *nline;
- char got_eof = 0;
-
int repeat = (instream == stdin);
if (annotation_level > 1 && instream == stdin)
and exit from gdb. */
if (!rl || rl == (char *) EOF)
{
- got_eof = 1;
command_handler (0);
return; /* Lint. */
}
static void
exec_close_1 (int quitting)
{
- int need_symtab_cleanup = 0;
struct vmap *vp, *nxt;
using_exec_ops = 0;
nxt = vp->nxt;
if (vp->objfile)
- {
- free_objfile (vp->objfile);
- need_symtab_cleanup = 1;
- }
+ free_objfile (vp->objfile);
gdb_bfd_unref (vp->bfd);
int
resize_section_table (struct target_section_table *table, int num_added)
{
- struct target_section *old_value;
int old_count;
int new_count;
- old_value = table->sections;
old_count = table->sections_end - table->sections;
new_count = num_added + old_count;
gdb_bfd_map_section (asection *sectp, bfd_size_type *size)
{
bfd *abfd;
- unsigned char header[4];
struct gdb_bfd_section_data *descriptor;
bfd_byte *data;
struct type *type = check_typedef (value_type (value));
void **slot;
struct value_and_voffset search_vo, *current_vo;
- CORE_ADDR addr = value_address (value) + value_embedded_offset (value);
/* If the object is not dynamic, then we are done; as it cannot have
dynamic base types either. */
gdb_byte buf[MAX_REGISTER_SIZE];
struct i386_record_s ir;
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- int rex = 0;
uint8_t rex_w = -1;
uint8_t rex_r = 0;
if (ir.regmap[X86_RECORD_R8_REGNUM]) /* 64 bit target */
{
/* REX */
- rex = 1;
rex_w = (opcode8 >> 3) & 1;
rex_r = (opcode8 & 0x4) << 1;
ir.rex_x = (opcode8 & 0x2) << 2;
struct regcache *stop_regs = stop_registers;
struct gdbarch *gdbarch;
struct value *value;
- struct ui_out *uiout = current_uiout;
struct cleanup *cleanup = make_cleanup (null_cleanup, NULL);
/* If stop_registers were not saved, use the current registers. */
struct value *utf8_name;
char *nptr;
CORE_ADDR addr;
- int is_array = 0;
type = check_typedef (value_type (clas));
if (TYPE_CODE (type) == TYPE_CODE_PTR)
name = obstack_alloc (&objfile->objfile_obstack, namelen + 1);
java_demangled_signature_copy (name, signature);
name[namelen] = '\0';
- is_array = 1;
temp = clas;
/* Set array element type. */
temp = value_struct_elt (&temp, NULL, "methods", NULL, "structure");
const struct value_print_options *options)
{
struct gdbarch *gdbarch = get_type_arch (type);
- unsigned int i = 0; /* Number of characters printed. */
struct type *target_type;
CORE_ADDR addr;
{
if (!lwp->stopped)
{
- ptid_t ptid = lwp->ptid;
-
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LNSL: running -> suspending %s\n",
{
td_err_e err = TD_OK;
struct thread_db_info *info;
- int pid = ptid_get_pid (ptid);
int i, loop;
info = get_thread_db_info (GET_PID (ptid));
int show, int level,
const struct type_print_options *flags)
{
- enum type_code code;
-
CHECK_TYPEDEF (type);
QUIT;
return;
}
- code = TYPE_CODE (type);
switch (TYPE_CODE (type))
{
case TYPE_CODE_SET:
&& p[1] == '\''))
{
char *tok_start = p;
- char *body_start;
int char_count = 0;
if (*p == '\'')
else
gdb_assert_not_reached ("unexpected character constant");
- body_start = p;
for (;;)
{
if (p >= end)
{
struct macro_buffer buffer;
int len = strlen (str);
- char *result;
init_buffer (&buffer, len);
stringify (&buffer, str, len);
static void
mi_catch_load_unload (int load, char *argv[], int argc)
{
- struct solib_catchpoint *c;
struct cleanup *back_to;
const char *actual_cmd = load ? "-catch-load" : "-catch-unload";
int temp = 0;
struct regcache *regcache;
struct gdbarch *gdbarch;
int numregs, i;
- char format;
/* Note that the test for a valid register must include checking the
gdbarch_register_name because gdbarch_num_regs may be allocated
error (_("-data-write-register-values: Usage: -data-write-register-"
"values <format> [<regnum1> <value1>...<regnumN> <valueN>]"));
- format = (int) argv[0][0];
-
if (!target_has_registers)
error (_("-data-write-register-values: No registers."));
struct gdbarch *gdbarch = get_current_arch ();
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR addr;
- char word_format;
long word_size;
/* FIXME: ezannoni 2000-02-17 LONGEST could possibly not be big
enough when using a compiler other than GCC. */
/* Extract all the arguments. */
/* Start address of the memory dump. */
addr = parse_and_eval_address (argv[0]);
- /* The format character to use when displaying a memory word. See
- the ``x'' command. */
- word_format = argv[1][0];
/* The size of the memory word. */
word_size = atol (argv[2]);
char *cdata;
gdb_byte *data;
gdb_byte *databuf;
- size_t len, r, i, steps, remainder;
+ size_t len, i, steps, remainder;
long int count, j;
struct cleanup *back_to;
ALL_OBJFILE_MSYMBOLS (objfile, msymbol)
{
- struct gdbarch *gdbarch = get_objfile_arch (objfile);
-
QUIT;
/* Check the symbol name first as this can be done entirely without
struct objfile *const objf1 = sect1->objfile;
struct objfile *const objf2 = sect2->objfile;
- const struct bfd *const abfd1 = objf1->obfd;
- const struct bfd *const abfd2 = objf2->obfd;
-
const struct bfd_section *const bfds1 = sect1->the_bfd_section;
const struct bfd_section *const bfds2 = sect2->the_bfd_section;
char *prompt)
{
int n;
- char *p = NULL, *p_start, *p_end, *q;
+ char *p = NULL, *q;
volatile struct gdb_exception except;
TRY_CATCH (except, RETURN_MASK_ALL)
void
_initialize_python (void)
{
- char *cmd_name;
- struct cmd_list_element *cmd;
char *progname;
#ifdef IS_PY3K
int i;
{
/* Read-only register cache, perhaps the cooked value was
cached? */
- struct gdbarch *gdbarch = regcache->descr->gdbarch;
-
if (regcache->register_status[regnum] == REG_VALID)
memcpy (buf, register_buffer (regcache, regnum),
regcache->descr->sizeof_register[regnum]);
struct ui_file *stb;
/* True if we should print arguments, false otherwise. */
int print_args = strcmp (print_frame_arguments, "none");
- /* True in "summary" mode, false otherwise. */
- int summary = !strcmp (print_frame_arguments, "scalars");
stb = mem_fileopen ();
old_chain = make_cleanup_ui_file_delete (stb);
{
struct thread_info *tp;
int start;
- char *p = tidlist;
start = get_number_or_range (&state);
enum tui_status ret = TUI_FAILURE;
int i;
int offset = TUI_DISASM_WIN->detail.source_info.horizontal_offset;
- int line_width, max_lines;
+ int max_lines;
CORE_ADDR cur_pc;
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
int tab_len = tui_default_tab_len ();
* max_lines);
memset (asm_lines, 0, sizeof (struct tui_asm_line) * max_lines);
- line_width = TUI_DISASM_WIN->generic.width - 1;
-
tui_disassemble (gdbarch, asm_lines, pc, max_lines);
/* See what is the maximum length of an address and of a line. */
{
struct gdbarch *gdbarch = get_type_arch (value_type (arg1));
struct value **argvec;
- char *ptr, *mangle_ptr;
+ char *ptr;
char tstr[13], mangle_tstr[13];
int static_memfuncp, nargs;
strcpy (tstr, "operator__");
ptr = tstr + 8;
strcpy (mangle_tstr, "__");
- mangle_ptr = mangle_tstr + 2;
switch (op)
{
case UNOP_PREINCREMENT:
for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
{
int base_offset;
- int skip = 0;
int this_offset;
if (BASETYPE_VIA_VIRTUAL (type, i))
const struct generic_val_print_decorations *decorations)
{
struct gdbarch *gdbarch = get_type_arch (type);
- enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
unsigned int i = 0; /* Number of characters printed. */
unsigned len;
struct type *elttype, *unresolved_elttype;
VEC(varobj_update_result) *
varobj_update (struct varobj **varp, int explicit)
{
- int changed = 0;
int type_changed = 0;
int i;
struct value *new;