Commit Graph

72863 Commits

Author SHA1 Message Date
Pedro Alves 6350a0664a Fix formatting. 2012-03-27 19:16:23 +00:00
Pedro Alves f99d8bf46c 2012-03-27 Pedro Alves <palves@redhat.com>
Eliminate struct ui_stream.

	* ui-out.h (struct ui_stream): Delete.
	(ui_out_field_stream): Adjust prototype.
	(ui_out_stream_new, ui_out_stream_delete)
	(make_cleanup_ui_out_stream_delete): Delete declarations.
	* ui-out.c (ui_out_field_stream): Change prototype to take a
	ui_file instead of a ui_stream.  Adjust.
	(ui_out_stream_new, ui_out_stream_delete, do_stream_delete)
	(make_cleanup_ui_out_stream_delete): Delete.
	* breakpoint.c (print_breakpoint_location)
	(print_one_detail_ranged_breakpoint, print_it_watchpoint): Use
	ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new.
	* disasm.c (dump_insns): Ditto.
	(do_mixed_source_and_assembly, do_assembly_only): Adjust
	prototype.
	(gdb_disassembly): Use ui_file/mem_fileopen instead of
	ui_stream/ui_out_stream_new.
	* infcmd.c (print_return_value): Ditto.
	* osdata.c (info_osdata_command): Don't allocate a local
	ui_stream.
	* stack.c (print_frame_arg, print_frame_args, print_frame): Use
	ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new.
	* tracepoint.c (print_one_static_tracepoint_marker): Don't
	allocate a local ui_stream.
	* mi/mi-cmd-stack.c (list_arg_or_local): Use ui_file/mem_fileopen
	instead of ui_stream/ui_out_stream_new.
	(list_args_or_locals): Don't allocate a local ui_stream.
	* mi/mi-main.c (get_register, mi_cmd_data_evaluate_expression)
	(mi_cmd_data_read_memory): Use ui_file/mem_fileopen instead of
	ui_stream/ui_out_stream_new.
	* cli/cli-setshow.c (do_setshow_command): Ditto.
