Commit Graph

67559 Commits

Author SHA1 Message Date
Jan Kratochvil 9816fde3d4 gdb/
Code cleanup.
	* dwarf2read.c (alloc_one_comp_unit): Rename prototype to ...
	(init_one_comp_unit): ... this one.
	(prepare_one_comp_unit): New prototype.
	(dw2_require_line_header, process_psymtab_comp_unit): Use
	init_one_comp_unit.
	(process_psymtab_comp_unit): Use prepare_one_comp_unit.
	(load_partial_comp_unit): Remove variable attr.  Use
	init_one_comp_unit with xmalloc.  Use prepare_one_comp_unit.
	(load_full_comp_unit): Use init_one_comp_unit with xmalloc.  Use
	prepare_one_comp_unit.
	(read_signatured_type): Remove variable attr.  Use init_one_comp_unit.
	Use prepare_one_comp_unit.
	(alloc_one_comp_unit): Rename to ...
	(init_one_comp_unit): ... here and remove there calloc, new parameter
	cu.
	(prepare_one_comp_unit): New function.
2010-11-16 04:36:26 +00:00
Mike Frysinger ca00c57b8c blackfin: add support for L1 code/data flags
forgot to `cvs add` this file
2010-11-16 03:33:07 +00:00
Mike Frysinger a1f2ce7d60 gdbserver: fix warning in nommu clone
Building gdbserver for nommu targets atm fails with:
	linux-low.c: In function 'linux_tracefork_child':
	linux-low.c:4151: error: pointer of type 'void *' used in arithmetic

So cast the void* to a char*.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-16 03:27:05 +00:00
gdbadmin 572e7c1b61 *** empty log message *** 2010-11-16 00:00:03 +00:00
Alan Modra 426fb1a6d0 * windmc.c: ,%s' -> `%s' in a number of strings. 2010-11-15 23:54:23 +00:00
Alan Modra e4985aff66 daily update 2010-11-15 23:00:05 +00:00
Mike Frysinger 781303cee5 blackfin: add support for L1 code/data flags
Add new linker options for marking programs to load into L1 memory
at runtime.  This needs new EF flag bits, so declare them.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-15 22:30:47 +00:00
Alan Modra c85f715a62 * emultempl/pe.em (_list_options): Correct typo.
* emultempl/pep.em (_list_options): Likewise.
2010-11-15 22:01:17 +00:00
H.J. Lu 38626e2529 Use binutils_assemble_flags for --nocompress-debug-sections.
2010-11-15  H.J. Lu  <hongjiu.lu@intel.com>

	* binutils-all/compress.exp: Replace binutils_assemble with
	binutils_assemble_flags for --nocompress-debug-sections.
2010-11-15 21:05:26 +00:00
H.J. Lu 6dbf72d7a6 Also expect .zdebug in DWARF debug section name.
binutils/testsuite/

2010-11-15  H.J. Lu  <hongjiu.lu@intel.com>

	* binutils-all/compress.exp: Pass --nocompress-debug-sections to
	assembler for uncompressed debug sections.

	* binutils-all/testranges.d: Also expect .zdebug in section name.

gas/testsuite/

2010-11-15  H.J. Lu  <hongjiu.lu@intel.com>

	* gas/elf/dwarf2-3.d: Also expect .zdebug in section name.
	* gas/i386/debug1.d: Likewise.
	* gas/lns/lns-common-1.d: Likewise.
	* gas/lns/lns-duplicate.d: Likewise.
2010-11-15 18:14:11 +00:00
H.J. Lu bd937d2150 Mark parameters of elf_process_stab as ATTRIBUTE_UNUSED.
2010-11-15  H.J. Lu  <hongjiu.lu@intel.com>

	* config/obj-elf.c (elf_process_stab): Mark parameters as
	ATTRIBUTE_UNUSED.
2010-11-15 18:12:42 +00:00
Doug Evans cb80163c46 revert previous patch 2010-11-15 17:25:09 +00:00
Doug Evans f4704706be * gdb.base/maint.exp (maint print statistics): Increase timeout for
all targets.  Restore old timeout afterwards.
2010-11-15 17:17:57 +00:00
Rainer Orth bc6b4acc70 * config/obj-elf.c (elf_generate_asm_lineno): New function.
(elf_process_stab): New function.
	(elf_format_ops): Always use them as generate_asm_lineno,
	process_stab members.
