Jan Kratochvil [Mon, 11 Oct 2010 06:10:35 +0000 (06:10 +0000)]
opcodes/
* Makefile.am (libopcodes_a_SOURCES): New as empty.
* Makefile.in: Regenerate.
Dave Korn [Mon, 11 Oct 2010 00:21:45 +0000 (00:21 +0000)]
* elflink.c (_bfd_elf_link_output_relocs): Delete unused variable
"output_rel_hdr".
gdbadmin [Mon, 11 Oct 2010 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sun, 10 Oct 2010 23:00:06 +0000 (23:00 +0000)]
daily update
gdbadmin [Sun, 10 Oct 2010 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sat, 9 Oct 2010 23:00:05 +0000 (23:00 +0000)]
daily update
Alan Modra [Sat, 9 Oct 2010 07:56:18 +0000 (07:56 +0000)]
Regenerate for bool -> bool_ change
Alan Modra [Sat, 9 Oct 2010 06:50:23 +0000 (06:50 +0000)]
cgen/
* utils-cgen.scm (gen-attr-accessors): Rename bool attribute to bool_.
* cpu/mep.opc (mep_cgen_insn_supported): Ditto.
include/opcode/
* cgen.h (CGEN_ATTR, CGEN_ATTR_TYPE): Rename bool attribute to bool_.
(CGEN_ATTR_BOOLS, CGEN_ATTR_CGEN_INSN_ALIAS_VALUE): Likewise.
opcodes/
* fr30-desc.h: Regenerate.
* frv-desc.h: Regenerate.
* ip2k-desc.h: Regenerate.
* iq2000-desc.h: Regenerate.
* lm32-desc.h: Regenerate.
* m32c-desc.h: Regenerate.
* m32r-desc.h: Regenerate.
* mep-desc.h: Regenerate.
* mep-opc.c: Regenerate.
* mt-desc.h: Regenerate.
* openrisc-desc.h: Regenerate.
* xc16x-desc.h: Regenerate.
* xstormy16-desc.h: Regenerate.
H.J. Lu [Sat, 9 Oct 2010 05:52:29 +0000 (05:52 +0000)]
Use BYTE_GET_SIGNED on r_addend.
2010-10-08 H.J. Lu <hongjiu.lu@intel.com>
* dwarf.c (byte_get_signed): Make it extern.
* dwarf.h (byte_get_signed): New.
* readelf.c (BYTE_GET_SIGNED): New.
(slurp_rela_relocs): Use BYTE_GET_SIGNED on r_addend.
(dump_relocations): Properly dump r_addend.
Jeff Johnston [Sat, 9 Oct 2010 02:29:34 +0000 (02:29 +0000)]
2010-10-08 Bernd Schmidt <bernds@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* COPYING.LIBGLOSS: Add National Semiconductor and CodeSourcery
notices.
* COPYING.NEWLIB: Add Texas Instruments notice.
gdbadmin [Sat, 9 Oct 2010 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Fri, 8 Oct 2010 23:00:05 +0000 (23:00 +0000)]
daily update
Alan Modra [Fri, 8 Oct 2010 22:34:37 +0000 (22:34 +0000)]
* reloc.c (BFD_RELOC_ARM_HVC): Add.
* libbfd.h: Regenerate.
Daniel Jacobowitz [Fri, 8 Oct 2010 20:45:21 +0000 (20:45 +0000)]
* tracepoint.c (merge_uploaded_trace_state_variables): Only print
messages if info_verbose.
Sami Wagiaalla [Fri, 8 Oct 2010 18:28:46 +0000 (18:28 +0000)]
Test case for unimplemented overload cases.
2010-10-08 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/oranking.exp: New test.
* gdb.cp/oranking.cc: New test program.
Ken Werner [Fri, 8 Oct 2010 16:50:55 +0000 (16:50 +0000)]
gdb:
* valops.c (value_cast): Handle vector types.
* valarith.c (value_binop): Widen scalar to vector if appropriate.
gdb/testsuite:
* gdb.base/gnu_vector.c (ia, ib, fa, fb): New variables.
* gdb.base/gnu_vector.exp: Add tests for scalar to vector widening.
Kai Tietz [Fri, 8 Oct 2010 15:54:18 +0000 (15:54 +0000)]
2010-10-08 Kai Tietz <kai.tietz@onevision.com>
* pei-x86_64.c (find_next_xdata_or_end): Removed.
(pex64_dump_xdata): Remove arguments stop, onaline,
and pdata. New argument endx. Print term "none"
instead of misleading "CFA".
(sort_xdata_arr): New function.
(pex64_bfd_print_pdata): Use binary search/sort for unwind-RVAs
instead of searching quadratic.
Joseph Myers [Fri, 8 Oct 2010 15:12:29 +0000 (15:12 +0000)]
* nm.c (value_format_64bit): Define appropriately for __MSVCRT__.
(set_print_radix): Update for __MSVCRT__ definition of
value_format_64bit.
Alan Modra [Fri, 8 Oct 2010 14:00:50 +0000 (14:00 +0000)]
Fix build with -DDEBUG=7
Ulrich Weigand [Fri, 8 Oct 2010 13:31:07 +0000 (13:31 +0000)]
* arm-tdep.c (thumb_expand_immediate): New function.
(thumb_instruction_changes_pc): Likewise.
(thumb2_instruction_changes_pc): Likewise.
(thumb_analyze_prologue): Handle 32-bit Thumb instructions during
prologue parsing. Improved support for optimized code.
(thumb_scan_prologue): Do not reply on line-number information,
use same heuristics as arm_scan_prologue insead.
(skip_prologue_function): Accept functions
"__tls_get_addr" and "__aeabi_read_tp".
Ulrich Weigand [Fri, 8 Oct 2010 13:24:55 +0000 (13:24 +0000)]
2010-10-08 Ulrich Weigand <uweigand@de.ibm.com>
Daniel Jacobowitz <dan@codesourcery.com>
* arm-tdep.c (thumb_in_function_epilogue_p)
(arm_in_function_epilogue_p): New.
(arm_gdbarch_init): Install arm_in_function_epilogue_p as
gdbarch_in_function_epilogue_p callback.
gdbadmin [Fri, 8 Oct 2010 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Thu, 7 Oct 2010 23:00:05 +0000 (23:00 +0000)]
daily update
Dave Korn [Thu, 7 Oct 2010 20:50:02 +0000 (20:50 +0000)]
* configure.ac (build_lto_plugin): New shell variable.
(--enable-lto): Turn on by default for all non-ELF platforms that
have had LTO support added so far. Set build_lto_plugin appropriately
for both ELF and non-ELF.
(configdirs): Add lto-plugin or not based on build_lto_plugin.
* configure: Regenerate.
Doug Evans [Thu, 7 Oct 2010 19:34:52 +0000 (19:34 +0000)]
* cc-with-index.sh (output_file): Default to a.out.
Ralf Wildenhues [Thu, 7 Oct 2010 19:25:44 +0000 (19:25 +0000)]
Add missing ChangeLog entry for toplevel configure from 2010-07-26.
Doug Evans [Thu, 7 Oct 2010 17:23:30 +0000 (17:23 +0000)]
* dwarf2read.c (mapped_index): Rename member index_table to
symbol_table and index_table_slots to symbol_table_slots.
All uses updated.
(create_symbol_hash_table): Renamed from create_index_table.
All callers updated.
(add_indices_to_cpool): Rename arg index_table to symbol_hash_table.
(write_hash_table): Rename local index_table to symbol_hash_table.
Doug Evans [Thu, 7 Oct 2010 17:02:14 +0000 (17:02 +0000)]
* addrmap.h (addrmap_foreach_fn): New typedef.
(addrmap_foreach): Declare.
* addrmap.c (struct addrmap_funcs): New member foreach.
(addrmap_foreach): New function.
(addrmap_fixed_foreach): New function.
(addrmap_fixed_funcs): Update.
(struct mutable_foreach_data): New struct.
(addrmap_mutable_foreach_worker): New function.
(addrmap_mutable_foreach): New function.
(addrmap_mutable_funcs): Update.
DJ Delorie [Thu, 7 Oct 2010 16:20:37 +0000 (16:20 +0000)]
merge from gcc
Bernd Schmidt [Thu, 7 Oct 2010 11:28:49 +0000 (11:28 +0000)]
gas/
* config/tc-tic6x.c (tic6x_try_encode): Correct encoding of fstg field
in SPKERNEL instructions.
opcodes/
* tic6x-dis.c (print_insn_tic6x): Correct decoding of fstg field
in SPKERNEL instructions.
gas/testsuite/
* gas/tic6x/insns-c674x-sploop.d: Add two more sploop/spkernel tests.
* gas/tic6x/insns-c674x-sploop.s: Likewise.
Paul N. Hilfinger [Thu, 7 Oct 2010 08:32:41 +0000 (08:32 +0000)]
Correct dict_hash to our most recent version.
Several changes to dict_hash from Adacore's local version were inadvertantly
left out of the last change to that function. These changes conservatively
cause dict_hash to revert to msymbol_hash_iw in more cases where the symbol
being hashed is known not to be Ada-encoded. This avoids a few cases where
the function hashes large groups of names with similar prefixes to the same
value.
Changelog:
gdb/
* dictionary.c (dict_hash): Revert to msymbol_hash_iw in
more cases.
Paul N. Hilfinger [Thu, 7 Oct 2010 07:13:51 +0000 (07:13 +0000)]
Rework symbol searches to move Ada-specific stuff to ada-lang.c.
This is a clean-up of some of our symbol-lookup machinery to pull some
kludgy Ada-specific definitions out of psymtab.c. In place of
map_ada_symtabs and ada_lookup_partial_symbol, we have a method
map_matching_symbols, which searches through all symbol tables and
partial symbol tables looking for a symbol that matches according to
a matching function that is passed as a parameter. This requires some
care, because partial symbol tables speed up searches by binary search,
while full symbol tables use hashing. To call map_matching_symbols, therefore,
you may need to supply both a matching function that is compatible with the
dictionary hash function and an ordering relation that is compatible with
strcmp_iw, which is used to order partial symbol tables.
Having added this general routine to psymtab.c, we use it in ada-lang.c
to rework add_non_local_symbols (now renamed add_nonlocal_symbols).
Changelog:
gdb/
* ada-lang.c (full_match): Declare.
(ada_match_name): Rename to match_name (we should avoid prefixing static
symbols with "ada_").
(match_name): New name for ada_match_name.
(struct ada_psym_data): Remove and replace with...
(struct match_data): User data for map_matching_symbols.
(ada_add_psyms): Remove.
(aux_add_nonlocal_symbols): New function, used as callback for
map_matching_symbols.
(compare_names): Ordering function adopted from strcmp_iw for Ada-encoded
symbols.
(ada_add_non_local_symbols): Rename to add_nonlocal_symbols.
(add_nonlocal_symbols): Renamed from ada_add_non_local_symbols.
Rework to use map_matching_symbols instead of map_ada_symtabs.
(ada_lookup_symbol_list): Use add_nonlocal_symbols.
* psymtab.c: Include dependency on dictionary.h.
(match_partial_symbol): New function.
(ada_lookup_partial_symbol): Remove.
(map_block): New function, auxiliary to map_matching_symbols_psymtab.
(map_matching_symbols_psymtab): New function.
(psym_functions): Replace map_ada_symtabs with map_matching_symbols_psymtab.
* symfile.h: Replace map_ada_symtabs definition with map_matching_symbols.
Paul N. Hilfinger [Thu, 7 Oct 2010 06:53:44 +0000 (06:53 +0000)]
Extend hashed symbol dictionaries to work with Ada
This patch allows Ada to speed up symbol lookup by using the facilities
in dictionary.[ch] for hashed lookups. First, we generalize dictionary
search to allow clients to specify any matching function compatible with
the hashing function. Next, we modify the hashing algorithm so that symbols
that wild-match a name hash to the same value. Finally, we modify Ada
symbol lookup to use these facilities.
Because this patch touches on a hashing algorithm used by other
languages, I took the precaution of doing a speed test on a list of
about 12000 identifiers (repeatedly inserting all of them into a table
and then doing a lookup on a million names at random, thus testing the
speed of the hashing algorithm and how well it distributed names).
There was actually a slight speedup, probably as a result of open-
coding some of the tests in msymbol_hash_iw. By design, the revised
hashing algorithm produces the same results as the original on most
"normal" C identifiers.
We considered augmenting the dictionary interface still further by allowing
different hashing algorithms for different dictionaries, based on the
(supposed) language of the symbols in that dictionary. While this produced
better isolation of the changes to Ada programs, the additional flexibility
also complicated the dictionary interface. I'd prefer to keep things
simple for now.
Tested w/o regressions on Linux i686.
ChangeLog:
gdb/
* ada-lang.c (ada_match_name): Use new API for wild_match.
(wild_match): Change API to be consistent with that of strcmp_iw;
return 0 for a match, and switch operand order.
(full_match): New function.
(ada_add_block_symbols): Use dict_iter_match_{first,next} for
matching to allow use of hashing.
* dictionary.c (struct dict_vector): Generalize iter_name_first,
iter_name_next ot iter_match_first, iter_match_next.
(iter_name_first_hashed): Replace with iter_match_first_hashed.
(iter_name_next_hashed): Replace with iter_match_next_hashed.
(iter_name_first_linear): Replace with iter_match_first_linear.
(iter_name_next_linear): Replace with iter_match_next_linear.
(dict_iter_name_first): Re-implement to use dict_iter_match_first.
(dict_iter_name_next): Re-implement to use dict_iter_match_next.
(dict_iter_match_first): New function.
(dict_iter_match_next): New function.
(dict_hash): New function.
* dictionary.h (dict_iter_match_first, dict_iter_match_next): Declare.
* psymtab.c (ada_lookup_partial_symbol): Use new wild_match API.
Doug Evans [Thu, 7 Oct 2010 00:18:22 +0000 (00:18 +0000)]
* data-directory/Makefile.in: Remove @host_makefile_frag@, @frags@.
gdbadmin [Thu, 7 Oct 2010 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Hans-Peter Nilsson [Wed, 6 Oct 2010 23:45:44 +0000 (23:45 +0000)]
* callback.c (os_lseek): Call wrap on lseek result.
Hans-Peter Nilsson [Wed, 6 Oct 2010 23:44:33 +0000 (23:44 +0000)]
* traps.c (cris_break_13_handler): Pass lseek
offset parameter as sign-extended.
Hans-Peter Nilsson [Wed, 6 Oct 2010 23:41:20 +0000 (23:41 +0000)]
* sim/cris/c/seek3.c, sim/cris/c/seek4.c: New tests.
DJ Delorie [Wed, 6 Oct 2010 23:01:30 +0000 (23:01 +0000)]
merge from gcc
Alan Modra [Wed, 6 Oct 2010 23:00:05 +0000 (23:00 +0000)]
daily update
Doug Evans [Wed, 6 Oct 2010 16:46:12 +0000 (16:46 +0000)]
* Makefile.in (REQUIRED_SUBDIRS): New var.
(subdir_do): Verify required subdir Makefiles exist.
Ken Werner [Wed, 6 Oct 2010 16:13:35 +0000 (16:13 +0000)]
gdb:
* dwarf2read.c (read_tag_const_type): Handle const arrays.
gdb/testsuite:
* gdb.base/constvars.c (logical, lugged, luck, lunar, lumen, lurk,
lush, lynx) New constant.
* gdb.base/constvars.exp: Test const array types.
* gdb.dwarf2/dw2-strp.exp: Add const qualifier for ptype tests.
Doug Evans [Wed, 6 Oct 2010 16:02:45 +0000 (16:02 +0000)]
Create subdir data-directory.
* Makefile.in (XML_SYSCALL_DIR, XML_SYSCALL_FILES): Moved to
data-directory/Makefile.in.
(SUBDIRS): Add data-directory.
(all): Remove xml-syscall-copy dependency.
(xml-syscall-copy): Moved to data-directory/Makefile.in as
stamp-syscalls.
(xml-syscall-install): Moved to data-directory/Makefile.in as
install-syscalls.
(install-only): Remove xml-syscall-install dependency.
(all-data-directory): New rule.
(data-directory/Makefile): New rule.
* configure.ac (AC_OUTPUT): Add data-directory/Makefile.
* configure: Regenerate.
* data-directory/Makefile.in: New file.
* python/lib/gdb/__init__.py: New file.
testsuite/
* gdb.base/catch-syscall.exp (do_syscall_tests): Update location
of syscall staging area.
Joel Brobecker [Wed, 6 Oct 2010 15:24:38 +0000 (15:24 +0000)]
[Ada] Fix ARI warnings in advance_wild_match
gdb/ChangeLog:
* ada-lang.c (advance_wild_match): Delete local variable t2.
Adjust code accordingly. Minor reformatting.
Nick Clifton [Wed, 6 Oct 2010 08:58:59 +0000 (08:58 +0000)]
* script-sections.cc(class Memory_region): Remove
current_lma_offset_ field. Rename current_vma_offset_ to
current_offset_. Add last_section_ field.
(Memory_region::get_current_vma_address): Rename to
get_current_address.
(Memory_region::get_current_lma_address): Delete.
(Memory_region::increment_vma_offset): Rename to
increment_offset.
(Memory_region::increment_lma_offset): Delete.
(Memory_region::attributes_compatible): New method. Returns
true if the provided section is compatible with the region.
(Memory_region::get_last_section): New method. Returns the last
section to use the region.
(Memory_region::set_last_section): New method. Stores the last
section to use the region.
(Script_sections::block_in_region): New method. Returns true if
a block of memory is contained within a region.
(Script_sections::find_memory_region): New method. Locates a
memory region to be used to set a VMA or LMA address.
(Output_section_definition::set_section_addresses): Add code to
check for addresses set by memory regions.
(Output_segment::set_section_addresses): Remove memory region
walking code.
(Script_sections::create_segment): Add a warning if a header
segment is created outside of any region.
* script-sections.h (class Script_sections): Add prototypes for
find_memory_region and block_in_region methods.
* testsuite/memory_test.s: Use .long instead of .word.
* testsuite/memory_test.t: Add some more output sections.
* testsuite/memory_test.sh: Update expected output.
* ld.texinfo: Update description of computation of VMA and LMA
addresses for output sections.
* ld-scripts/rgn-at5.t: Add some more output sections.
* ld-scripts/rgn-at5.d: Update expected output.
Paolo Bonzini [Wed, 6 Oct 2010 08:48:22 +0000 (08:48 +0000)]
really sync config/ChangeLog
Ken Werner [Wed, 6 Oct 2010 08:44:15 +0000 (08:44 +0000)]
gdb:
* gdbtypes.h (struct main_type): Remove flag_nottext.
(enum type_flag_value): Remove TYPE_FLAG_NOTTEXT.
(enum type_instance_flag_value): Add TYPE_INSTANCE_FLAG_NOTTEXT.
(TYPE_NOTTEXT): Use TYPE_INSTANCE_FLAG_NOTTEXT instead of flag_nottext.
* gdbtypes.c (make_vector_type): Use TYPE_INSTANCE_FLAG_NOTTEXT instead
of TYPE_FLAG_NOTTEXT.
(init_type): Remove the initialization of the flag_nottext field.
(gdbtypes_post_init): Use TYPE_INSTANCE_FLAG_NOTTEXT instead of
TYPE_FLAG_NOTTEXT.
* c-valprint.c (c_val_print): Remove TYPE_VECTOR check.
gdb/testsuite:
* gdb.base/gnu_vector.c: Add variable c4.
* gdb.base/gnu_vector.exp: Add tests for character vector printing.
* gdb.arch/altivec-abi.exp: Fix expect pattern of character vectors.
Nathan Sidwell [Wed, 6 Oct 2010 08:22:21 +0000 (08:22 +0000)]
bfd/
* elf32-arm.c (elf32_arm_stub_long_branch_any_arm_pic,
elf32_arm_stub_long_branch_any_arm_pic): Use a consistent name for
ip/r12.
(arm_type_of_stub): Remove superfluous braces.
gas/
* config/tc-arm.c (encode_branch): Remove superfluous braces.
(do_t_branch): Move reloc setting to end of routine.
Paolo Bonzini [Wed, 6 Oct 2010 07:41:26 +0000 (07:41 +0000)]
sync config/ChangeLog
Ralf Wildenhues [Wed, 6 Oct 2010 06:01:53 +0000 (06:01 +0000)]
Fix typo in ld dependency commit.
ld/:
* Makefile.am (ALL_64_EMULATIONS): Fix typo in last commit.
* Makefile.in: Regenerate.
Ralf Wildenhues [Wed, 6 Oct 2010 04:58:34 +0000 (04:58 +0000)]
Fix dependency tracking in ld.
ld/:
* Makefile.am (ALL_EMULATIONS): Rewrite in terms of ...
(ALL_EMULATION_SOURCES): ... this new variable.
(ALL_64_EMULATIONS): Rewrite in terms of ...
(ALL_64_EMULATION_SOURCES): ... this new variable.
(EXTRA_ld_new_SOURCES): Rewrite in terms of the _SOURCES
variables.
(eelf32microblaze.c): Fix indentation.
* Makefile.in: Regenerate.
gdbadmin [Wed, 6 Oct 2010 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Tue, 5 Oct 2010 23:00:04 +0000 (23:00 +0000)]
daily update
Alan Modra [Tue, 5 Oct 2010 22:48:34 +0000 (22:48 +0000)]
* bucomm.c (bfd_nonfatal, bfd_nonfatal_message): Don't clobber errno.
Maciej W. Rozycki [Tue, 5 Oct 2010 20:38:02 +0000 (20:38 +0000)]
* gdb.arch/altivec-abi.exp: Fix a typo.
Alan Modra [Tue, 5 Oct 2010 05:48:10 +0000 (05:48 +0000)]
* bucomm.c (bfd_nonfatal): Flush stdout before output to stderr.
(bfd_nonfatal_message, report, list_matching_formats): Likewise.
(list_supported_targets): Tidy.
* objdump.c (free_only_list): Formatting.
(slurp_dynamic_symtab): Non-zero exit status for "not a dynamic
object".
(update_source_path): Delete redundant check for NULL filename.
(disassemble_bytes): Error if disassemble_fn returns a value
that won't increment address.
(disassemble_data): Don't capitalize error message.
(read_section_stabs): Likewise.
(main): Return non-zero exit status on bad options.
Doug Evans [Tue, 5 Oct 2010 04:28:15 +0000 (04:28 +0000)]
* cc-with-index.sh: New file.
Doug Evans [Tue, 5 Oct 2010 03:10:28 +0000 (03:10 +0000)]
* dwarf2read.c (hash_strtab_entry): Insert blank line after
function comment.
(eq_strtab_entry, create_strtab, add_string): Ditto.
(hash_symtab_entry, eq_symtab_entry, delete_symtab_entry): Ditto.
(create_index_table, create_mapped_symtab, find_slot): Ditto.
(hash_expand, add_index_entry, add_indices_to_cpool): Ditto.
(write_hash_table, add_address_entry, write_psymbols): Ditto.
(write_obstack, unlink_if_set, write_one_signatured_type): Ditto.
(write_psymtabs_to_index): Ditto.
Doug Evans [Tue, 5 Oct 2010 02:56:36 +0000 (02:56 +0000)]
* dwarf2read.c (dw2_do_instantiate_symtab): Insert blank line after
function comment.
(dw2_instantiate_symtab, dw2_get_cu, extract_cu_value): Ditto.
(create_cus_from_index, create_addrmap_from_index): Ditto.
(mapped_index_string_hash, find_slot_in_mapped_hash): Ditto.
(dw2_setup, dw2_require_line_header, dw2_require_full_path): Ditto.
(dw2_do_expand_symtabs_matching): Ditto.
gdbadmin [Tue, 5 Oct 2010 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Doug Evans [Mon, 4 Oct 2010 23:32:40 +0000 (23:32 +0000)]
* Makefile.in (uninstall): Use $(DESTDIR).
Alan Modra [Mon, 4 Oct 2010 23:00:07 +0000 (23:00 +0000)]
daily update
Joel Brobecker [Mon, 4 Oct 2010 22:32:31 +0000 (22:32 +0000)]
[Ada/funcalls] do not coerce fat pointers on the stack
When one of the parameter values in a subprogram calls is an array
whose value does not come from inferior memory, the debugger first
copies the array value in inferior memory. Up to now, the memory
used to hold that copy was taken from the stack (just below the SP),
but this is causing problems on SPARC v9.
So the immediate fix is to follow what C does with arrays and strings,
which is allocate memory on the heap.
gdb/ChangeLog:
* ada-lang.c: #include "value.h".
(ensure_lval): Delete advance declaration. Remove gdbarch and sp
arguments. Implement using value_allocate_space_in_inferior
instead of allocating memory from the stack.
(make_array_descriptor): Remove gdbarch and sp parameters. Update
calls to ensure_lval.
(ada_convert_actual): Remove gdbarch and sp parameters. Update
calls to make_array_descriptor and ensure_lval.
* ada-lang.h (ada_convert_actual): Update declaration.
* infcall.c (value_arg_coerce): Update call to ada_convert_actual.
Doug Evans [Mon, 4 Oct 2010 15:30:25 +0000 (15:30 +0000)]
* python/python.c (_initialize_python): Define new function
GdbSetPythonDirectory in python. Use it to update sys.path and
gdb.__path__.
David Daney [Mon, 4 Oct 2010 15:24:49 +0000 (15:24 +0000)]
2010-10-04 David Daney <ddaney@caviumnetworks.com>
* config/tc-mips.c (mips_fix_cn63xxp1): New variable.
(mips_ip): Add errata work around when mips_fix_cn63xxp1 set.
(OPTION_FIX_CN63XXP1, OPTION_NO_FIX_CN63XXP1): New enum options
enumerations.
(md_longopts): Add options for -mfix-cn63xxp1 and -mno-fix-cn63xxp1.
(md_parse_option): Handle OPTION_FIX_CN63XXP1 and
OPTION_NO_FIX_CN63XXP1.
(md_show_usage): Add documentation for -mfix-cn63xxp1.
* doc/c-mips.texi (-mfix-cn63xxp1, -mno-fix-cn63xxp1): Document
the new options.
2010-10-04 David Daney <ddaney@caviumnetworks.com>
* gas/mips/mips.exp (octeon-pref): Run the new test.
* gas/mips/octeon-pref.s: New test.
* gas/mips/octeon-pref.d: New expected results for the new test.
Bernd Schmidt [Mon, 4 Oct 2010 14:13:10 +0000 (14:13 +0000)]
bfd/
* elf-bfd.h (struct bfd_elf_section_reloc_data): New structure.
(struct bfd_elf_section_data): New members REL and RELA; delete
members REL_HDR, REL_HDR2, REL_COUNT, REL_COUNT2, REL_IDX,
REL_IDX2, REL_HASHES.
(_bfd_elf_init_reloc_shdr): Adjust declaration.
(_bfd_elf_single_rel_hdr): Declare.
(RELOC_AGAINST_DISCARDED_SECTION): Use it.
* elf.c (bfd_section_from_shdr): Adjusted to match changes in
data structures.
(_bfd_elf_init_reloc_shdr): New arg RELDATA. Remove arg REL_HDR.
All callers changed. Allocate memory for the Elf_Internal_Shdr
structure.
(_bfd_elf_single_rel_hdr): New function.
(struct fake_section_arg): New structure.
(elf_fake_section): Expect to see a pointer to it in the third
argument. If doing a relocatable link, allocate both REL and RELA
sections as needed.
(assign_section_numbers): Adjusted to match changes in
data structures.
(_bfd_elf_compute_section_file_positions): Call elf_fake_sections
with a struct fake_section_args argument.
* elfcode.h (elf_write_relocs): Adjusted to match changes in
data structures.
(elf_slurp_reloc_table): Likewise.
* elflink.c (_bfd_elf_link_read_relocs): Likewise.
(_bfd_elf_link_size_reloc_section): Remove arg REL_HDR, replace with
RELDATA. Remove argument O. All callers changed. Remove code to
discover the right rel_hdr and count.
(_bfd_elf_link_output_relocs): Adjusted to match changes in
data structures.
(elf_link_adjust_relocs): Remove args REL_HDR, COUNT and REL_HASH;
replace with RELDATA. All callers changed.
(elf_link_input_bfd): Correctly generate rel_hash data when both
REL and RELA sections are present.
(elf_reloc_link_order): Adjusted to match changes in
data structures.
(bfd_elf_final_link): Simplify code to count relocs. Free the
hashes array for both REL and RELA.
(get_dynamic_reloc_section_name): Use _bfd_elf_single_reloc_hdr
* elf32-m32r.c (m32r_elf_fake_sections, elf_backend_fake_sections):
Delete.
* elf32-tic6x.c (elf32_tic6x_fake_sections, elf_backend_fake_sections):
Delete.
(elf32_tic6x_rel_relocation_p): Adjusted to match changes in
data structures.
* elf32-microblaze.c (microblaze_elf_check_relocs): Use
_bfd_elf_single_rel_hdr.
* elf32-ppc.c (ppc_elf_relax_section): Likewise.
* elf32-spu.c (spu_elf_relocate_section): Likewise.
* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
* elf64-hppa.c (get_reloc_section): Likewise.
* elf64-mips.c (mips_elf64_slurp_reloc_table): Adjusted to match
changes in data structures.
(mips_elf64_write_relocs): Use _bfd_elf_single_rel_hdr.
* elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
(ppc64_elf_edit_toc): Likewise.
(get_relocs): Adjusted to match changes in data structures.
Allocate an Elf_Internal_Shdr structure if necessary.
(ppc64_elf_finish_dynamic_sections): Use _bfd_elf_single_rel_hdr.
* elf64-sparc.c (elf64_sparc_slurp_reloc_table): Adjusted to match
changes in data structures.
* elfxx-ia64.c (get_reloc_section): Use _bfd_elf_single_rel_hdr.
* elfxx-mips.c (MIPS_RELOC_RELA_P): Remove macro.
(mips_elf_rel_relocation_p): Adjusted to match changes in data
structures.
(_bfd_mips_elf_relocate_section): Use mips_elf_rel_relocation_p rather
than MIPS_RELOC_RELOCA_P.
* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use
_bfd_elf_single_rel_hdr.
(_bfd_sparc_elf_relocate_section): Likewise.
ld/
* emultempl/xtensaelf.em (replace_insn_sec_with_prop_sec): Use
_bfd_elf_single_rel_hdr.
Paul N. Hilfinger [Mon, 4 Oct 2010 06:37:54 +0000 (06:37 +0000)]
Have ptype handle types declared pragma Unchecked_Variants.
When a type is marked with pragma Unchecked_Variants, ptype did not print
variants having a single component, since the compiler produces incorrect
debugging output for such cases. With this patch, we special-case these
components so that they print.
Changelog:
* gdb/ada-typeprint.c (print_selected_record_field_types): New function,
incorporating and generalizing print_record_field_types.
(print_record_field_types): Change return value and update comment.
Re-implement using print_selected_record_field_types.
(print_choices): Print "=>" here.
Handle case of unencoded variant branch.
(print_variant_clauses): Reformat comment.
Special-case unencoded variant branch.
Paul N. Hilfinger [Mon, 4 Oct 2010 06:34:40 +0000 (06:34 +0000)]
Replace wild_match with faster version and modify its interface.
This new version of wild_match is comparable in speed to strcmp_iw, and has
the same signature and same return value for equal names.
gdb/ChangeLog:
* ada-lang.c (wild_match): Reimplement.
Change API to eliminate unused length argument, reverse arguments and
make 0 the 'true' return value.
(advance_wild_match): New auxiliary function for wild_match to improve
readability.
(ada_match_name, ada_add_block_symbols): Use new API for wild_match.
* psymtab.c (ada_lookup_partial_symbol, map_ada_symtabs): Use new
API for wild_match.
* symfile.h (map_ada_symtabs): Modify declaration to use new API for
wild_match.
* dwarf2read.c (dw2_map_ada_symtabs): Ditto.
gdbadmin [Mon, 4 Oct 2010 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sun, 3 Oct 2010 23:00:05 +0000 (23:00 +0000)]
daily update
H.J. Lu [Sun, 3 Oct 2010 10:49:19 +0000 (10:49 +0000)]
Set BFD target to "plugin" for "nm --plugin".
2010-10-03 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12088
* nm.c (plugin_target): New.
(main): Set plugin_target to "plugin" for --plugin.
(display_file): Pass plugin_target to bfd_openr if target
isn't set.
gdbadmin [Sun, 3 Oct 2010 00:00:02 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sat, 2 Oct 2010 23:00:05 +0000 (23:00 +0000)]
daily update
Maciej W. Rozycki [Sat, 2 Oct 2010 17:48:23 +0000 (17:48 +0000)]
* lib/mi-support.exp (thread_selected_re): Correct pattern used
to match a thread ID.
Ralf Wildenhues [Sat, 2 Oct 2010 14:54:06 +0000 (14:54 +0000)]
Allow to pass separate configure arguments for build, host and target.
/:
PR bootstrap/45326
PR bootstrap/45174
* configure.ac: Honor initial values of $build_configargs,
$host_configargs, $target_configargs. Mark the precious, so
environment settings get recorded.
* configure: Regenerate.
Ralf Wildenhues [Sat, 2 Oct 2010 14:42:48 +0000 (14:42 +0000)]
Sync toplevel and config from GCC.
/:
Sync from GCC:
2010-09-30 Michael Eager <eager@eagercon.com>
* configure.ac (microblaze): Add target-libssp to noconfigdirs.
* configure: Regenerate.
2010-09-21 Iain Sandoe <iains@gcc.gnu.org>
* configure.ac (enable-lto): Add Darwin to the list of supported lto
targets and amend comment.
* configure: Regenerate.
2010-09-03 Jack Howarth <howarth@bromo.med.uc.edu>
* configure.ac: Enable LTO by default on Darwin.
* configure: Regenerate.
2010-07-23 Marc Glisse <marc.glisse@normalesup.org>
PR bootstrap/44455
* configure.ac (extra_mpfr_configure_flags): Copy from
extra_mpc_gmp_configure_flags.
* configure: Re-generated.
config/:
Sync from GCC:
2010-09-10 Jonathan Yong <jon_y@users.sourceforge.net>
* dfp.m4: Enable decimal float for i?86 cygwin
and mingw, and for x86_64 mingw.
Jan Kratochvil [Sat, 2 Oct 2010 13:31:47 +0000 (13:31 +0000)]
gdb/testsuite/
Fix s390x testcase compatibility.
* gdb.dwarf2/dw2-double-set-die-type.S: Use .2byte, not .value.
Doug Kwan [Sat, 2 Oct 2010 09:35:20 +0000 (09:35 +0000)]
2010-10-02 Doug Kwan <dougkwan@google.com>
* symtab.cc (Symbol_table::Symbol_table_hash::operator()): Move
defintion to symtab.h
* symtab.h (Symbol_table::Symbol_table_hash::operator()): Change
declaration to defintion.
H.J. Lu [Sat, 2 Oct 2010 07:04:07 +0000 (07:04 +0000)]
Remove duplicated RMAL.
2010-10-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12076
* i386-dis.c (RMAL): Remove duplicate.
gdbadmin [Sat, 2 Oct 2010 00:00:33 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Sat, 2 Oct 2010 00:00:05 +0000 (00:00 +0000)]
daily update
Doug Evans [Fri, 1 Oct 2010 20:47:45 +0000 (20:47 +0000)]
* dwarf2read.c (_initialize_dwarf2_read): Add usage info to help text
for `save gdb-index' command.
Tom Tromey [Fri, 1 Oct 2010 20:26:11 +0000 (20:26 +0000)]
* symfile.h (allocate_symtab): Update.
* symfile.c (allocate_symtab): Make 'filename' const.
* psymtab.c (add_psymbol_to_bcache): Make 'name' const.
(add_psymbol_to_list): Likewise.
* psympriv.h (struct partial_symtab) <filename, dirname>: Now
const.
(add_psymbol_to_list): Update.
* mdebugread.c (new_symtab): Make 'name' const.
(psymtab_to_symtab_1): Make 'filename' const.
* elfread.c (elfstab_offset_sections): Update.
* dwarf2read.c (dwarf_decode_lines): Make 'comp_dir' const.
(dwarf2_start_subfile): Make 'dirname' and 'comp_dir' const.
(psymtab_include_file_name): Update.
* dbxread.c (find_stab_function_addr): Make 'filename' const.
* buildsym.h (start_subfile): Update.
* buildsym.c (start_subfile): Make arguments const.
Michael Snyder [Fri, 1 Oct 2010 17:35:30 +0000 (17:35 +0000)]
2010-09-30 Ali Lakhia <lakhia@alumni.utexas.net>
* fork-child.c (breakup_args): Fix crash if shell forking is
disabled at compile time.
Doug Evans [Fri, 1 Oct 2010 17:03:50 +0000 (17:03 +0000)]
* lib/gdb-python.exp: New file.
* gdb.python/py-block.exp: Use it.
* gdb.python/py-breakpoint.exp: Ditto.
* gdb.python/py-frame.exp: Ditto.
* gdb.python/py-inferior.exp: Ditto.
* gdb.python/py-param.exp: Ditto.
* gdb.python/py-prettyprint.exp: Ditto.
* gdb.python/py-shared.exp: Ditto.
* gdb.python/py-symbol.exp: Ditto.
* gdb.python/py-symtab.exp: Ditto.
* gdb.python/py-type.exp: Ditto.
* gdb.python/py-value.exp: Ditto.
* gdb.python/python.exp: Ditto.
Joel Brobecker [Fri, 1 Oct 2010 16:25:00 +0000 (16:25 +0000)]
[Ada] array and bounds in fat pointer can be a stub
This patch adds handling of the case when a fat pointer has the
P_ARRAY and/or P_BOUNDS fields defined as a stub. In that case,
this stub needs to be resolved.
There are two issues:
. First, making sure that the resolution takes place itself.
That's the change to ada_check_typedef.
. Make sure that the type returned after resolution is not itself
a typedef. This is the change to ada_check_typedef.
gdb/ChangeLog (Jerome Guitton, Joel Brobecker):
* ada-lang.c (desc_bounds): Add handling of the case where
the P_BOUNDS field is a pointer to a stub.
(desc_data_target_type): Same for P_ARRAY field.
(ada_check_typedef): Strip the typedef layers from the type
found by ada_find_any_type.
Joel Brobecker [Fri, 1 Oct 2010 15:55:14 +0000 (15:55 +0000)]
[sparc] inferior SEGV while calling Ada subprogram
gdb/ChangeLog:
* sparc-tdep.c (sparc32_frame_align): New function.
(sparc32_gdbarch_init): Set the frame_align gdbarch method.
* sparc64-tdep.c (sparc64_frame_align): New function.
(sparc64_gdbarch_init): Set the frame_align gdbarch method.
Nick Clifton [Fri, 1 Oct 2010 15:02:33 +0000 (15:02 +0000)]
* expression.cc (eval): Replace dummy argument with NULL.
(eval_maybe_dot): Check for a NULL result section pointer.
(Symbol_expression::value): Likewise.
(Dot_expression::value): Likewise.
(BINARY_EXPRESSION): Likewise.
(Max_expression::value): Likewise.
(Min_expression::value): Likewise.
(Absolute_expression::value): Likewise.
(Addr_expression::value_from_output_section): Likewise.
(Loaddddr_expression::value_from_output_section): Likewise.
(Segment_start_expression::value): Likewise.
* script-sections.cc
(Sections_elememt_dot_assignment::finalize_symbols): Replace dummy
argument with NULL.
(Sections_elememt_dot_assignment::set_section_addresses):
Likewise.
(Output_data_expression::do_write_to_buffer): Likewise.
(Output_section_definition::finalize_symbols): Likewise.
(Output_section_definition::set_section_addresses): Likewise.
Thomas Schwinge [Fri, 1 Oct 2010 11:22:40 +0000 (11:22 +0000)]
2010-10-01 Thomas Schwinge <thomas@codesourcery.com>
* elf32-arm.c (elf32_arm_size_stubs): Don't choke on local symbols in
SHN_UNDEF, SHN_ABS, SHN_COMMON.
Alan Modra [Fri, 1 Oct 2010 08:15:42 +0000 (08:15 +0000)]
PR ld/12066
* ldexp.c (fold_name): Treat absolute symbols as plain numbers.
* ld.texinfo (Expression Section): Don't say absolute symbols
are addresses.
H.J. Lu [Fri, 1 Oct 2010 04:47:02 +0000 (04:47 +0000)]
Add 2 tests for PR ld/11812.
2010-09-30 H.J. Lu <hongjiu.lu@intel.com>
PR ld/11812
* ld-i386/nogot2.d: New
* ld-i386/nogot2.s: Likewise.
* ld-x86-64/nogot2.d: Likewise.
* ld-x86-64/nogot2.s: Likewise.
* ld-i386/i386.exp: Run nogot2.
* ld-x86-64/x86-64.exp: Likewise.
H.J. Lu [Fri, 1 Oct 2010 04:28:04 +0000 (04:28 +0000)]
Clear non_elf on ELF linker defined symbols.
2010-09-30 H.J. Lu <hongjiu.lu@intel.com>
PR ld/11812
* elf32-i386.c (elf_i386_size_dynamic_sections): Don't
allocate .got.plt section if there are no GOT nor PLT
entries and there is no refeence to _GLOBAL_OFFSET_TABLE_.
* elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Li.kewise.
* elflink.c (_bfd_elf_define_linkage_sym): Clear non_elf.
H.J. Lu [Fri, 1 Oct 2010 00:43:40 +0000 (00:43 +0000)]
Set MAX_REGISTER_SIZE to 64.
2010-09-30 H.J. Lu <hongjiu.lu@intel.com>
* defs.h (MAX_REGISTER_SIZE): Set to 64.
gdbadmin [Fri, 1 Oct 2010 00:00:32 +0000 (00:00 +0000)]
*** empty log message ***
Alan Modra [Fri, 1 Oct 2010 00:00:04 +0000 (00:00 +0000)]
daily update
Ralf Wildenhues [Thu, 30 Sep 2010 21:55:13 +0000 (21:55 +0000)]
build: info-gcc, dvi-gcc etc work from unbuilt configured tree.
/:
Sync from GCC:
PR bootstrap/45796
* Makefile.def (info-gcc, dvi-gcc, pdf-gcc, html-gcc):
Depend on all-build-libiberty.
* Makefile.in: Regenerate.
Tom Tromey [Thu, 30 Sep 2010 19:14:30 +0000 (19:14 +0000)]
* symfile.h (struct sym_fns) <next>: Remove.
(add_symtab_fns): Update.
* symfile.c (sym_fns_ptr): New typedef.
(symtab_fns): Now a VEC.
(add_symtab_fns): Update. Change argument type.
(find_sym_fns): Update. Change return type.
(get_symfile_segment_data): Update.
* objfiles.h (struct objfile) <sf>: Now const.
* somread.c (som_sym_fns): Now const. Update.
* xcoffread.c (xcoff_sym_fns): Now const. Update.
* mipsread.c (ecoff_sym_fns): Now const. Update.
* machoread.c (macho_sym_fns): Now const. Update.
* elfread.c (elf_sym_fns): Now const. Update.
(elf_sym_fns_gdb_index): Likewise.
* dbxread.c (aout_sym_fns): Now const. Update.
* coffread.c (coff_sym_fns): Now const. Update.
Tom Tromey [Thu, 30 Sep 2010 18:58:08 +0000 (18:58 +0000)]
gdb
* value.c (value_primitive_field): Take 'offset' into account for
packed field.
gdb/testsuite
* gdb.base/anon.exp: New file.
* gdb.base/anon.c: New file.
Tom Tromey [Thu, 30 Sep 2010 17:51:39 +0000 (17:51 +0000)]
gdb
* completer.c (count_struct_fields): Handle anonymous structs and
unions.
(add_struct_fields): Likewise.
gdb/testsuite
* gdb.base/completion.exp: Test completion through anonymous
union.
* gdb.base/break1.c (struct some_struct): Add anonymous union.
Pierre Muller [Thu, 30 Sep 2010 16:02:35 +0000 (16:02 +0000)]
* s390-mkopc.c (main): Exit with error 1 if sscanf fails
to parse all 6 parameters.