2012-03-27 19:08:37 +00:00
Pawandeep Oza 72508ac0bf * arm-linux-tdep.c (arm_linux_init_abi): Call
set_gdbarch_process_record.
       Initialize `arm_swi_record' field.

       * arm-tdep.c (arm_process_record): New function.
       (deallocate_reg_mem): New function.
       (decode_insn): New function.
       (thumb_record_branch): New function.
       (thumb_record_ldm_stm_swi(): New function.
       (thumb_record_misc): New function.
       (thumb_record_ld_st_stack): New function.
       (thumb_record_ld_st_imm_offset): New function.
       (thumb_record_ld_st_reg_offset(): New function.
       (thumb_record_add_sub_cmp_mov): New function.
       (thumb_record_shift_add_sub): New function.
       (arm_record_coproc_data_proc): New function.
       (arm_record_coproc): New function.
       (arm_record_b_bl): New function.
       (arm_record_ld_st_multiple): New function.
       (arm_record_ld_st_reg_offset): New function.
       (arm_record_ld_st_imm_offset): New function.
       (arm_record_data_proc_imm): New function.
       (arm_record_data_proc_misc_ld_str): New function.
       (arm_record_extension_space): New function.
       (arm_record_strx): New function.
       (sbo_sbz): New function.
       (struct insn_decode_record): New structure for arm insn record.
       (REG_ALLOC): New macro for reg allocations.
       (MEM_ALLOC): New macro for memory allocations.

       * arm-tdep.h (struct gdbarch_tdep): New field 'arm_swi_record'
2012-03-27 15:46:33 +00:00
Andreas Schwab 89e028e2ef * m68klinux-nat.c (fetch_register): Fix strict-aliasing violation.
(store_register): Likewise.
2012-03-27 08:15:26 +00:00
Mike Frysinger e6ab98cd1c sim: add bugzilla marking 2012-03-27 04:18:05 +00:00
gdbadmin fda3c10b5f *** empty log message *** 2012-03-27 00:00:32 +00:00
Alan Modra 87a6f30243 daily update 2012-03-26 23:00:04 +00:00
Pawandeep Oza 3d9a9eb0f3 MAINTAINERS (Write After Approval): Add myself to the list. 2012-03-26 18:18:40 +00:00
Pedro Alves 63c88e1312 2012-03-26 Pedro Alves <palves@redhat.com>
* server.c (handle_qxfer_libraries): Don't bail early if
	the_target->qxfer_libraries_svr4 is not NULL.
2012-03-26 13:54:57 +00:00
Tristan Gingold 1d6d1a2c05 2012-03-26 Tristan Gingold <gingold@adacore.com>
* lexsup.c (parse_args): Add a missing '\n'.
2012-03-26 13:05:16 +00:00
Pedro Alves fb723180bd 2012-03-26 Pedro Alves <palves@redhat.com>
* linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
2012-03-26 12:39:19 +00:00
Mike Frysinger a35a332283 sim: add a proper sim_core_trans_addr prototype
The common code has a sim_core_trans_addr() helper that only the m32r code
uses.  Move the inline extern in the m32r code to the proper common header.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-26 02:18:43 +00:00
gdbadmin fc72a5f0f1 *** empty log message *** 2012-03-26 00:00:03 +00:00
Alan Modra b411de145e daily update 2012-03-25 23:00:05 +00:00
Mike Frysinger 44ac5dbe32 sim: bfin: skip .c/.S tests if no compiler is available
Similar to logic in the cris exp, attempt a simple compile and if it fails
(presumably due to the compiler being broken), skip all the related tests.
Fortunately, most tests (~600 out of ~800) are pure assembly, so people should
still get pretty good coverage.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-25 16:51:46 +00:00
Jan Kratochvil 5b43fab2ea gdb/
* NEWS (set breakpoint condition-evaluation): Change "gdb" to "host".
	Describe also the option "auto".
2012-03-25 13:44:01 +00:00
Mike Frysinger 45e4eeb430 sim: bfin: disable redundant test that makes 32bit gas angry 2012-03-25 07:56:12 +00:00
Alan Modra b514e6a51f ld/
* ldemul.c (before_allocation_default): Revert last change.
	ldlang.c (lang_add_section): Likewise.
	(strip_excluded_output_sections): Don't strip output sections with
	user input sections when emitrelocations, unless all are SEC_EXCLUDE.
ld/testsuite/
	* ld-powerpc/vxworks-relax.rd: Remove check on reloc section
	file offset and reloc symbol indices.
2012-03-25 06:45:16 +00:00
Mike Frysinger 8f784a0e6a sim: bfin: fix typos in large constants in tests
Truncate constants that are larger than 32bits but get loaded into 32bit
registers.  These high bits don't get used and don't really make sense.
2012-03-25 06:43:43 +00:00
gdbadmin e0645b3035 *** empty log message *** 2012-03-25 00:00:33 +00:00
Alan Modra 361ac46c6d daily update 2012-03-24 23:00:05 +00:00
Hans-Peter Nilsson f914e38494 * nrun.c: Add #ifdef HAVE_CONFIG_H and associated includes stanza
missing in last change.
2012-03-24 09:31:09 +00:00
Mike Frysinger 2232061b1c [PATCH] sim: make sure to include strsignal prototype
Before POSIX standardized strsignal(), old systems would hide the
prototype unless the normal extension defines were enabled.  So use
the AC_USE_SYSTEM_EXTENSIONS helper for that.

Then make sure we include string.h ourselves in nrun.c rather than
relying on implicit includes via other sim headers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-24 05:38:43 +00:00
Mike Frysinger ad03ad841d sim: testsuite: regen configure after rl78 addition 2012-03-24 05:37:10 +00:00
Mike Frysinger a9c90fc78f sim: cris: update testsuite output after strsignal change 2012-03-24 05:33:42 +00:00
Maxim Kuvyrkov 55a36193d8 gas/
* config/tc-mips.c (mips_cpu_info_table): Add entry for Broadcom XLP.
	* doc/c-mips.texi: Mention XLP.

	opcodes/
	* mips-dis.c (mips_arch_choices): Add entry for Broadcom XLP.
2012-03-24 01:09:28 +00:00
gdbadmin b25d0f6e19 *** empty log message *** 2012-03-24 00:00:04 +00:00
Alan Modra 203d9758b3 daily update 2012-03-23 23:00:06 +00:00
Doug Evans 2f4e0a8013 * lib/gdb.exp (BUILD_DATA_DIRECTORY): New global. 2012-03-23 22:28:35 +00:00
Pedro Alves 0afae3cf2e 2012-03-23 Pedro Alves <palves@redhat.com>
* linux-low.c (linux_qxfer_libraries_svr4): Terminate the
	"library-list-svr4" element's start tag when the the DSO list is
	empty.
2012-03-23 20:27:08 +00:00
Pedro Alves 485f1ee4f6 2012-03-23 Pedro Alves <palves@redhat.com>
* linux-low.c (read_one_ptr): Read the inferior's pointer through
	a variable whose type size is the same as the inferior's pointer
	size.
2012-03-23 20:26:14 +00:00
Alan Modra f24fcb9dad * ldemul.c (before_allocation_default): When emitrelocations,
don't strip sections..
	* ldlang.c (lang_add_section): ..and don't set up map_head, map_tail.
2012-03-23 09:35:34 +00:00
Alan Modra e8d2ba5354 * elf.c (assign_file_positions_for_non_load_sections): Don't warn
on empty alloc sections.
2012-03-23 09:34:57 +00:00
Alan Modra 051d833a41 * linker.c (_bfd_nearby_section): New function, split out from..
(fix_syms): ..here.
	* bfd-in.h (_bfd_nearby_section): Declare.
	* bfd-in2.h: Regenerate.
	* elflink.c (elf_link_input_bfd): Don't use text_index_section or
	data_index_section with ld -q or ld -r output relocs against
	stripped output sections.  Instead use _bfd_nearby_section.
2012-03-23 09:27:43 +00:00
Alan Modra 62599110be PR binutils/13894
* elf64-ppc.c (opd_entry_value): Read full symbol table when
	sym hashes unavailable.
2012-03-23 06:41:21 +00:00
Mike Frysinger 8fe8b60120 sim: testsuite: regen configure after rl78 addition 2012-03-23 04:30:55 +00:00
Mike Frysinger abcee8fd25 sim: rx: fix warnings with AC_DEFINE
This lets `autoheader` work again.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-23 04:00:59 +00:00
Mike Frysinger ac0aacdffa sim: sync build_warnings handling with gdb
The sim code gets the logic for SIM_AC_OPTION_WARNINGS from gdb, but
it hasn't been updated in a good long while.  Sync with the latest
gdb code.

There is a sim specific change in here: we disable -Werror for now.
This is because all sim code atm contains warnings.  Will probably
have to slowly add a white list of targets which can tolerate this
until everyone is updated.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-23 03:27:44 +00:00
gdbadmin 51dc010c5a *** empty log message *** 2012-03-23 00:00:33 +00:00
Alan Modra fc90a9c610 daily update 2012-03-22 23:00:05 +00:00
Richard Henderson b5453b9508 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Fix prototype.
* sparc-nat.c (sparc_xfer_wcookie): Make static.
2012-03-22 20:36:34 +00:00
Richard Henderson 227ee7fc71 * jit.c (jit_read_code_entry): Compute alignment and offset of
int64_t member before computing entry_size.
2012-03-22 20:33:42 +00:00
Siva Chandra Reddy 7b282c5acc 2012-03-14 Siva Chandra <sivachandra@google.com>
Python scripting: Add new method Value.referenced_value to
        gdb.Value which can dereference pointer as well as reference
        values.
        * NEWS: Add entry under 'Python scripting' about the new method
        Value.referenced_value on gdb.Value objects.
        * python/py-value.c (valpy_referenced_value): New function
        defining a new method on gdb.Value objects which can dereference
        pointer and reference values.
        * testsuite/gdb.python/py-value.cc: Add test case for
        testing the methodology exposing C++ values to Python.
        * testsuite/gdb.python/py-value-cc.exp: Add tests testing the
        methodology exposing C++ values to Python.
        * testsuite/gdb.python/Makefile.in: Add py-value-cc to
        EXECUTABLES.
        * docs/gdb.texinfo (Python API/Values From Inferior): Add
        description about the new method Value.referenced_value.  Add
        description on how Value.dereference is different (and similar)
        to Value.referenced_value.
2012-03-22 08:10:44 +00:00
Siva Chandra Reddy 0c83539f7e 2012-03-22 Siva Chandra Reddy <sivachandra@google.com>
* MAINTAINERS (Write After Approval): Add myself to the list.
2012-03-22 07:48:40 +00:00
gdbadmin 08715974a5 *** empty log message *** 2012-03-22 00:00:03 +00:00
Alan Modra 5255715a40 daily update 2012-03-21 23:00:05 +00:00
Kevin Buettner 7ccffd7c80 * symtab.c (skip_prologue_sal): Change test to check for "main()"
in addition to "main".
2012-03-21 21:59:19 +00:00
Hans-Peter Nilsson a1fe2c2f3a PR ld/13813
* ld-mips-elf/comm-data.exp (mips_comm_data_test): For N32 and N64
	tests, also specify assembler option -march=mips3.
2012-03-21 19:15:02 +00:00
Cary Coutant c1027032c2 2012-03-21 Cary Coutant <ccoutant@google.com>
* Makefile.am: Add gdb-index.cc, gdb-index.h.
	* Makefile.in: Regenerate.
	* dwarf_reader.cc (Sized_elf_reloc_mapper::do_initialize): New function.
	(Sized_elf_reloc_mapper::symbol_section): New function.
	(Sized_elf_reloc_mapper::do_get_reloc_target): New function.
	(make_elf_reloc_mapper): New function.
	(Dwarf_abbrev_table::clear_abbrev_codes): New function.
	(Dwarf_abbrev_table::do_read_abbrevs): New function.
	(Dwarf_abbrev_table::do_get_abbrev): New function.
	(Dwarf_ranges_table::read_ranges_table): New function.
	(Dwarf_ranges_table::read_range_list): New function.
	(Dwarf_pubnames_table::read_section): New function.
	(Dwarf_pubnames_table::read_header): New function.
	(Dwarf_pubnames_table::next_name): New function.
	(Dwarf_die::Dwarf_die): New function.
	(Dwarf_die::read_attributes): New function.
	(Dwarf_die::skip_attributes): New function.
	(Dwarf_die::set_name): New function.
	(Dwarf_die::set_linkage_name): New function.
	(Dwarf_die::attribute): New function.
	(Dwarf_die::string_attribute): New function.
	(Dwarf_die::int_attribute): New function.
	(Dwarf_die::uint_attribute): New function.
	(Dwarf_die::ref_attribute): New function.
	(Dwarf_die::child_offset): New function.
	(Dwarf_die::sibling_offset): New function.
	(Dwarf_info_reader::check_buffer): New function.
	(Dwarf_info_reader::parse): New function.
	(Dwarf_info_reader::do_parse): New function.
	(Dwarf_info_reader::do_read_string_table): New function.
	(Dwarf_info_reader::lookup_reloc): New function.
	(Dwarf_info_reader::get_string): New function.
	(Dwarf_info_reader::visit_compilation_unit): New function.
	(Dwarf_info_reader::visit_type_unit): New function.
	(Sized_dwarf_line_info::Sized_dwarf_line_info): Use
	Sized_elf_reloc_mapper.
	(Sized_dwarf_line_info::symbol_section): Remove function.
	(Sized_dwarf_line_info::read_relocs): Use Sized_elf_reloc_mapper.
	(Sized_dwarf_line_info::read_line_mappings): Remove object
	parameter, adjust callers.
	(Sized_dwarf_line_info::format_file_lineno): Fix type of cast.
	* dwarf_reader.h: Include <sys/types.h>.
	(class Track_relocs): Remove forward declaration.
	(class Elf_reloc_mapper): New class.
	(class Sized_elf_reloc_mapper): New class.
	(class Dwarf_abbrev_table): New class.
	(class Dwarf_range_list): New class.
	(class Dwarf_ranges_table): New class.
	(class Dwarf_pubnames_table): New class.
	(class Dwarf_die): New class.
	(class Dwarf_info_reader): New class.
	(Sized_dwarf_line_info::read_line_mappings): Remove object parameter.
	(Sized_dwarf_line_info::symbol_section): Remove member function.
	* dynobj.h (Sized_dynobj::do_section_contents): Refactor code from
	base class.
	* gdb-index.cc: New source file.
	* gdb-index.h: New source file.
	* incremental.cc (Sized_relobj_incr::do_layout): Track .debug_info
	and .debug_types sections, call Layout::add_to_gdb_index.
	(Sized_relobj_incr::do_section_name): Implement.
	(Sized_relobj_incr::do_section_contents): Adjust parameter list and
	return type; Implement.
	(Sized_incr_dynobj::do_section_contents): Adjust parameter list and
	return type.
	* incremental.h (Sized_relobj_incr::do_section_contents): Adjust
	parameter list and return type.
	(Sized_incr_dynobj::do_section_contents): Likewise.
	* layout.cc: Include gdb-index.h.
	(Layout::Layout): Initialize gdb_index_data_.
	(Layout::init_fixed_output_section): Check for .gdb_index section.
	(Layout::add_to_gdb_index): New function. Instantiate.
	* layout.h: Add forward declaration for class Gdb_index.
	(Layout::add_to_gdb_index): New member function.
	(Layout::gdb_index_data_): New data member.
	* main.cc: Include gdb-index.h.
	(main): Print statistics for gdb index.
	* object.cc (Object::section_contents): Move code into
	do_section_contents.
	(need_decompressed_section): Check for sections needed when building
	gdb index.
	(build_compressed_section_map): Likewise.
	(Sized_relobj_file::do_read_symbols): Need local symbols when building
	gdb index.
	(Sized_relobj_file::do_layout): Track .debug_info and .debug_types
	sections; call Layout::add_to_gdb_index.
	(Sized_relobj_file::do_decompressed_section_contents): Call
	do_section_contents directly.
	* object.h (Object::do_section_contents): Adjust parameter list and
	return type.
	(Object::do_decompressed_section_contents): Call do_section_contents
	directly.
	(Sized_relobj_file::do_section_contents): Adjust parameter list and
	return type.
	* options.h (class General_options): Add --gdb-index option.
	* plugin.cc (Sized_pluginobj::do_section_contents): Adjust parameter
	list and return type.
	* plugin.h (Sized_pluginobj::do_section_contents): Likewise.
	* reloc.h (Track_relocs::checkpoint): New function.
	(Track_relocs::reset): New function.

	* testsuite/Makefile.am (gdb_index_test_1.sh, gdb_index_test_2.sh):
	New test cases.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/gdb_index_test.cc: New test source file.
	* testsuite/gdb_index_test_1.sh: New test source file.
	* testsuite/gdb_index_test_2.sh: New test source file.
2012-03-21 19:02:22 +00:00
Joel Brobecker bd0b9f9e12 SEGV during AX eval of OP_DOUBLE (unsupported)
To reproduce the problem, simply try the following with any program:

    (gdb) maintenance agent-eval 1.0
    Critical error handler: process [...] terminated due to access violation

(this is on Windows; on GNU/Linux, the libc copes better)

The problem is quite simple: gen_expr is given an expression that
contains an unrecognized operator (OP_DOUBLE in this case). When that
happens, it tries to report an error with a string image of the operator
in the error message.  Conversion of the opcode into a string is done
using op_string which, despite its name, probably is not what the author
was looking for.  This function returns NULL for a lot of the opcodes,
thus triggering the crash.

There is a function that corresponds to what we are looking for:
expprint.c:op_name. It was static, though, so I made it non-static,
and used it from ax-gdb.c:gen_expr.

gdb/ChangeLog:

        * expression.h (op_name): Add declaration.
        * expprint.c (op_name): Remove declaration.  Make non-static.
        * ax-gdb.c (gen_expr): Use op_name instead of op_string.
2012-03-21 15:16:24 +00:00