Commit Graph

71118 Commits

Author SHA1 Message Date
Doug Evans d234ef5c0c * cli/cli-cmds.c (source_script_with_search): Pass full path to
source_script_from_stream if it may have been found on the search path.
	* python/py-auto-load.c (source_section_scripts): Pass full path to
	source_python_script_for_objfile.
	* python/python.c (source_python_script): Delete stream parameter.
	All callers updated.
	(source_python_script_for_objfile): Ditto.
	* python/python-internal.h (source_python_script_for_objfile): Update.
	* python/python.h (source_python_script): Update.

	testsuite/
	* gdb.python/python.exp: Test source -s.
2011-10-27 15:46:11 +00:00
Peter Bergner a08fc94222 opcodes/
* ppc-opc.c (powerpc_opcodes) <drrndq, drrndq., dtstexq, dctqpq,
	dctqpq., dctfixq, dctfixq., dxexq, dxexq., dtstsfq, dcffixq, dcffixq.,
	diexq, diexq.>: Use FRT, FRA, FRB and FRBp repsectively on DFP quad
	instructions.
2011-10-27 15:44:01 +00:00
Tom Tromey d849d44f82 * ada-lang.h (ada_start_decode_line_1, ada_finish_decode_line_1)
(ada_sals_for_line): Remove declarations.
2011-10-27 15:32:15 +00:00
Joern Rennecke 926e2094bb bfd:
* cpu-epiphany.c: Reinstate full list of Copyright years.
        * elf32-epiphany.c: Likewise.
cpu:
        * epiphany.cpu, epiphany.opc: Likewise.
gas:
        * config/tc-epiphany.c, config/tc-epiphany.h: Likewise.
        * doc/c-epiphany.texi: Likewise.
include:
        * elf/epiphany.h: Likewise.
2011-10-27 14:27:16 +00:00
Joern Rennecke 5b169225fe * MAINTAINERS: Add myself as EPIPHANY port maintainer. 2011-10-27 14:13:24 +00:00
Kevin Pouget 2231f1fb60 Move unwind reasons to an external .def file
gdb/
	* frame.c (frame_stop_reason_string): Rewrite using
	unwind_stop_reasons.def.
	* frame.h (enum unwind_stop_reason): Likewise.
	* python/py-frame.c (gdbpy_initialize_frames): Likewise.
	(gdbpy_frame_stop_reason_string): Use new enum unwind_stop_reason
	constants for bound-checking.
	* unwind_stop_reasons.def: New file.
	* stack.c (backtrace_command_1): Handle UNWIND_FIRST_ERROR as an alias
	instead of a distinct value.