2010-11-15 12:31:05 +00:00
Matthew Gretton-Dann 251665fc5f PR gas/12198
* gas/config/tc-arm.c (arm_arch_v6m_only): New variable.
	(aeabi_set_public_attributes): Ensure we only set the Operating System
	Extension when we are on an M-profile core.
	* gas/testsuite/gas/arm/pr12198-1.d: New test.
	* gas/testsuite/gas/arm/pr12918-1.s: Likewise.
	* gas/testsuite/gas/arm/pr12198-2.d: Likewise.
	* gas/testsuite/gas/arm/pr12918-2.s: Likewise.
	* include/opcode/arm.h (ARM_AEXT_V6M_ONLY): New define.
	(ARM_AEXT_V6M): Rewrite in terms of ARM_AEXT_V6M_ONLY.
	(ARM_ARCH_V6M_ONLY): New define.
2010-11-15 10:03:05 +00:00
Mike Frysinger 6936240e66 bfd: bfin: drop needless symbol flag handling imported from FRV
The Blackfin bfd merged some FRV code recently, and then removed pieces
that didn't make sense.  In the FRV code, it outputs a "_gp" symbol in
its BFD whereas in the Blackfin code, we don't.  So while on the FRV
side it fiddles with the "flags" variable (sometimes using it for section
flags and sometimes using it for symbol flags), we don't need any of
that.  This lead to BZ 12177 where the Blackfin code is a bit confusing.
So to fix things up, remove more stuff we don't need.  Shouldn't change
the behavior at all.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-15 08:34:00 +00:00
gdbadmin 7eb3536ef8 *** empty log message *** 2010-11-15 00:00:33 +00:00
Alan Modra 2c08d94b5d daily update 2010-11-14 23:00:06 +00:00
DJ Delorie 28fadfc482 merge from gcc 2010-11-14 21:42:55 +00:00
Pierre Muller 73c964d623 * arm-tdep.c (arm_in_function_epilogue_p): Fix code to avoid
possible used of uninitialized variable.
2010-11-14 12:10:59 +00:00
gdbadmin ef13ebfec9 *** empty log message *** 2010-11-14 00:00:34 +00:00
Alan Modra 5a7a096583 daily update 2010-11-13 23:00:06 +00:00
Richard Sandiford e391c02431 gas/
* config/tc-mips.c (macro_build): Remove gas_assert from 'o' case.
	Use a restricted gas_assert for 'i' and 'j'.

gas/testsuite/
	* gas/mips/elf-rel28.s, gas/mips/elf-rel28-n32.d,
	gas/mips/elf-rel28-n64.d: New test.
	* gas/mips/mips.exp: Run it.
2010-11-13 11:59:21 +00:00
DJ Delorie 361c311554 merge from gcc 2010-11-13 02:20:31 +00:00
gdbadmin df6008afc8 *** empty log message *** 2010-11-13 00:00:33 +00:00
Alan Modra 1797d6128c daily update 2010-11-12 23:00:05 +00:00
H.J. Lu e326bf5f36 Properly copy BFD_COMPRESS and BFD_DECOMPRESS to archive element.
2010-11-12  H.J. Lu  <hongjiu.lu@intel.com>

	* archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS and
	BFD_DECOMPRESS.
	(bfd_openr_next_archived_file): Revert the last change.
2010-11-12 22:10:18 +00:00
Nathan Froyd 74af9197f1 gdb/
* rs6000-tdep.c (bfd_uses_spe_extensions): New function.
	(rs6000_gdbarch_init): Call it.
2010-11-12 21:54:31 +00:00
Nathan Froyd e52d501632 gdb/
* rs6000-tdep.c (gdb_print_insn_powerpc): Disassemble e500
	instructions if debugging an E500 binary.
2010-11-12 21:53:10 +00:00
Nathan Froyd d4eba7d1b0 gdb/testsuite/
* gdb.stabs/gdb11479.exp: Use runto_main.
2010-11-12 21:49:55 +00:00
Nathan Froyd b04c2f88b6 gdb/testsuite/
* gdb.base/break-entry.exp: Skip if using a stub.
2010-11-12 21:47:47 +00:00
Nathan Froyd ae9d7ce40f gdb/testsuite/
* gdb.python/py-inferior.exp: Pack values in target endianness.
2010-11-12 21:44:49 +00:00
Tom Tromey 621c83642d gdb
* varobj.c (value_get_print_value): Rearrange.  Pass stream to
	apply_varobj_pretty_printer.
	* c-lang.c: Include exceptions.h.
	(c_get_string): Throw MEMORY_ERROR when appropriate.
	* python/py-prettyprint.c (enum string_repr_result): New.
	(print_stack_unless_memory_error): New function.
	(print_string_repr): Change return type.  Use
	print_stack_unless_memory_error.
	(print_children): Use print_stack_unless_memory_error.
	(apply_val_pretty_printer): Update.  Don't print children if
	string representation threw an exception.
	(apply_varobj_pretty_printer): Add 'stream' argument.  Use
	print_stack_unless_memory_error.
	* python/python.c (gdbpy_gdb_error, gdbpy_gdb_memory_error): New
	globals.
	(_initialize_python): Initialize them.
	* python/python-internal.h (GDB_PY_HANDLE_EXCEPTION): Use
	gdbpy_convert_exception.
	(GDB_PY_SET_HANDLE_EXCEPTION): Likewise.
	(gdbpy_gdb_error, gdbpy_gdb_memory_error): Declare.
	(gdbpy_convert_exception): Declare.
	(apply_varobj_pretty_printer): Update.
	* python/py-utils.c (gdbpy_convert_exception): New function.
