Joel Brobecker [Thu, 16 Aug 2012 23:55:02 +0000 (23:55 +0000)]
fix internal_error during fork event handling.
When running on ia64-hpux a program that calls fork, GDB currently
reports the following internal error:
internal-error: Can't determine the current address space of thread process 1882
Here is what happens:
1. GDB receives a "fork" event;
2. handle_inferior_event calls detach_breakpoints for the child process;
3. detach_breakpoints calls ia64's gdbarch remove_breakpoint hook,
which needs to read an entire instruction slot in order to remove
a breakpoint instruction from memory;
4. To read inferior memory, the ia64-hpux code needs to know where
that memory is located relative to the bsp..bspstore area,
and thus needs to read the value of those registers;
5. To get the value of those registers, ia64_hpux_xfer_memory current
uses the current regcache.
The problem is that at the time we are trying to remove the breakpoints
from the child, the child process is not part of the list of inferiors
really known to GDB (it has not been added to inferior_list), so trying
to create a regcache for it triggers an internal error when creating
address space for the regcache (as the address space is ultimately
fetched from the inferior).
To work around this limitation, ia64_hpux_xfer_memory has been modified
to detect the fact the current inferior is not in our inferior list,
and to go, in that case, straight to the source to fetch the registers
it needs.
gdb/ChangeLog:
* ia64-hpux-nat.c (ia64_hpux_get_register_from_save_state_t):
New function.
(ia64_hpux_xfer_memory): Check if inferior_ptid is known before
using the regache. Use ia64_hpux_get_register_from_save_state_t
to access the bsp and bspstore registers if not.
Joel Brobecker [Thu, 16 Aug 2012 23:54:50 +0000 (23:54 +0000)]
Change detach_breakpoints to take a ptid instead of a pid
Before this change, detach_breakpoints would take a pid, and then
set inferior_ptid to a ptid that it constructs using pid_to_ptid (pid).
Unfortunately, this ptid is not necessarily valid. Consider for
instance the case of ia64-hpux, where ttrace refuses a register-read
operation if the LWP is not provided.
This problems shows up when GDB is trying to handle fork events.
Assuming GDB is configured to follow the parent, GDB will try to
detach from the child. But before doing so, it needs to remove
all breakpoints inside that child. On ia64, this involves reading
inferior (the child's) memory. And on ia64-hpux, reading memory
requires us to read the bsp and bspstore registers, in order to
determine where that memory is relative to the value of those
registers, and thus to determine which ttrace operation to use in
order to fetch that memory (see ia64_hpux_xfer_memory).
This patch therefore changes detach_breakpoints to take a ptid instead
of a pid, and then updates all callers.
One of the consequences of this patch is that it trips an assert
on GNU/Linux targets. But this assert appears to have not actual
purpose, and is thus removed.
gdb/ChangeLog:
* breakpoint.h (detach_breakpoints): pid parameter is now a ptid.
* breakpoint.c (detach_breakpoints): Change pid parameter into
a ptid. Adjust code accordingly.
* infrun.c (handle_inferior_event): Delete variable child_pid.
Update call to detach_breakpoints to pass the child ptid for
fork events.
* linux-nat.c (linux_nat_iterate_watchpoint_lwps): Remove
assert that inferior_ptid's lwp is zero.
(linux_handle_extended_wait): Update call to detach_breakpoints.
* inf-ttrace.c (inf_ttrace_follow_fork): Update call to
detach_breakpoints.
Joel Brobecker [Thu, 16 Aug 2012 23:54:37 +0000 (23:54 +0000)]
inf_ttrace_follow_fork: detach_breakpoints called twice for child.
When debugging a program that forks with follow-fork set to follow
the parent, we end up calling detach_breakpoints for the child twice.
On ia64-hpux, this leads to a warning when trying to remove the
breakpoints the second time around, because the ia64 code detects
that the address does not point to a breakpoint instruction.
gdb/ChangeLog:
* inf-ttrace.c (inf_ttrace_follow_fork): When following the
parent, only call detach_breakpoints if tts.tts_event ==
TTEVT_VFORK.
H.J. Lu [Thu, 16 Aug 2012 20:31:34 +0000 (20:31 +0000)]
Add a testcase for PR binutils/14481
binutils/
PR binutils/14481
* Makefile.am (BFDTEST1_PROG): New.
(TEST_PROGS): Likewise.
(bfdtest1_DEPENDENCIES): Likewise.
(noinst_PROGRAMS): Add $(TEST_PROGS).
* Makefile.in: Regenerated.
* bfdtest1.c: New file.
binutils/testsuite/
PR binutils/14481
* ar.exp (bfdtest1): New.
(long_filenames): Run bfdtest1.
(thin_archive): Likewise.
(thin_archive_with_nested): Likewise.
Peter Bergner [Thu, 16 Aug 2012 18:12:38 +0000 (18:12 +0000)]
* ppc-opc.c (powerpc_opcodes) <"lswx">: Use RAX for the second and
RBX for the third operand.
<"lswi">: Use RAX for second and NBI for the third operand.
Joel Brobecker [Thu, 16 Aug 2012 15:45:46 +0000 (15:45 +0000)]
DWARF frame unwinder executes one too many rows
The problem is trying to unwind from a function where %ebp is NOT
used as the frame pointer, and the size of the frame changes over
the lifetime of that function.
For instance, trying to unwind past the GNAT runtime function
called system.tasking.rendezvous.timed_selective_wait on x86-linux,
one can get:
(gdb) bt
[...]
#3 0x0805364b in system.tasking.rendezvous.timed_selective_wait ()
#4 0xb7fe5068 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
Looking at the CFI, we find the following initial instructions...
> DW_CFA_def_cfa: %esp+4 (r4 ofs 4)
> DW_CFA_offset: %eip at cfa-4 (r8 = %eip)
... and the associated FDE:
>
00001be4 00000054 00001be8 FDE cie=
00000000 pc=
08053310..
08053951
[...]
> DW_CFA_advance_loc: 8 to
080534ad
> DW_CFA_def_cfa_offset: 112
> DW_CFA_advance_loc2: 414 to
0805364b
> DW_CFA_def_cfa_offset: 108
[...]
The problem is that the DWARF frame unwinder executed the FDE until
the row for PC == 0x0805364b. But in reality, our program hasn't
executed the instruction at that address yet (it is the return address).
So GDB executed a little too much of the FDE, giving us the wrong
offset for the frame base, and thus the wrong address where %eip
got saved.
This patch fixes the problem by using a more correct PC as the bound
for executing the FDE.
gdb/ChangeLog:
* dwarf2-frame.c (dwarf2_frame_cache): Use
get_frame_address_in_block instead of get_frame_pc as
the bound for executing the frame's FDE.
gdb/testsuite/ChangeLog:
* gdb.ada/rdv_wait: New testcase.
Tom Tromey [Thu, 16 Aug 2012 14:24:44 +0000 (14:24 +0000)]
PR binutils/14475:
* archive.c (bfd_ar_hdr_from_filesystem): Allocate areltdata on
'member' BFD. Don't try to free 'ared'.
Nick Clifton [Thu, 16 Aug 2012 08:38:45 +0000 (08:38 +0000)]
oops - acxidentally omitted from previous delta.
Nick Clifton [Thu, 16 Aug 2012 07:56:19 +0000 (07:56 +0000)]
* end.c: Include config.h before system header files.
* erc32.c: Likewise.
* exec.c: Likewise.
* float.c: Likewise.
* func.c: Likewise.
* help.c: Likewise.
* interf.c: Likewise.
Yao Qi [Thu, 16 Aug 2012 07:36:28 +0000 (07:36 +0000)]
gdb/
* gdbtypes.h (enum type_code): Define TYPE_CODE_BITSTRING -1.
* arm-tdep.c (arm_type_align): Remove code handling TYPE_CODE_BITSTRING.
* c-typeprint.c (c_type_print_varspec_prefix): Likewise.
(c_type_print_varspec_suffix): Likewise.
* eval.c (evaluate_subexp_standard): Likewise.
* f-typeprint.c (f_type_print_varspec_prefix): Likewise.
(f_type_print_varspec_suffix): Likewise.
* gdbtypes.c (is_scalar_type): Likewise.
(recursive_dump_type): Likewise.
* infcall.c (value_arg_coerce): Likewise.
* m2-valprint.c (m2_val_print): Likewise.
* p-typeprint.c (pascal_type_print_varspec_prefix): Likewise.
(pascal_type_print_varspec_suffix): Likewise.
(pascal_type_print_base): Likewise.
* p-valprint.c (pascal_val_print): Likewise.
(pascal_val_print): Likewise.
* valops.c (value_slice): Likewise.
* valprint.c (scalar_type_p): Likewise.
* valarith.c (value_bitstring_subscript): Remove.
(value_concat): Remove code handling TYPE_CODE_BITSTRING.
Remove comment on TYPE_CODE_BITSTRING.
* stabsread.c (read_type): Don't set TYPE_CODE (type) to
TYPE_CODE_BITSTRING.
* python/py-type.c (pyty_codes): Move ENTRY (TYPE_CODE_BITSTRING) to
slot 0.
gdb/doc:
* gdb.texinfo (Types In Python): Mention gdb.TYPE_CODE_BITSTRING
is deprecated.
Yao Qi [Thu, 16 Aug 2012 07:26:16 +0000 (07:26 +0000)]
gdb/
* tracepoint.c (trace_find_none_command): Remove.
(_initialize_tracepoint): Call add_alias_cmd for "tfind none".
Yao Qi [Thu, 16 Aug 2012 07:21:59 +0000 (07:21 +0000)]
gdb/
* remote.c (handle_notification): Remove parameter 'length'.
(putpkt_binary, getpkt_or_notif_sane_1): Caller update.
gdbadmin [Thu, 16 Aug 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Thu, 16 Aug 2012 00:00:04 +0000 (00:00 +0000)]
daily update
Keith Seitz [Wed, 15 Aug 2012 23:43:14 +0000 (23:43 +0000)]
* gdbtypes.c (opaque_type_resolution): Make static.
Add missing comment.
(overload_debug): Add missing comment.
(show_opaque_type_resolution): Likewise.
(show_overload_debug): Likewise.
(print_bit_vector): Remove unnecessary forward declaration.
(print_arg_types): Likewise.
(dump_fn_fieldlists): Likewise.
(print_cplus_stuff): Likewise.
Keith Seitz [Wed, 15 Aug 2012 23:25:08 +0000 (23:25 +0000)]
Forgotten commit from 2012-07-30.
DJ Delorie [Wed, 15 Aug 2012 22:37:56 +0000 (22:37 +0000)]
* rl78-decode.opc (rl78_decode_opcode): Merge %e and %[01]
operands, so that data addresses can be corrected when not
ES-overridden.
* rl78-decode.c: Regenerate.
* rl78-dis.c (print_insn_rl78): Make order of modifiers
irrelevent. When the 'e' specifier is used on an operand and no
ES prefix is provided, adjust address to make it absolute.
Peter Bergner [Wed, 15 Aug 2012 21:25:21 +0000 (21:25 +0000)]
opcodes/
* ppc-opc.c <RSQ, RTQ>: Use PPC_OPERAND_GPR.
gas/testsuite/
* gas/ppc/power4.s <lq, stq>: Add more tests.
* gas/ppc/power4.d: Likewise.
Peter Bergner [Wed, 15 Aug 2012 15:33:25 +0000 (15:33 +0000)]
opcodes/
* ppc-opc.c <xnop, yield, mdoio, mdoom>: New extended mnemonics.
gas/testsuite/
* gas/ppc/common.d ("nop", "xnop"): Add tests.
* gas/ppc/common.s: Likewise.
* gas/ppc/power7.d ("yield", "mdoio", "mdoom"): Add tests.
* gas/ppc/power7.s: Likewise.
Tom Tromey [Wed, 15 Aug 2012 14:33:40 +0000 (14:33 +0000)]
* gdb_bfd.c (struct gdb_bfd_data) <archive_bfd>: New field.
(gdb_bfd_ref): Initialize new field.
(gdb_bfd_unref): Unref the archive BFD.
(gdb_bfd_openr_next_archived_file): Acquire a reference to the
parent archive.
Tom Tromey [Wed, 15 Aug 2012 14:22:02 +0000 (14:22 +0000)]
PR python/14387:
* python/py-bpevent.c (create_breakpoint_event_object): Update
comment.
* python/py-event.c (evpy_add_attribute): Update comment.
* python/py-exitedevent.c (create_exited_event_object): Fix
reference counting and error handling.
* python/py-newobjfileevent.c (create_new_objfile_event_object):
Fix reference counting.
* python/py-signalevent.c (create_signal_event_object): Fix
reference counting and error handling.
* python/py-stopevent.c (emit_stop_event): Fix reference
counting.
* python/py-threadevent.c (get_event_thread): Return a
borrowed reference.
* python/py-type.c (convert_field): Fix reference counting.
Tom Tromey [Wed, 15 Aug 2012 14:18:18 +0000 (14:18 +0000)]
* dwarf2read.c (dwarf_decode_macro_bytes)
<DW_MACRO_GNU_transparent_include>: Use pointer to included data
as hash key.
Ian Lance Taylor [Wed, 15 Aug 2012 04:03:54 +0000 (04:03 +0000)]
* x86_64.cc (Target_x86_64::Scan::global): Fix erroneous call to
unsupported_relocal_local to call unsupported_reloc_global.
Mike Frysinger [Wed, 15 Aug 2012 01:59:42 +0000 (01:59 +0000)]
gdb: improve usage strings
This adds Usage strings to a bunch of commands, tweaks the grammar in a
few, and improves the help text for the handle command.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
gdbadmin [Wed, 15 Aug 2012 00:00:04 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Wed, 15 Aug 2012 00:00:03 +0000 (00:00 +0000)]
daily update
Maciej W. Rozycki [Tue, 14 Aug 2012 22:00:05 +0000 (22:00 +0000)]
* mips-dis.c (print_insn_args): Add GET_OP and GET_OP_S local
macros, use local variables for info struct member accesses,
update the type of the variable used to hold the instruction
word.
(print_insn_mips, print_mips16_insn_arg): Likewise.
(print_insn_mips16): Add GET_OP and GET_OP_S local macros, use
local variables for info struct member accesses.
(print_insn_micromips): Add GET_OP_S local macro.
(_print_insn_mips): Update the type of the variable used to hold
the instruction word.
Doug Evans [Tue, 14 Aug 2012 19:35:47 +0000 (19:35 +0000)]
* gdbtypes.c (struct extra): Delete, unused.
Doug Evans [Tue, 14 Aug 2012 19:28:16 +0000 (19:28 +0000)]
* gdbtypes.c: Whitespace cleanup.
(address_space_name_to_int): Remove "extern" from definition.
(_initialize_gdbtypes): Declare with initialize_file_ftype.
Doug Evans [Tue, 14 Aug 2012 19:03:47 +0000 (19:03 +0000)]
* gdbtypes.c (make_pointer_type): Remove redundant setting of
TYPE_POINTER_TYPE (type).
Jan Kratochvil [Tue, 14 Aug 2012 18:47:37 +0000 (18:47 +0000)]
gdb/testsuite/
* gdb.base/attach-twice.exp: Remove excessive ps exec.
H.J. Lu [Tue, 14 Aug 2012 17:01:46 +0000 (17:01 +0000)]
Terminate register name when reporting bad register
gas/
PR gas/14457
* config/tc-i386.c (i386_att_operand): Terminate register name
when reporting bad register.
gas/testsuite/
PR gas/14457
* gas/i386/i386.exp: Run reg-bad.
* gas/i386/reg-bad.l: New.
* gas/i386/reg-bad.s: Likewise.
Gary Benson [Tue, 14 Aug 2012 16:16:04 +0000 (16:16 +0000)]
2012-08-14 Gary Benson <gbenson@redhat.com>
* solib-svr4.c (svr4_free_library_list): Use free_so.
Nick Clifton [Tue, 14 Aug 2012 12:10:12 +0000 (12:10 +0000)]
oops - accidentally omitted from previous delta
Nick Clifton [Tue, 14 Aug 2012 11:59:05 +0000 (11:59 +0000)]
Updated Ukranian translations.
Nick Clifton [Tue, 14 Aug 2012 08:31:57 +0000 (08:31 +0000)]
PR ld/14265
* script-sections.cc (Sections_element::output_section_name): Add
keep return parameter.
(Output_section_element::match_name): Add keep return parameter.
Return the value of the keep_ member.
* script-sections.h (class Output_section): Update
output_section_name prototype.
* layout.cc (Layout::keep_input_section): New public member
function.
(Layout::choose_output_section): Pass keep parameter to
output_section_name.
* layout.h (class Layout): Add keep_input_section.
* object.cc (Sized_relobj_file::do_layout): Check for kept input
sections.
* testsuite/Makefile.am: Add a test.
* testsuite/Makefile.in: Regenerate.
* testsuite/pr14265.c: Source file for the test.
* testsuite/pr14265.t: Linker script for the test.
* testsuite/pr14265.sh: Shell script for the test.
* ld-gc/gc.exp: Add a new test.
* ld-gc/pr14265.c: Source file for the new test.
* ld-gc/pr14265.t: Linker script for the new test.
* ld-gc/pr14265.d: Expected symbol dump.
Alan Modra [Tue, 14 Aug 2012 03:39:03 +0000 (03:39 +0000)]
* target.h (Target::output_section_name): New function.
(Target::do_output_section_name): New function.
* layout.cc (Layout::choose_output_section): Call the above.
* powerpc.cc (Target_powerpc::do_output_section_name): New function.
Hans-Peter Nilsson [Tue, 14 Aug 2012 02:29:30 +0000 (02:29 +0000)]
* gas/mmix/err-fb-2.s: New test.
Hans-Peter Nilsson [Tue, 14 Aug 2012 02:29:01 +0000 (02:29 +0000)]
* config/tc-mmix.c (loc_asserts): New variable.
(mmix_greg_internal): Handle expressions not determinable at first
pass.
(s_loc): Ditto. Record expressions where the section isn't
determinable at the first pass, and assume they don't refer to
other sections.
(mmix_md_end): Verify that recorded LOC expressions weren't
to other sections, else emit error messages.
Alan Modra [Tue, 14 Aug 2012 02:22:32 +0000 (02:22 +0000)]
elfcpp/
* powerpc.h: Add more relocs.
(R_PPC_REL16*): Rename to R_POWERPC_REL16*.
gold/
* powerpc.cc: Update for renamed R_PPC_REL16 relocs.
(Output_data_got_powerpc::do_write): Don't rely on base class lookup
for replace_constant call.
(Output_data_plt_powerpc::do_print_to_mapfile): New function.
(Output_data_glink::do_print_to_mapfile): New function.
(Target_powerpc::Scan::local): Ignore R_PPC64_TOCSAVE.
(Target_powerpc::Relocate::relocate): Likewise.
Alan Modra [Tue, 14 Aug 2012 01:07:01 +0000 (01:07 +0000)]
* powerpc.cc (Powerpc_relobj::set_got2_shndx): Delete.
(Powerpc_relobj::do_find_special_sections): Don't use set_got2_shndx.
(Output_data_glink::add_entry,find_entry): Remove shndx param.
(class Glink_sym_ent): Rename from struct Glink_sym_ent. Remove
all references to shndx_. Handle special case for R_PPC_PLTREL24
here.
(class Glink_sym_ent_hash): Rename from struct Glink_sym_ent_hash.
(Output_data_glink::do_write): Retrieve got2_shdnx from object.
(Target_powerpc::make_plt_entry): Don't special case R_PPC_PLTREL24
here.
(Target_powerpc::Scan::global): Nor on make_plt_entry call.
(Target_powerpc::Relocate::relocate): Nor on glink->find_entry call.
gdbadmin [Tue, 14 Aug 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Tue, 14 Aug 2012 00:00:05 +0000 (00:00 +0000)]
daily update
Doug Evans [Mon, 13 Aug 2012 21:14:48 +0000 (21:14 +0000)]
* gdb.base/help.exp: Update expected output.
Maciej W. Rozycki [Mon, 13 Aug 2012 19:52:59 +0000 (19:52 +0000)]
* ld-mips-elf/export-class-call16-o32.dd: New test.
* ld-mips-elf/export-class-call16-o32-irix.dd: New test.
* ld-mips-elf/export-class-call16-o32.gd: New test.
* ld-mips-elf/export-class-call16-n32.dd: New test.
* ld-mips-elf/export-class-call16-n32.gd: New test.
* ld-mips-elf/export-class-call16-n64.dd: New test.
* ld-mips-elf/export-class-call16-n64.gd: New test.
* ld-mips-elf/export-class-call16-def.s: New test source.
* ld-mips-elf/export-class-call16-o32.s: New test source.
* ld-mips-elf/export-class-call16-n32.s: New test source.
* ld-mips-elf/export-class-call16-n64.s: New test source.
* ld-mips-elf/export-class-call16.ld: New test linker script.
* ld-mips-elf/mips-elf.exp: Run the new tests.
Maciej W. Rozycki [Mon, 13 Aug 2012 19:43:38 +0000 (19:43 +0000)]
* elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Look up
the options section in the output rather than input BFD to
decide if to add a DT_MIPS_OPTIONS tag.
Mike Frysinger [Mon, 13 Aug 2012 15:44:00 +0000 (15:44 +0000)]
gdb: ignore generated go-exp.c
Maciej W. Rozycki [Mon, 13 Aug 2012 15:01:13 +0000 (15:01 +0000)]
* config.bfd: Wrap mips*el-*-linux* and mips*-*-linux* into
#ifdef BFD64.
Nick Clifton [Mon, 13 Aug 2012 14:54:15 +0000 (14:54 +0000)]
oops, aciidental commit
Nick Clifton [Mon, 13 Aug 2012 14:52:54 +0000 (14:52 +0000)]
Add support for 64-bit ARM architecture: AArch64
Doug Evans [Mon, 13 Aug 2012 14:31:00 +0000 (14:31 +0000)]
* value.c (show_convenience): Tweak comment.
(_initialize_values): Mention convenience functions in the help text
for "show convenience".
doc/
* gdb.texinfo (Convenience Vars): Update text for "show convenience"
to include functions.
testsuite/
* gdb.base/default.exp: Update expected output of "show convenience".
Maciej W. Rozycki [Mon, 13 Aug 2012 14:26:14 +0000 (14:26 +0000)]
include/opcode/
* mips.h (mips_opcode): Add the exclusions field.
(OPCODE_IS_MEMBER): Remove macro.
(cpu_is_member): New inline function.
(opcode_is_member): Likewise.
opcodes/
* micromips-opc.c (micromips_opcodes): Update comment.
* mips-opc.c (mips_builtin_opcodes): Likewise. Mark coprocessor
instructions for IOCT as appropriate.
* mips-dis.c (print_insn_mips): Replace OPCODE_IS_MEMBER with
opcode_is_member.
* configure.in: Substitute NO_WMISSING_FIELD_INITIALIZERS with
the result of a check for the -Wno-missing-field-initializers
GCC option.
* Makefile.am (NO_WMISSING_FIELD_INITIALIZERS): New variable.
(mips-opc.lo): Pass $(NO_WMISSING_FIELD_INITIALIZERS) to
compilation.
(mips16-opc.lo): Likewise.
(micromips-opc.lo): Likewise.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
gas/
* config/tc-mips.c (NO_ISA_COP, COP_INSN): Remove macros.
(is_opcode_valid): Remove coprocessor instruction exclusions.
Replace OPCODE_IS_MEMBER with opcode_is_member.
(is_opcode_valid_16): Replace OPCODE_IS_MEMBER with
opcode_is_member.
(macro): Remove coprocessor instruction exclusions.
Maciej W. Rozycki [Mon, 13 Aug 2012 14:09:44 +0000 (14:09 +0000)]
* config/tc-mips.c (s_cpload, s_cpsetup): Fail if MIPS16 mode.
(s_cplocal, s_cprestore, s_cpreturn): Likewise.
Maciej W. Rozycki [Mon, 13 Aug 2012 13:06:14 +0000 (13:06 +0000)]
* elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling
of protected symbols.
Yao Qi [Mon, 13 Aug 2012 01:02:07 +0000 (01:02 +0000)]
gdb/
* std-operator.def: Remove TERNOP_SLICE_COUNT.
* breakpoint.c (watchpoint_exp_is_const): Remove handling to
TERNOP_SLICE_COUNT.
* eval.c (evaluate_subexp_standard): Likewise.
* expprint.c (print_subexp_standard): Likewise.
(dump_subexp_body_standard): Likewise.
* parse.c (operator_length_standard): Likewise.
Yao Qi [Mon, 13 Aug 2012 00:54:04 +0000 (00:54 +0000)]
gdb/
* std-operator.def: Remove OP_BITSTRING.
* breakpoint.c (watchpoint_exp_is_const): Update.
* eval.c (evaluate_subexp_standard): Remove handling to
OP_BITSTRING.
* expprint.c (print_subexp_standard): Likewise.
(dump_subexp_body_standard): Likewise.
* parse.c (operator_length_standard): Likewise.
* valops.c (value_bitstring): Remove.
* value.h: Remove the declaration of 'value_bitstring'.
Alan Modra [Mon, 13 Aug 2012 00:00:05 +0000 (00:00 +0000)]
daily update
gdbadmin [Mon, 13 Aug 2012 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sun, 12 Aug 2012 03:07:32 +0000 (03:07 +0000)]
* powerpc.cc: Whitespace fixes. Wrap overly long lines.
(glink insn constants): Use uint32_t.
(Output_data_glink::add_entry): Use insert, not [] operator.
gdbadmin [Sun, 12 Aug 2012 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sun, 12 Aug 2012 00:00:05 +0000 (00:00 +0000)]
daily update
Alan Modra [Sat, 11 Aug 2012 04:41:28 +0000 (04:41 +0000)]
* object.h (Sized_relobj_file::find_shdr): New function.
(Sized_relobj_file::find_special_sections): New function.
* object.cc (Sized_relobj_file::find_shdr): New function.
(Sized_relobj_file::find_eh_frame): Use find_shdr.
(Sized_relobj_file::find_special_sections): New function, split out..
(Sized_relobj_file::do_read_symbols): ..from here.
* output.h (Output_data_got::replace_constant): New function.
(Output_data_got::num_entries): New function.
(Output_data_got::last_got_offset,set_got_size): Use num_entries.
(Output_data_got::got_offset): Protected rather than private.
(Output_data_got::replace_got_entry): New function.
* output.cc (Output_data_got::replace_got_entry): New function.
* powerpc.cc (class Powerpc_relobj): New.
(class Powerpc_relocate_functions): Delete all psymval variants or
convert to value,addend type. Delete pcrela, pcrela_unaligned.
Implement _ha functions using corresponding _hi function.
(Powerpc_relobj::find_special_sections): New function.
(Target_powerpc::do_make_elf_object): New function.
(class Output_data_got_powerpc): New.
(class Output_data_glink): New.
(class Powerpc_scan_relocatable_reloc): New.
Many more changes througout file.
Sergio Durigan Junior [Sat, 11 Aug 2012 00:20:18 +0000 (00:20 +0000)]
2012-08-10 Sergio Durigan Junior <sergiodj@redhat.com>
* linespec.c (find_methods): Remove unused variables `i1' and
`name_len'.
(decode_line_full): Likewise for `arg_start'.
Sergio Durigan Junior [Sat, 11 Aug 2012 00:05:55 +0000 (00:05 +0000)]
2012-08-10 Sergio Durigan Junior <sergiodj@redhat.com>
* gdb_bfd.c (gdb_bfd_unref): Remove unused variable `slot'.
(zlib_decompress_section): Likewise for `section_data'.
(gdb_bfd_map_section): Likewise for `buf' and `retbuf'.
gdbadmin [Sat, 11 Aug 2012 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sat, 11 Aug 2012 00:00:05 +0000 (00:00 +0000)]
daily update
H.J. Lu [Fri, 10 Aug 2012 21:19:40 +0000 (21:19 +0000)]
Enable FMA instructions for bdver2
gas/testsuite/
PR gas/14423
* gas/i386/arch-10-bdver2.d: New file.
* gas/i386/x86-64-arch-2-bdver2.d: Likewise.
* gas/i386/i386.exp: Run new test
opcodes/
2012-08-11 Saravanan Ekanathan <saravanan.ekanathan@amd.com>
PR gas/14423
* i386-gen.c (cpu_flag_init): Add CpuFMA in CPU_BDVER2_FLAGS.
* i386-init.h: Regenerated.
Doug Evans [Fri, 10 Aug 2012 20:26:00 +0000 (20:26 +0000)]
Add $_memeq, $_regex, $_streq, $_strlen convenience functions.
* NEWS: Document them.
* data-directory/Makefile.in (PYTHON_FILES): Add function/__init__.py,
function/strfns.py.
* python/py-type.c (typy_array_1): New function.
(typy_array): Call it.
(typy_vector): New function.
(type_object_methods): Add "vector".
* python/lib/gdb/function/__init__.py: New file.
* python/lib/gdb/function/strfns.py: New file.
doc/
* gdb.texinfo (Convenience Funs): New node.
(Types In Python): Document Type.vector.
testsuite/
* gdb.python/py-strfns.c: New file.
* gdb.python/py-strfns.exp: New file.
* gdb.python/py-type.exp (test_fields): Add vector tests.
Siddhesh Poyarekar [Fri, 10 Aug 2012 18:55:18 +0000 (18:55 +0000)]
* python/py-type.c (convert_field): Use gdb_py_long_from_longest
for TYPE_FIELD_BITPOS.
(typy_get_sizeof): Likewise for TYPE_LENGTH.
Mike Frysinger [Fri, 10 Aug 2012 05:03:13 +0000 (05:03 +0000)]
gdb: add completion handler for "handle" and "signal"
The command line completion has spoiled me. Thus the lack of completion with
the "handle" command annoys me. Patch!
This does a few things:
- adds a VEC_merge helper
- adds a generic signal completer
- adds a completion handler for the "handle" command
- sets the completion handler for the "signal" command
URL: http://sourceware.org/bugzilla/show_bug.cgi?id=10436
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Alan Modra [Fri, 10 Aug 2012 02:14:50 +0000 (02:14 +0000)]
PR binutils/14444
* elf.c (IS_VALID_GROUP_SECTION_HEADER) Add minsize param.
(setup_group): Adjust uses.
(bfd_section_from_shdr): Allow SHT_GROUP sections with just a flag
word.
Alan Modra [Fri, 10 Aug 2012 00:00:04 +0000 (00:00 +0000)]
daily update
gdbadmin [Fri, 10 Aug 2012 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Nick Clifton [Thu, 9 Aug 2012 14:46:44 +0000 (14:46 +0000)]
Updated Vietnamese translation.
Yao Qi [Thu, 9 Aug 2012 12:53:46 +0000 (12:53 +0000)]
gdb/
* cli/cli-decode.c (set_cmd_prefix): New.
(lookup_cmd_for_prefixlist): New.
(add_prefix_cmd): Call set_cmd_prefix and update field 'prefix'
of each cmd_list_element in *prefixlist.
(add_setshow_cmd_full): set_cmd_prefix.
(add_alias_cmd): Likewise.
* cli/cli-decode.h (struct cmd_list_element) <prefix>: New field.
Declare 'auto_boolean_enums'.
* cli/cli-setshow.c: Include "observer.h".
(notify_command_param_changed_p): New.
(add_setshow_auto_boolean_cmd): Move auto_boolean_enums out.
Remove 'static'.
(do_setshow_command): Split it to ...
(do_set_command, do_show_command): ... them. New.
(do_set_command): Call observer_notify_command_param_changed if
notify_command_param_changed_p returns true.
(cmd_show_list): Caller update.
* auto-load.c (set_auto_load_cmd): Likewise.
* remote.c (show_remote_cmd): Likewise.
* cli/cli-setshow.h: Update declarations.
* top.c (execute_command): Call do_set_command and do_show_command.
* NEWS: Mention new MI notification.
* mi/mi-interp.c: Declare mi_command_param_changed.
(mi_interpreter_init): Attach mi_command_param_changed to
observer command_param_changed.
(mi_command_param_changed): New.
Remove mi_suppress_breakpoint_notifications.
Define global variable mi_suppress_notification.
(mi_breakpoint_created): Update.
(mi_breakpoint_deleted): Likewise.
(mi_breakpoint_modified): Likewise.
* mi/mi-main.c (mi_cmd_execute): Likewise. Check command
'gdb-set' and set mi_suppress_notification.
* mi/mi-main.h: (mi_suppress_notification): New struct.
gdb/doc/
* observer.texi: New observer command_param_changed.
* gdb.texinfo (GDB/MI Async Records): Doc for '=cmd-param-changed'.
gdb/testsuite/
* gdb.mi/mi-cmd-param-changed.exp: New.
* gdb.mi/mi-cli.exp: Update for MI notification "=cmd-param-changed".
* gdb.mi/mi-var-rtti.exp, gdb.mi/mi2-cli.exp: Likewise.
* gdb.mi/mi2-prompt.exp: Likewise.
Maciej W. Rozycki [Thu, 9 Aug 2012 12:05:15 +0000 (12:05 +0000)]
* elfxx-mips.c (LA25_LUI_MICROMIPS_1, LA25_LUI_MICROMIPS_2):
Remove macros, folding them into...
(LA25_LUI_MICROMIPS): ... this new macro.
(LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise into...
(LA25_J_MICROMIPS): ... this new macro.
(LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise
into...
(LA25_ADDIU_MICROMIPS): ... this new macro.
(bfd_put_micromips_32, bfd_get_micromips_32): New functions.
(mips_elf_create_la25_stub): Use them.
(check_br32_dslot, check_br32, check_relocated_bzc): Likewise.
(_bfd_mips_elf_relax_section): Likewise.
Jan Kratochvil [Thu, 9 Aug 2012 09:24:23 +0000 (09:24 +0000)]
gdb/
* fbsd-nat.h (fbsd_find_memory_regions): Use find_memory_region_ftype.
Yao Qi [Thu, 9 Aug 2012 06:48:22 +0000 (06:48 +0000)]
gdb/
* cli/cli-cmds.c (enablebreaklist): Move it to breakpoint.c.
(skiplist): Move it to skip.c.
(init_cmd_lists): Remove code setting enablebreaklist and
skiplist to NULL.
* breakpoint.c (enablebreaklist): Moved from cli/cli-cmds.c.
* cli/cli-cmds.h: Remove declaration of enablebreaklist and
skiplist.
* gdbcmd.h: Likewise.
* skip.c (_initialize_step_skip): Move 'skiplist' from
cli/cli-cmds.c.
Yao Qi [Thu, 9 Aug 2012 06:26:25 +0000 (06:26 +0000)]
gdb/
* cli/cli-dump.c: Add 'static' to some cmd_list_element variables.
* gnu-nat.c, symfile.c: Likewise.
Alan Modra [Thu, 9 Aug 2012 06:25:53 +0000 (06:25 +0000)]
* archive.c (SECTION Archives): Update documentation.
(_bfd_delete_archive_data): Remove.
(_bfd_add_bfd_to_archive_cache): Set 'parent_cache' and 'key'.
(archive_close_worker, _bfd_archive_close_and_cleanup): New
functions.
* libbfd-in.h (struct areltdata <parent_cache, key>): New fields.
(_bfd_delete_archive_data): Don't declare.
(_bfd_archive_close_and_cleanup): Declare.
(_bfd_generic_close_and_cleanup): Redefine.
* libbfd.h: Rebuild.
* opncls.c (_bfd_delete_bfd): Don't call _bfd_delete_archive_data.
(bfd_close): Don't close nested thin archives here.
Alan Modra [Thu, 9 Aug 2012 00:00:05 +0000 (00:00 +0000)]
daily update
gdbadmin [Thu, 9 Aug 2012 00:00:03 +0000 (00:00 +0000)]
*** empty log message ***
Doug Evans [Wed, 8 Aug 2012 21:55:01 +0000 (21:55 +0000)]
* utils.c (prompt_for_continue_wait_time): New static global.
(make_command_stats_cleanup): Initialize it.
(report_command_stats): Subtract time waiting for user.
(prompt_for_continue): Track time waiting for user.
(defaulted_query): Track time waiting for user.
Doug Evans [Wed, 8 Aug 2012 21:17:04 +0000 (21:17 +0000)]
* eval.c (evaluate_subexp_standard): Fix thinko in handling
UNOP_MEMVAL_TYPE.
* expprint.c (print_subexp_standard, case OP_TYPE): New.
(print_subexp_standard, case UNOP_CAST_TYPE): Don't increment pos.
(print_subexp_standard, case UNOP_DYNAMIC_CAST): Ditto.
(print_subexp_standard, case UNOP_REINTERPRET_CAST): Ditto.
(print_subexp_standard, case UNOP_MEMVAL_TYPE): Ditto.
(dump_subexp_body_standard, case UNOP_DYNAMIC_CAST): Don't increment
elt.
(dump_subexp_body_standard, case UNOP_REINTERPRET_CAST): Ditto.
(dump_subexp_body_standard, case UNOP_CAST_TYPE): Ditto.
(dump_subexp_body_standard, case UNOP_MEMVAL_TYPE): Ditto.
(dump_prefix_expression): Handle OP_TYPE.
testsuite/
* gdb.base/debug-expr.c: New file.
* gdb.base/debug-expr.exp: New file.
* gdb.base/exprs.exp: Test {type} casts.
* gdb.cp/debug-expr.exp: New file.
Keith Seitz [Wed, 8 Aug 2012 20:39:34 +0000 (20:39 +0000)]
* breakpoint.c (parse_breakpoint_sals): Remove unused variable
addr_start.
Doug Evans [Wed, 8 Aug 2012 19:48:19 +0000 (19:48 +0000)]
* gdb_string.h: Moved to ...
* common/gdb_string.h: ... here.
* common/vec.h: Remove #ifndef GDBSERVER conditional inclusion of
gdb_string.h and gdb_assert.h.
gdbserver/
* configure.ac: Add check for strstr.
* config.in: Regenerate.
* configure: Regenerate.
* linux-thread-db.c: #include "gdb_vecs.h".
(try_thread_db_load_from_pdir_1): New arg "subdir". All callers
updated.
(try_thread_db_load_from_pdir): New arg "subdir". All callers updated.
(thread_db_load_search): Use a vector to iterate over path elements.
Handle text appearing after "$pdir".
gdbserver/
* Makefile.in (SFILES): Add gdb_vecs.c.
(OBS): Add gdb_vecs.o.
(gdb_vecs_h, host_defs_h): New variables.
(thread-db.o): Add $(gdb_vecs_h) dependency.
(gdb_vecs.o): New rule.
* thread-db.c: #include "gdb_vecs.h".
(thread_db_load_search): Use a vector to iterate over path elements.
Handle text appearing after "$pdir".
Yao Qi [Wed, 8 Aug 2012 05:47:57 +0000 (05:47 +0000)]
gdb/
* tic6x-tdep.c (tic6x_register_to_value): Remove.
(tic6x_value_to_register): Likewise.
(tic6x_gdbarch_init): Don't call set_gdbarch_register_to_value
and set_gdbarch_value_to_register.
gdbadmin [Wed, 8 Aug 2012 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Wed, 8 Aug 2012 00:00:05 +0000 (00:00 +0000)]
daily update
Roland McGrath [Tue, 7 Aug 2012 18:22:04 +0000 (18:22 +0000)]
gas/testsuite/
* gas/i386/prefetch.s: New file.
* gas/i386/prefetch.d: New file.
* gas/i386/prefetch-intel.d: New file.
* gas/i386/x86-64-prefetch.d: New file.
* gas/i386/x86-64-prefetch-intel.d: New file.
* gas/i386/i386.exp: Run them.
opcodes/
* i386-dis.c (reg_table): Fill out REG_0F0D table with
AMD-reserved cases as "prefetch".
(MOD_0F18_REG_4, MOD_0F18_REG_5): New enum constants.
(MOD_0F18_REG_6, MOD_0F18_REG_7): Likewise.
(reg_table): Use those under REG_0F18.
(mod_table): Add those cases as "nop/reserved".
Jan Kratochvil [Tue, 7 Aug 2012 18:04:12 +0000 (18:04 +0000)]
gdb/testsuite/
* gdb.base/valgrind-infcall.exp (continue #$continue_count): Use
global variable loop, not a 'break'. Add loop count limit to 100.
Add new fail case for terminated vgdb.
Jan Beulich [Tue, 7 Aug 2012 16:57:49 +0000 (16:57 +0000)]
Despite them being ignored by the CPU, gas issues segment override
prefixes for other than FS/GS in 64-bit mode. If doing so at all, it
should clearly do this correctly. Determining the default segment,
however, requires to take into consideration RegRex (so far, RSP, RBP,
R12, and R13 were all treated equally here).
gas/
2012-08-07 Jan Beulich <jbeulich@suse.com>
* config/tc-i386-intel.c (build_modrm_byte): Split determining
default segment from figuring out encoding. Honor RegRex for
the former.
gas/testsuite/
2012-08-07 Jan Beulich <jbeulich@suse.com>
* gas/i386/x86-64-segovr.{s,l}: New.
* gas/i386/i386.exp: Run new test.
Jan Beulich [Tue, 7 Aug 2012 16:55:00 +0000 (16:55 +0000)]
The VGATHER group of instructions requires that all three involved
xmm/ymm registers are distinct. This patch adds code to check for this,
and at once eliminates a superfluous check for not using PC-relative
addressing for these instructions (the fact that an index register is
required here already excludes valid PC-relative addresses). The
severity of the resulting diagnostics can be controlled via command
line option or directive.
gas/
2012-08-07 Jan Beulich <jbeulich@suse.com>
* config/tc-i386.c (set_check): Renamed from set_sse_check.
Generalize to also handle operand checking option.
(enum i386_error): New enumerator 'invalid_vector_register_set'.
(match_template): Handle it.
(enum check_kind): Give it a tag. Drop sse_ prefixes from
enumerators.
(operand_check): New.
(md_pseudo_table): Add "operand_check".
(check_VecOperands): Don't special case RIP addressing. Check
that vSIB operands use distinct vector registers unless no
checking was requested.
(OPTION_MOPERAND_CHECK): New.
(md_parse_option): Handle it.
(OPTION_MAVXSCALAR, OPTION_X32): Adjust.
(md_longopts): Add "moperand-check".
(md_show_usage): Add help text for it.
gas/testsuite/
2012-08-07 Jan Beulich <jbeulich@suse.com>
* gas/i386/vgather-check-error.{s,l}: New.
* gas/i386/vgather-check-none.{s,d}: New.
* gas/i386/vgather-check-warn.{d,e}: New.
* gas/i386/vgather-check.{s,d}: New.
* gas/i386/x86-64-vgather-check-error.{s,l}: New.
* gas/i386/x86-64-vgather-check-none.{s,d}: New.
* gas/i386/x86-64-vgather-check-warn.{d,e}: New.
* gas/i386/x86-64-vgather-check.{s,d}: New.
* gas/i386/i386.exp: Run new tests.
Jan Beulich [Tue, 7 Aug 2012 16:51:34 +0000 (16:51 +0000)]
There were several cases where the registers in the REX encoded range
got treated identically to the ones in the base range, due to not
paying attention to the fact that reg_entry's reg_num field doesn't
fully specify the register number (reg_flags also needs to be checked
for RegRex). This patch introduces and uses a new (inline) function to
obtain the full register number, and uses it to fix all those cases.
It additionally adds the missing operand checks for SVME instructions
(which match the monitor/mwait ones).
gas/
2012-08-07 Jan Beulich <jbeulich@suse.com>
* config/tc-i386.c (register_number): New function.
(build_vex_prefix, process_immext, process_operands,
build_modrm_byte, i386_index_check): Use it.
gas/testsuite/
2012-08-07 Jan Beulich <jbeulich@suse.com>
* gas/i386/x86-64-specific-reg.{s,l}: New.
* gas/i386/i386.exp: Run new test.
opcodes/
2012-08-07 Jan Beulich <jbeulich@suse.com>
* i386-opc.tbl: Remove "FIXME" comments from SVME instructions.
Jan Kratochvil [Tue, 7 Aug 2012 16:49:38 +0000 (16:49 +0000)]
gdb/doc/
* gdbint.texinfo (Debugging GDB): In section
'Debugging @value{GDBN} with itself' change .gdbinit for gdb-gdb.gdb.
Mention also gdb-gdb.py.
Nick Clifton [Tue, 7 Aug 2012 13:47:19 +0000 (13:47 +0000)]
* config/tc-i386.c (lex_got): Provide implementation for PE
format.
* gas/i386/secrel.s: Add test of <symbol>@SECREL32.
* gas/i386/secrel.d: Add expected disassembly.
* scripttempl/pe.sc (R_TLS): Add .tls$AAA and .tls$ZZZ.
* scripttempl/pep.sc (R_TLS): Add .tls$AAA and .tls$ZZZ.
* archive.c (_bfd_delete_archive_data): New function.
* libbfd-in.h (_bfd_delete_archive_data): Declare.
* libbfd.h: Rebuild.
* opncls.c (_bfd_delete_bfd): Call _bfd_delete_archive_data.
Jan Kratochvil [Tue, 7 Aug 2012 13:26:33 +0000 (13:26 +0000)]
gdb/
PR 11804
* defs.h (find_memory_region_ftype): New comment. New arg modified.
* fbsd-nat.c (fbsd_find_memory_regions): Add the passed modified value.
* gcore.c (gcore_create_callback): New function comment. Add modified
parameter. Only write modified regions. Set SEC_READONLY exactly
according to MODIFIED.
(objfile_find_memory_regions): Ignore separate debug info files. Ass
the passed modified value to FUNC.
* gnu-nat.c (gnu_find_memory_regions): Add the passed modified value.
* linux-tdep.c (linux_find_memory_regions): Try to reads smaps file
first. New variables modified and has_anonymous. Parse the lines of
smaps file. Add the passed MODIFIED value to FUNC.
* procfs.c (find_memory_regions_callback): Add the passed modified
value.
gdb/testsuite/
PR 11804
* gdb.base/gcore-relro.exp: New file.
* gdb.base/gcore-relro-main.c: New file.
* gdb.base/gcore-relro-lib.c: New file.
Ian Lance Taylor [Tue, 7 Aug 2012 13:24:47 +0000 (13:24 +0000)]
* layout.cc (Layout::add_target_dynamic_tags): If
dynrel_includes_plt but no dyn_rel, emit dynamic reloc tags for
plt_rel.
Jan Kratochvil [Tue, 7 Aug 2012 13:13:49 +0000 (13:13 +0000)]
gdb/testsuite/
Do not false FAIL with old GCCs.
* gdb.base/watchpoint.exp (self-delete local watch) <$no_hw>: XFAIL for
GCC < 4.5 in $no_hw mode.
Nick Clifton [Tue, 7 Aug 2012 10:37:31 +0000 (10:37 +0000)]
Updated Ukranian and Japanese translations.