doc/
	* gdb.texinfo ((Frames In Python): Document
	gdb.FRAME_UNWIND_FIRST_ERROR contant.
2011-10-27 11:04:27 +00:00
Phil Muldoon f77b9a5df0 2011-10-27 Phil Muldoon <pmuldoon@redhat.com>
PR python/13331

	* python/py-function.c (fnpy_call): Check 'args' is not NULL.
	(convert_values_to_python): Return on Python tuple allocation
	failure.  Return NULL on value conversion error.
2011-10-27 10:29:58 +00:00
Nick Clifton c28a9f4951 * config.sub: Import these changes from the config project:
2011-10-08  Joern Rennecke <joern.rennecke@embecosm.com>
	    Ben Elliston  <bje@gnu.org>

	* config.sub (epiphany): New.

	2011-09-09  Linas Vepstas  <linasvepstas@gmail.com>
	    Ben Elliston  <bje@gnu.org>

        * config.sub (hexagon, hexagon-*): New.

	2011-08-23  Roland McGrath  <mcgrathr@google.com>

	* config.sub: Rename 32eb to be32, 32el to le32, 64el to le64, and
	64eb to be64.

	2011-08-16  Roland McGrath  <mcgrathr@google.com>

	* config.sub (32eb, 32el, 64eb, 64el): New (pseudo-)CPUs.
	(nacl): Grok as alias for 32el-unknown-nacl.
2011-10-27 09:45:25 +00:00
Phil Muldoon 76dce0be7b 2011-10-27 Phil Muldoon <pmuldoon@redhat.com>
* python/py-breakpoint.c (bppy_set_enabled): Use TRY_CATCH.
	(bppy_set_task): Ditto.
	(bppy_delete_breakpoint): Ditto.
	* python/py-symbol.c (gdbpy_lookup_symbol): Ditto.
	(gdbpy_lookup_global_symbol): Ditto.
	* python/py-lazy-string.c (stpy_convert_to_value): Ditto.
	* python/py-frame.c (frapy_is_valid): Ditto.
	(frame_info_to_frame_object): Ditto.
	* python/py-type.c (typy_lookup_type): Ditto.
	(typy_getitem): Ditto.
	(typy_has_key): Ditto.
	(typy_richcompare): Use TRY_CATCH.  Do not return Py_NE on error.
2011-10-27 09:14:27 +00:00
gdbadmin d848dec6d9 *** empty log message *** 2011-10-27 00:00:02 +00:00
Alan Modra 148465d2b9 daily update 2011-10-26 23:00:04 +00:00
Joel Brobecker f17b69551b Regenerate gdbarch.h
Not sure why, but the version currently checked in as an extraneous
trailing whitespace that showed up as a diff when I reran gdbarch.sh.

gdb/ChangeLog:

        * gdbarch.h: Regenerate.
2011-10-26 21:23:55 +00:00
Joel Brobecker 86ba104287 Fix 'sprintf' of potential NULL pointer in 'maint print arch'
gdb/
        * gdbarch.sh (function_list): Use 'pstring' when printing
        'gcore_bfd_target'.
        * gdbarch.c: Regenerate.
2011-10-26 18:21:38 +00:00
Ulrich Weigand c34fd85260 * regcache.c (registers_changed_ptid): Invalidate thread architecture
and frame caches if PTID refers to all threads of a process.
2011-10-26 17:32:00 +00:00
Ulrich Weigand 931bb47f45 * spu-tdep.c (spu_catch_start): Pass non-NULL breakpoint ops
to create_breakpoint.
2011-10-26 17:26:29 +00:00
Ulrich Weigand 88aed45eb4 * ppc-sysv-tdep.c (ppc_sysv_use_opencl_abi): New function.
(ppc_sysv_abi_push_dummy_call): Use it.
	(do_ppc_sysv_return_value): Likewise.
	(ppc64_sysv_abi_push_dummy_call): Likewise.
	(ppc64_sysv_abi_return_value): Likewise.
2011-10-26 17:21:53 +00:00
DJ Delorie 85d7ed08a8 merge from gcc 2011-10-26 15:56:36 +00:00
Paul Koning 5110b5dfaa * gdb.texinfo (gdb.types): Document new deepitems function. 2011-10-26 15:10:38 +00:00
Paul Koning ab964825cc * gdb.python/lib-types.cc (struct A): New structure.
* gdb.python/lib-types.exp (deepitems): New tests.
2011-10-26 15:10:11 +00:00
Paul Koning 3eaf3fa296 * python/lib/gdb/types.py (deepitems): New function. 2011-10-26 15:09:40 +00:00
Nick Clifton f6dd4781ef PR binutils/13348
* i386-dis.c (print_insn): Fix testing of array subscript.
2011-10-26 14:46:00 +00:00
Joern Rennecke fd936b4c69 cpu:
* epiphany.opc (parse_branch_addr): Fix type of valuep.
        Cast value before printing it as a long.
        (parse_postindex): Fix type of valuep.
opcodes:
        * epiphany-asm.c, epiphany-opc.h: Regenerate.
2011-10-26 12:46:04 +00:00
Joern Rennecke 56b1318518 gas:
* doc/as.texinfo [EPIPHANY]: Include c-epiphany.texi to avoid
        duplication.
opcodes:
        * disassemble.c (ARCH_epiphany): Move into alphasorted spot.
2011-10-26 12:14:17 +00:00
Nick Clifton cef976f513 * hist.c (hist_assign_samples_1): Update comment. 2011-10-26 09:51:57 +00:00
Nick Clifton 29942be825 PR ld/13049
* elf64-ppc.c (STUB_SUFFIX): Revert previous delta.
	* elf32-hppa.c (STUB_SUFFIX): Likewise.
2011-10-26 09:47:58 +00:00
gdbadmin 4f4a26fabb *** empty log message *** 2011-10-26 00:00:03 +00:00
Alan Modra 913ac4c077 daily update 2011-10-25 23:00:04 +00:00
Mike Frysinger 506eb5219e binutils: fix out of tree building with syslex regens
If you take a release tarball (which has pregenerated syslex and sysinfo files
in it), apply some patches which touch syslex.l, and then build the result out
of tree, it will fail.  This is because syslex.l uses sysinfo.h, but the
sysinfo.y file wasn't updated and so it wasn't regenerated (the files are found
in the $srcdir), and the build rule for syslex.c does not use -I$(srcdir) when
it finds a local file.  Simple fix below.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-25 20:39:41 +00:00
Mike Frysinger 214ce7b58a Building rx's gas code atm fails:
rx-parse.c: In function ‘rx_parse’:
rx-parse.c:3774:9: error: passing argument 1 of ‘rx_error’ discards ‘const’
	qualifier from pointer target type [-Werror]
../../../gas/config/rx-defs.h:40:12: note:
	expected ‘char *’ but argument is of type ‘const char *’
cc1: all warnings being treated as errors

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-25 20:36:22 +00:00
Paul Koning 54d8a6445f * gdb.python/py-value.exp: Add testcases for is_lazy attribute,
fetch_lazy method.
2011-10-25 18:35:49 +00:00
Paul Koning 22dbab4672 PR python/13327
* gdb.texinfo (Values From Inferior): Add is_lazy attribute,
fetch_lazy method.
2011-10-25 18:35:19 +00:00
Paul Koning 913460fcde PR python/13327
* python/py-value.c (value_to_value_object): Remove fetching of
the value if it was lazy.
(valpy_get_is_lazy): New function.
(valpy_fetch_lazy): New function.
2011-10-25 18:34:51 +00:00
Nick Clifton db5d0b26be Oops - apply correct patch for previous delta. 2011-10-25 16:46:46 +00:00
Nick Clifton dfc4b250e3 * config/tc-ns32k.c (md_begin): Rename local variable 'stat' to 'status'. 2011-10-25 13:35:00 +00:00
Nick Clifton cfb8c0921c bfd:
* Makefile.am (ALL_MACHINES): Add cpu-epiphany.lo .
	(ALL_MACHINES_CFILES): Add cpu-epiphany.c .
	(BFD32_BACKENDS): Add elf32-epiphany.lo .
	(BFD32_BACKENDS_CFILES): Add elf32-epiphany.c .
	* Makefile.in, bfd-in2.h, configure, libbfd.h: Regenerate.
	* archures.c (bfd_arch_epiphany): Add.
	(bfd_mach_epiphany16, bfd_mach_epiphany32): Define.
	(bfd_epiphany_arch): Declare.
	(bfd_archures_list): Add &bfd_epiphany_arch.
	* config.bfd (epiphany-*-elf): New target case.
	* configure.in (bfd_elf32_epiphany_vec): New target vector case.
	* reloc.c (BFD_RELOC_EPIPHANY_SIMM8): New relocation.
	(BFD_RELOC_EPIPHANY_SIMM24, BFD_RELOC_EPIPHANY_HIGH): Likewise.
	(BFD_RELOC_EPIPHANY_LOW, BFD_RELOC_EPIPHANY_SIMM11): Likewise.
	(BFD_RELOC_EPIPHANY_IMM11, BFD_RELOC_EPIPHANY_IMM8): Likewise.
	* targets.c (bfd_elf32_epiphany_vec): Declare.
	(_bfd_target_vector): Add bfd_elf32_epiphany_vec.
	* po/SRC-POTFILES.in, po/bfd.pot: Regenerate.
	* cpu-epiphany.c, elf32-epiphany.c: New files.
binutils:
	* readelf.c (include "elf/epiphany.h")
	(guess_is_rela, dump_relocation): Handle EM_ADAPTEVA_EPIPHANY.
	(get_machine_name, is_32bit_abs_reloc, is_32bit_pcrel_reloc): Likewise.
	(is_16bit_abs_reloc, is_none_reloc): Likewise.
	* po/binutils.pot: Regenerate.
cpu:
	* cpu/epiphany.cpu, cpu/epiphany.opc: New files.
gas:
	* NEWS: Mention addition of Adapteva Epiphany support.
	* config/tc-epiphany.c, config/tc-epiphany.h: New files.
	* Makefile.am (TARGET_CPU_CFILES): Add config/tc-epiphany.c .
	(TARGET_CPU_HFILES): Add config/tc-epiphany.h .
	* Makefile.in, configure, doc/Makefile.in, po/POTFILES.in: Regenerate.
	* configure.in: Also set using_cgen for epiphany.
	* configure.tgt: Handle epiphany.
	* doc/Makefile.am (CPU_DOCS): Add c-epiphany.texi .
	* doc/all.texi: Set EPIPHANY.
	* doc/as.texinfo: Add EPIPHANY-specific text.
	* doc/c-epiphany.texi: New file.
	* po/gas.pot: Regenerate.
gas/testsuite:
	* gas/epiphany: New directory.
include:
	* dis-asm.h (print_insn_epiphany): Declare.
	* elf/epiphany.h: New file.
	* elf/common.h (EM_ADAPTEVA_EPIPHANY): Define.
ld:
	* NEWS: Mention addition of Adapteva Epiphany support.
	* Makefile.am (ALL_EMULATION_SOURCES): Add eelf32epiphany.c .
	(eelf32epiphany.c): New rule.
	* Makefile.in: Regenerate.
	* configure.tgt: Handle epiphany-*-elf.
	* po/ld.pot: Regenerate.
	* testsuite/ld-srec/srec.exp: xfail epiphany.
	* emulparams/elf32epiphany.sh: New file.
opcodes:
	* Makefile.am (HFILES): Add epiphany-desc.h and epiphany-opc.h .
	(TARGET_LIBOPCODES_CFILES): Add  epiphany-asm.c, epiphany-desc.c,
	epiphany-dis.c, epiphany-ibld.c and epiphany-opc.c .
	(CLEANFILES): Add stamp-epiphany.
	(EPIPHANY_DEPS): Set.  Make CGEN-generated Epiphany files depend on it.
	(stamp-epiphany): New rule.
	* Makefile.in, configure, po/POTFILES.in, po/opcodes.pot: Regenerate.
	* configure.in: Handle bfd_epiphany_arch.
	* disassemble.c (ARCH_epiphany): Define.
	(disassembler): Handle bfd_arch_epiphany.
	* epiphany-asm.c, epiphany-desc.c, epiphany-desc.h: New files.
	* epiphany-dis.c, epiphany-ibld.c, epiphany-opc.c: Likewise.
	* epiphany-opc.h: Likewise.
2011-10-25 11:18:16 +00:00
Nick Clifton 0a394bfbad PR gprof/13325
* hist.c (hist_assign_samples_1): Make sure that inner loop
	iterator remains valid.
2011-10-25 08:38:49 +00:00
Kai Tietz 81472056d7 2011-10-25 Kai Tietz <ktietz@redhat.com>
* winduni.h (unicode_from_ascii_len): New prototype.
	* winduni.c (unicode_from_ascii_len): New function.
	* windres.h (define_stringtable): Add additional length argument.
	* windres.c (define_stringtable): Add length argument for string.
	* rcparse.y (res_unicode_sizedstring): New rule.
	(res_unicode_sizedstring_concat): Likewise.
	(string_data): Adjust rule.

2011-10-25  Kai Tietz  <ktietz@redhat.com>

	* binutils-all/windres/strtab4.rc: New test.
	* binutils-all/windres/strtab4.rsd: Likewise.
2011-10-25 08:03:18 +00:00
gdbadmin 977888b990 *** empty log message *** 2011-10-25 00:00:32 +00:00
Alan Modra 557b35e67d daily update 2011-10-24 23:00:05 +00:00
Joel Brobecker 2b5b9d09ed [powerpc] crash trying to allocate memory in inferior
Our testsuite noticed a crash when trying to call a function which
requires GDB to allocate memory in the inferior. Typically, this
happens when one of the parameters is a string.  For instance, our
testcase tries:

    (gdb) call debug.trace (me, "You")
    [1]    32737 segmentation fault /path/to/gdb

What happens is that GDB sees the string, and thus tries to allocate
memory for it in the inferior:

> /* Allocate NBYTES of space in the inferior using the inferior's
>    malloc and return a value that is a pointer to the allocated
>    space.  */
>
> struct value *
> value_allocate_space_in_inferior (int len)
> {
>   struct objfile *objf;
>   struct value *val = find_function_in_inferior ("malloc", &objf);

And find_function_in_inferior first searches the symtab in case
we have debug info.  But, in our case (bareboard powerpc), we don't,
so it gets "malloc"'s address from the minimal symbols, and builds
a value whose type is a TYPE_CODE_PTR, not a TYPE_CODE_FUNC.

As a result, when we later try to make the call to malloc, we end up
inside the powerpc tdep code that has:

> do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *func_type,
[...]
>   if (func_type
>       && TYPE_CALLING_CONVENTION (func_type) == DW_CC_GDB_IBM_OpenCL)

The problem is that func_type is not a TYPE_CODE_FUNC, and thus
the type-specific kind is not TYPE_SPECIFIC_FUNC, and so we do
TYPE_CALLING_CONVENTION is an invalid access.

Interestingly, the other call to TYPE_CALLING_CONVENTION is correctly
preceded by a check of the type's TYPE_CODE (making sure that it is
TYPE_CODE_FUNC).

gdb/ChangeLog:

        * ppc-sysv-tdep.c (do_ppc_sysv_return_value): Do not check
        FUNC_TYPE's calling convention if FUNC_TYPE is not a function.
2011-10-24 16:51:36 +00:00
Julian Brown c373271616 opcodes/
* m68k-opc.c (m68k_opcodes): Fix entries for ColdFire moveml.

    gas/testsuite/
    * gas/m68k/all.exp (movem-offset): Add test.
    * gas/m68k/movem-offset.s: New test.
    * gas/m68k/movem-offset.d: New.
2011-10-24 16:36:51 +00:00
Jan Kratochvil a7a0b6a5be binutils/
* dwarf.c (read_and_display_attr_value) <DW_AT_import>: Add CU_OFFSET
	also for DW_FORM_ref_udata.
2011-10-24 14:28:02 +00:00
Pedro Alves e21ffe51c9 2011-10-24 Pedro Alves <pedro@codesourcery.com>
gdb/
	* linux-nat.c (linux_handle_extended_wait): When handling a clone
	event, in non-stop, if not stopping, make sure the new lwp has
	last_resume_kind set to resume_continue.  Assert that when we're
	resuming the new lwp, its last_resume_kind is resume_continue.
2011-10-24 14:25:52 +00:00
Maciej W. Rozycki 7951ca422a * config/tc-mips.c (move_register): Fix formatting. 2011-10-24 14:25:01 +00:00
Maciej W. Rozycki 26f85d7a30 * mips.h: Fix a typo in description. 2011-10-24 14:21:41 +00:00
Maciej W. Rozycki 72671e6201 * config/tc-mips.c (can_swap_branch_p): Remove empty line.
(start_noreorder): Likewise.
2011-10-24 14:17:10 +00:00
Pedro Alves 7aee8dc2c2 2011-10-24 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infrun.c (handle_inferior_event): Don't assume inferior_ptid is
	already set when marking the event thread as not executing in
	non-stop mode.
2011-10-24 14:09:20 +00:00
Maciej W. Rozycki 8b828383a8 * config/tc-mips.c (s_option): Fix formatting.
(mips_elf_final_processing): Likewise.
2011-10-24 14:08:23 +00:00
Maciej W. Rozycki 444d75be22 * config/tc-mips.c (validate_micromips_insn): Fix formatting. 2011-10-24 14:04:42 +00:00
Pedro Alves 4b4e080e83 2011-10-24 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infrun.c (handle_inferior_event): Add debug output for
	TARGET_WAITKIND_NO_HISTORY.
2011-10-24 14:01:12 +00:00