gdb/doc
	* gdb.texinfo (Basic Python): Update.  Add xref.
	(Exception Handling): Document new exception classes.
	(Types In Python): Update.
	(Frames In Python): Update.
gdb/testsuite
	* gdb.python/py-prettyprint.c (main): Add new 'ns2' local.
	* gdb.python/py-prettyprint.exp (run_lang_tests): Add test for
	MemoryError.
	* gdb.python/python.exp (gdb_py_test_multiple): Update exception
	type.
	* gdb.python/py-value.exp (test_value_in_inferior): Add test for
	MemoryError.
	(test_subscript_regression): Update exception type.
2010-11-12 20:49:43 +00:00
Marc Khouzam f1b9e6e7ee 2010-11-12 Marc Khouzam <marc.khouzam@ericsson.com>
* mi/mi-main.c (mi_cmd_target_detach): Accept new
        thread-group id format.
2010-11-12 18:46:42 +00:00
Jan Kratochvil 74884f7bdd gdb/
* spu-tdep.c (spu_catch_start): Fix compilation error typo.
2010-11-12 12:38:39 +00:00
DJ Delorie 5cbc4f2ea1 * rx.c (lsb_count): New.
(divu_cycles): New.
(div_cycles): New.
(decode_opcode): Fix cycle count math for div, divu, suntil, and
swhile.
2010-11-12 01:01:12 +00:00
gdbadmin e493c3b7f3 *** empty log message *** 2010-11-12 00:00:02 +00:00
Alan Modra 72c57f8782 daily update 2010-11-11 23:00:05 +00:00
Phil Muldoon 84f4c1fe05 2010-11-11 Phil Muldoon <pmuldoon@redhat.com>
* python/py-breakpoint.c (BPPY_REQUIRE_VALID): Check if bp is
	NULL.
	(BPPY_SET_REQUIRE_VALID): Ditto.
	(bpnum_is_valid): Delete function.
	(bppy_get_visibility): New function.
	(bppy_new): Parse for, and validate internal keyword.  Pass
	internal keyword to breakpoint or watchpoint functions.
	(build_bp_list): New function.
	(gdbpy_breakpoints): Rewrite.  Use build_bp_list and
	iterate_over_breakpoints.
	(gdbpy_breakpoint_created): Rewrite.  Do not store breakpoints in a
	look-aside vector.
	(gdbpy_breakpoint_deleted): Rewrite, defer breakpoint management
	to internal breakpoint chain.

	* breakpoint.c (set_breakpoint_number): New function.
	(breakpoint_1): Check if breakpoint number is more than zero.
	(set_raw_breakpoint_without_location): Set py_bp_object to NULL.
	(create_breakpoint_sal): Take a new parameter called internal.
	Call set_breakpoint_number with internal parameter.  Do not
	mention internal breakpoints.  All callers updated.
	(create_breakpoint): Ditto.
	(create_breakpoints_sal): Ditto.
	(watch_command_1): Ditto.
	(watch_command_wrapper): Take a new parameter called internal.
	All callers updated.
	(rwatch_command_wrapper): Ditto.
	(awatch_command_wrapper): Ditto.
	(save_breakpoints): Update breakpoint save condition check.
	(iterate_over_breakpoints): New function.
	* breakpoint.h: Add conditional python includes.  Add py_bp_object
	and comment to struct breakpoint.  Update all callers.
	* defs.h: Add PyObject definition for GDB builds without Python.

2010-11-11  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Breakpoints In Python): Document "internal"
	parameter, and visible attribute.


2010-11-11  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-breakpoint.exp: Add internal watchpoint and
	breakpoint tests.
2010-11-11 14:11:56 +00:00
Richard Sandiford 95a2c8d6f7 gold/
* symtab.h (Symbol::NON_PIC_REF): Remove.
	(Symbol::RELATIVE_REF, Symbol::TLS_REF): New Reference_flags.
	(Symbol::FUNCTION_CALL): Renumber.  Reword comment.
	(Symbol::needs_dynamic_reloc): Don't check NON_PIC_REF.
	(Symbol::use_plt_offset): Take a flags argument and pass it
	directly to needs_dynamic_reloc.  Restrict check for undefined
	weak symbols to function calls.
	* arm.cc (Target_arm::Scan::get_reference_flags): New function.
	(Target_arm::Scan::global): Use it.
	(Target_arm::Scan::scan_reloc_for_stub): Likewise.
	(Target_arm::Relocate::relocate): Likewise.
	(Target_arm::Relocate::should_apply_static_reloc): Replace flags
	parameter with an r_type parameter.  Use get_reference_flags
	to get the flags.
	(Target_arm::Relocate::relocate): Update accordingly.
	* i386.cc (Target_i386::Scan::get_reference_flags): New function.
	(Target_i386::Scan::reloc_needs_plt_for_ifunc): Use it.
	(Target_i386::Scan::global): Likewise.
	(Target_i386::Relocate::relocate): Likewise.
	(Target_i386::Relocate::should_apply_static_reloc): Replace flags
	parameter with an r_type parameter.  Use get_reference_flags
	to get the flags.
	(Target_i386::Relocate::relocate): Update accordingly.
	* powerpc.cc (Target_powerpc::Scan::get_reference_flags): New function.
	(Target_powerpc::Scan::global): Use it.
	(Target_powerpc::Scan::scan_reloc_for_stub): Likewise.
	(Target_powerpc::Relocate::relocate): Likewise.
	* sparc.cc (Target_sparc::Scan::get_reference_flags): New function.
	(Target_sparc::Scan::global): Use it.
	(Target_sparc::Scan::scan_reloc_for_stub): Likewise.
	(Target_sparc::Relocate::relocate): Likewise.
	* x86_64.cc (Target_x86_64::Scan::get_reference_flags): New function.
	(Target_x86_64::Scan::reloc_needs_plt_for_ifunc): Use it.
	(Target_x86_64::Scan::global): Likewise.
	(Target_x86_64::Relocate::relocate): Likewise.
2010-11-11 10:43:30 +00:00
Nick Clifton fd50354116 bfd/
* archures.c (bfd_mach_mips_loongson_3a): Defined.
	* bfd-in2.h (bfd_mach_mips_loongson_3a): Defined.
	* cpu-mips.c (I_loongson_3a): New add.
	(arch_info_struct): Add loongson_3a.
	* elfxx-mips.c (_bfd_elf_mips_mach): Add loongson_3a.
	(mips_set_isa_flags): Add loongson_3a.
	(mips_mach_extensions): Add loongson_3a in MIPS64 extensions.

	binutils/
	* readelf.c (get_machine_flags): Add loongson-3a.

	gas/
	* config/tc-mips.c (mips_cpu_info_table): Add loongson3a in MIPS 64.
	* doc/c-mips.texi (MIPS cpu): Add loongson3a.

	include/
	* elf/mips.h (E_MIPS_MACH_LS3A): Defined.
	* opcode/mips.h (INSN_LOONGSON_3A): Defined.
	(CPU_LOONGSON_3A): Defined.
	(OPCODE_IS_MEMBER): Add LOONGSON_3A.

	opcodes/
	* mips-dis.c (mips_arch_choices): Add loongson3a.
	* mips-opc.c (IL3A): Defined as INSN_LOONGSON_3A.
	(mips_builtin_opcodes): Modify some instructions' membership from
	IL2F to IL2F|IL3A, since these instructions are supported by Loongson_3A.
2010-11-11 10:23:39 +00:00
gdbadmin d5906a46f1 *** empty log message *** 2010-11-11 00:00:33 +00:00
Doug Evans f61a2da754 * python/lib/gdb/command/pretty_printers.py
(do_enable_pretty_printer_1): Handle printer.subprinters is None.
2010-11-10 23:44:14 +00:00
Alan Modra f29aae8738 daily update 2010-11-10 23:00:06 +00:00
Doug Evans 4dfea56049 * value.c (set_value_enclosing_type): Renamed from
value_change_enclosing_type.  All callers updated.
	* value.h (set_value_enclosing_type): Update.
	* valops.c (value_full_object): Always return a copy if we need to
	make changes to the input value.
2010-11-10 17:47:23 +00:00
Richard Sandiford 51020d214b bfd/
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove unused
	variables.
2010-11-10 14:54:30 +00:00
Nick Clifton 8e295ce05a Updated translations. 2010-11-10 14:39:10 +00:00
Richard Sandiford 12d6b0b7ba gas/
* config/tc-arm.c (do_t_branch): Treat (PLT) branches as wide.

gas/testsuite/
	* gas/arm/plt-1.s, gas/arm/plt-1.d: New test.
2010-11-10 13:36:31 +00:00
gdbadmin fd3646071c *** empty log message *** 2010-11-10 00:00:03 +00:00
Alan Modra 45f64f6759 daily update 2010-11-09 23:00:04 +00:00