aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-12-23This patch add support for cpu marvell-whitney.Nick Clifton2-0/+7
* gas/config/tc-arm.c (arm_cpus): Add core marvell-whitney.
2014-12-23Reformat the objdump.1 man output to avoid overlong lines.Nick Clifton2-19/+59
2014-12-23Report an error for script multiply defined symbolsAlan Modra2-9/+34
or maybe not just yet, but this is better than a FIXME. * ldexp.c (update_definedness): Return false if script symbol is redefining a strong symbol in an object. (exp_fold_tree_1 <etree_assign>): Set up for reporting a multiple definition error, but for now leave disabled.
2014-12-23Use a symbol flag bit to mark linker defined symbolsAlan Modra14-3/+77
Trying to use the SEC_LINKER_CREATED section flag to determine whether a symbol is linker defined fails to work on targets like alpha that define special SEC_COMMON sections. These might contain symbols that originated in an object file. include/ * bfdlink.h (struct bfd_link_hash_entry): Comment non_ir_ref. Add linker_def. bfd/ * elflink.c (_bfd_elf_define_linkage_sym): Set linker_def. * linker.c (_bfd_generic_link_add_one_symbol): Clear linker_def for CDEF, DEF, DEFW, COM. ld/ * ldexp.c (exp_fold_tree_1 <etree_provide>): Test linker_def. ld/testsuite/ * ld-powerpc/sdabase.s, * ld-powerpc/sdabase.t, * ld-powerpc/sdabase.d: New test. * ld-powerpc/sdabase2.t, * ld-powerpc/sdabase2.d: New test. * ld-powerpc/powerpc.exp: Run them.
2014-12-23Don't PROVIDE over top of common symbolsAlan Modra5-6/+30
This: int end[100000]; int main(void) { end[99999] = 0; return 0; } should not segfault. ld/ * ldexp.c (exp_fold_tree_1 <etree_provide>): Leave bfd_link_hash_common symbols alone. ld/testsuite/ * ld-elf/endsym.s, *ld-elf/endsym.d: New test.
2014-12-23Correct logic for "defined by object"Alan Modra2-4/+8
The old code missed testing bfd_link_hash_undefweak, and wrongly excluded bfd_link_hash_common symbols. It is also clearer to invert the set of enum bfd_link_hash_type values tested. bfd_link_hash_indirect and bfd_link_hash_warning will never appear here. * ldexp.c (update_definedness): Correct logic setting by_object.
2014-12-23Move support code for linker script DEFINED to ldexp.cAlan Modra6-93/+114
This moves support code for DEFINED to ldexp.c where it is used, losing the lang_ prefix on identifiers. Two new functions are needed to initialize and clean up to hash table, but other than that there are no functional changes here. * ldexp.c (struct definedness_hash_entry, definedness_table) (definedness_newfunc, symbol_defined, update_definedness): Move and rename from.. * ldlang.h (struct lang_definedness_hash_entry): ..here,.. * ldlang.c (lang_definedness_table, lang_definedness_newfunc) (lang_symbol_defined, lang_update_definedness): ..and here. * ldexp.c (ldexp_init, ldexp_finish): New functions, extracted from.. * ldlang.c (lang_init, lang_finish): ..here. * ldexp.h (ldexp_init, ldexp_finish): Declare. * ldlang.h (lang_symbol_defined, lang_update_definedness): Delete. * ldmain.c (main): Call ldexp_init and ldexp_finish.
2014-12-23Updated translations for the gas and gprof tools.Nick Clifton5-3848/+6465
* po/es.po: Updated Esperanto translation. * po/fr.po: Updated French translation. * po/uk.po: Updated Ukrainian translation.
2014-12-23Automatic date update in version.inGDB Administrator1-1/+1
2014-12-22Cast size to long to warnH.J. Lu2-1/+5
* dwarf.c (read_cie): Cast size to long to warn.
2014-12-22More fixes for invalid memory accesses exposed by fuzzed binaries.Nick Clifton3-12/+83
PR binutils/17531 * dwarf.c (decode_location_expression): Check for an out of range value for a DW_OP_GNU_entry_value expression. (display_debug_lines_raw): Check for a partial .debug_line. section being encountered without a prior, full .debug.line section. (display_debug_lines_decoded): Likewise. Also check for li_line_range being zero. (display_debug_pubnames_worker): Check for an invalid pn_length field. (read_cie): Add range checks. * elfcomm.c (setup_archive): Check for a negative longnames_size.
2014-12-22More fixes for memory access violations exposed by fuzzed binaries.Nick Clifton41-40/+279
PR binutils/17512 * archive.c (do_slurp_bsd_armap): Return if the parsed_size is zero. (bfd_slurp_armap): Zero terminate the name. (bfd_generic_stat_arch_elt): If there is no header, fail. * elf32-arc.c (arc_info_to_howto_rel): Replace BFD_ASSERT with error message. * elf32-avr.c (avr_info_to_howto_rela): Likewise. * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise. * elf32-cris.c (cris_info_to_howto_rela): Likewise. * elf32-d10v.c (d10v_info_to_howto_rel): Likewise. * elf32-d30v.c (d30v_info_to_howto_rel): Likewise. * elf32-dlx.c (dlx_rtype_to_howto): Likewise. * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise. * elf32-fr30.c (fr30_info_to_howto_rela): Likewise. * elf32-frv.c (frv_info_to_howto_rela): Likewise. * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise. * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise. * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise. * elf32-lm32.c (lm32_info_to_howto_rela): Likewise. * elf32-m32c.c (m32c_info_to_howto_rela): Likewise. * elf32-m32r.c (m32r_info_to_howto_rel): Likewise. * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise. * elf32-mep.c (mep_info_to_howto_rela): Likewise. * elf32-metag.c (metag_info_to_howto_rela): Likewise. * elf32-moxie.c (moxie_info_to_howto_rela): Likewise. * elf32-msp430.c (msp430_info_to_howto_rela): Likewise. * elf32-mt.c (mt_info_to_howto_rela): Likewise. * elf32-nds32.c (nds32_info_to_howto_rel): Likewise. * elf32-or1k.c (or1k_info_to_howto_rela): Likewise. * elf32-rl78.c (rl78_info_to_howto_rela): Likewise. * elf32-rx.c (rx_info_to_howto_rela): Likewise. * elf32-v850.c (v850_elf_info_to_howto_rel): Likewise. * elf32-visium.c (visium_info_to_howto_rela): Likewise. * elf32-xgate.c (xgate_info_to_howto_rel): Likewise. * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise. * elf64-mmix.c (mmix_info_to_howto_rela): Likewise. * elf64-x86-64.c (elf_x86_64_reloc_type_lookup): Likewise. * elfnn-aarch64.c (elfNN_aarch64_bfd_reloc_from_type): Likewise. * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Add range checking of reloc symbol index. * mach-o.c (bfd_mach_o_canonicalize_one_reloc): If no symbols have been provided then set the reloc's symbol to undefined. * reloc.c (bfd_generic_get_relocated_section_contents): Add range checking of the reloc to be applied. * versados.c (process_otr): Add more range checks. (versados_canonicalize_reloc): If the section is unknown, set the symbol to undefined. * vms-alpha.c (_bfd_vms_slurp_eisd): Add range checks. (alpha_vms_object_p): Likewise.
2014-12-22gold/Cary Coutant2-1/+6
* powerpc.cc (Target_powerpc::relocate): Fix overflow check.
2014-12-22cp-namespace.c (cp_lookup_symbol_via_all_imports): New function.Doug Evans2-46/+43
gdb/ChangeLog: * cp-namespace.c (cp_lookup_symbol_via_all_imports): New function. (cp_lookup_symbol_namespace): Call it. (cp_lookup_symbol_nonlocal): Ditto.
2014-12-22cp-namespace.c (cp_lookup_symbol_via_imports): New arg "search_scope_first".Doug Evans2-6/+15
gdb/ChangeLog: * cp-namespace.c (cp_lookup_symbol_via_imports): New arg "search_scope_first". All callers updated.
2014-12-22cp-namespace.c (cp_lookup_nested_symbol_1): New function.Doug Evans2-136/+212
gdb/ChangeLog: * cp-namespace.c (cp_lookup_nested_symbol_1): New function. (cp_basic_lookup_symbol): Renamed from lookup_symbol_file. Delete arg "search". All callers updated. (cp_lookup_bare_symbol): New function. (cp_search_static_and_baseclasses): New function. (cp_lookup_symbol_in_namespace): Rewrite, move more logic here. (find_symbol_in_baseclass): Simplify, call cp_lookup_nested_symbol_1. (cp_lookup_nested_symbol): Ditto.
2014-12-22cp-namespace.c (cp_lookup_symbol_in_namespace): Simplify.Doug Evans2-10/+13
gdb/ChangeLog: * cp-namespace.c (cp_lookup_symbol_in_namespace): Simplify.
2014-12-22cp-namespace.c: Whitespace cleanup.Doug Evans2-9/+13
gdb/ChangeLog: * cp-namespace.c: Whitespace cleanup.
2014-12-22Automatic date update in version.inGDB Administrator1-1/+1
2014-12-21Automatic date update in version.inGDB Administrator1-1/+1
2014-12-20gdb/17394: cannot put breakpoint only in selected ASM file.Mihail-Marian Nistor7-24/+644
This patch fixes a problem when trying to insert a breakpoint on a specific symbol defined in a specific file, eg: break foo.c:func This currently works for files in C/C++/Ada, etc, but doesn't always work for Asm files. Analysis of the problem showed that this related to a limitation in gas, which does not generate debug info for functions/ symbols. Thus, we have a symtab for the file ("info sources" shows the file), but it contains no symbols. When find_linespec_symbols is called in linespec_parse_basic, it calls find_function_symbols, which uses add_matching_symbols_to_info to collect all matching symbols. That function does [pardon any mangled formatting]: for (ix = 0; VEC_iterate (symtab_ptr, info->file_symtabs, ix, elt); ++ix) { if (elt == NULL) { iterate_over_all_matching_symtabs (info->state, name, VAR_DOMAIN, collect_symbols, info, pspace, 1); search_minsyms_for_name (info, name, pspace); } else if (pspace == NULL || pspace == SYMTAB_PSPACE (elt)) { /* Program spaces that are executing startup should have been filtered out earlier. */ gdb_assert (!SYMTAB_PSPACE (elt)->executing_startup); set_current_program_space (SYMTAB_PSPACE (elt)); iterate_over_file_blocks (elt, name, VAR_DOMAIN, collect_symbols, info); } } This iterates over the symtabs. In the failing use case, ELT is non-NULL (points to the symtab for the .s file), so it calls iterate_over_file_blocks. Herein is where the problem exists: it is assumed that if NAME exists, it must exist in the given symtab -- a reasonable assumption for "normal" (non-asm) cases. It never searches minimal symbols (or in the global default symtab). This patch fixes the problem by doing so. It is important to note that iterating over minsyms is fairly expensive, so this patch only adds that extra search if the language is language_asm and iterate_over_file_blocks returns no symbols. gdb/ChangeLog: 2014-12-20 Keith Seitz <keiths@redhat.com> Mihail-Marian Nistor <mihail.nistor@freescale.com> PR gdb/17394 * linespec.c (struct collect_minsyms): Add new member `symtab'. (add_minsym): Handle cases where info.symtab is non-NULL. (search_minsyms_for_name): Add new parameter `symtab'. Handle limiting searches to a specific symtab. (add_matching_symtabs_to_info): Search through minimal symbols for language_asm files for which no new symbols are found. gdb/testsuite/ChangeLog: 2014-12-20 Mihail-Marian Nistor <mihail.nistor@freescale.com> PR gdb/17394 * gdb.linespec/break-asm-file.c: New file. * gdb.linespec/break-asm-file.exp: New file. * gdb.linespec/break-asm-file0.s: New file. * gdb.linespec/break-asm-file1.s: New file.
2014-12-20Change SometimesInlineFunction to "return i * i * 3;"H.J. Lu2-1/+7
The debug_msg test has 2 implementations of SometimesInlineFunction: int SometimesInlineFunction(int i) { return i; } int SometimesInlineFunction(int i) { return i * i; } and One Definition Rule (ODR) violation detection expects they will be compiled into functions of different sizes. Hower, on x86, GCC 4.7 and newer compile them into functions of the same size and ODR violation detection test fails. This patch changes int SometimesInlineFunction(int i) { return i; } to int SometimesInlineFunction(int i) { return i * i * 3; } so that it will be compiled into a function of larger size. PR gold/14608 * testsuite/debug_msg.cc (SometimesInlineFunction): Changed to "return i * i * 3;".
2014-12-20Automatic date update in version.inGDB Administrator1-1/+1
2014-12-19Rework the alignment check for BFD_RELOC_MIPS_18_PCREL_S3.Matthew Fortune9-26/+93
gas/ * config/tc-mips.c (md_apply_fix): Apply alignment check to the symbol and offset rather than *valP for BFD_RELOC_MIPS_18_PCREL_S3. Also update the error message for BFD_RELOC_MIPS_19_PCREL_S2. gas/testsuite/ * gas/mips/r6-64.s: Remove .align directives from LDPC instructions and add further tests for LDPC. * gas/mips/r6-64-n32.d: remove the NOPs from LDPC expected output and update for new tests. * gas/mips/r6-64-n64.d: Likewise. * gas/mips/ldpc-unalign.l: New file. * gas/mips/ldpc-unalign.s: Likewise. * gas/mips/mips.exp: Run ldpc-unalign test.
2014-12-19Fix octeon3 tests for targets with default abi != n32Matthew Fortune2-13/+17
gas/testsuite/ * gas/mips/octeon3.d: Switch to use numeric register names.
2014-12-19Fix all failing FPXX tests for tx39-elf.Matthew Fortune16-15/+33
ld/testsuite/ * ld-mips-elf/attr-gnu-4-00.d: Relax check for ISA extension. * ld-mips-elf/attr-gnu-4-01.d: Likewise. * ld-mips-elf/attr-gnu-4-02.d: Likewise. * ld-mips-elf/attr-gnu-4-03.d: Likewise. * ld-mips-elf/attr-gnu-4-08.d: Likewise. * ld-mips-elf/attr-gnu-4-10.d: Likewise. * ld-mips-elf/attr-gnu-4-11.d: Likewise. * ld-mips-elf/attr-gnu-4-18.d: Likewise. * ld-mips-elf/attr-gnu-4-20.d: Likewise. * ld-mips-elf/attr-gnu-4-22.d: Likewise. * ld-mips-elf/attr-gnu-4-28.d: Likewise. * ld-mips-elf/attr-gnu-4-30.d: Likewise. * ld-mips-elf/attr-gnu-4-33.d: Likewise. * ld-mips-elf/attr-gnu-4-38.d: Likewise. * ld-mips-elf/attr-gnu-4-44.d: Likewise.
2014-12-19Fix undefined weak symbol reloc testsMatthew Fortune6-78/+55
ld/testsuite/ * ld-mips-elf/mips-elf.exp: Update undefweak-overflow tests. * ld-mips-elf/undefweak-overflow-n32.d: Remove. * ld-mips-elf/undefweak-overflow-n64.d: Likewise. * ld-mips-elf/undefweak-overflow.s: Set mips64r6, noreorder and add a label to mark the micromips region. * ld-mips-elf/undefweak-overflow.d: Update expected output.
2014-12-19MIPS SDE OS ABI supportYao Qi7-1/+297
This patch is to add SDE OS ABI support in GDB, which has been used in codesourcery gdb tree for some years. gdb: 2014-12-19 Maciej W. Rozycki <macro@codesourcery.com> Nigel Stephens <nigel@mips.com> Chris Dearman <chris@mips.com> Luis Machado <lgustavo@codesourcery.com> * Makefile.in (ALL_TARGET_OBS): Add mips-sde-tdep.o. (ALLDEPFILES): Add mips-sde-tdep.c. * mips-sde-tdep.c: New file containg SDE specific code. * configure.tgt (mips*-sde*-elf*): Add mips-sde-dep.o to gdb_target_obs. * defs.h (gdb_osabi): Add GDB_OSABI_SDE. * osabi.c (gdb_osabi_names): Add SDE. * NEWS: Mention the change.
2014-12-19Automatic date update in version.inGDB Administrator1-1/+1
2014-12-18Set ppc COMMONPAGESIZE to 64kRichard Henderson3-2/+8
bfd/ * elf32-ppc.c (ELF_COMMONPAGESIZE): Set to 64k. * elf64-ppc.c (ELF_COMMONPAGESIZE): Likewise.
2014-12-18A few comment cleanupsSimon Marchi3-17/+12
I stumbled upon a few comments that I think are outdated. Comment for elfread.c (elf_symfile_init): As far as history goes in git, I don't see anything related to that. Comment for elfread.c (elf_symfile_read): References a parameter that was removed in 1999. Comment for struct sym_fns/sym_offsets: References a parameter that was changed in 1999. gdb/ChangeLog: * elfread.c (elf_symfile_init): Remove stale comment. (elf_symfile_read): Same. * symfile.h (struct sym_fns): Same.
2014-12-18MIPS: Provide FPU info and decode FCSR in `info float'Yao Qi4-1/+115
This patch is the V2. V1 can be found in https://sourceware.org/ml/gdb-patches/2012-05/msg00938.html V2 is to address Joel's comment <https://sourceware.org/ml/gdb-patches/2012-06/msg00289.html> about keeping dumping floating point registers. Additionally, command 'info float' prints bits on nan2008 and abs2008. ------------------------------------------------------------------ The change below provides a MIPS-specific handler for the: (gdb) info float command. It provides information about the FPU type available (if any), the FPU register width, and decodes the CP1 Floating Point Control and Status Register (FCSR): (gdb) print /x $fsr $1 = 0xff83ffff (gdb) info float fpu type: double-precision reg size: 32 bits cond : 0 1 2 3 4 5 6 7 cause : inexact uflow oflow div0 inval unimp mask : inexact uflow oflow div0 inval flags : inexact uflow oflow div0 inval rounding: -inf flush : zero One point to note about CP1.FCSR are the non-standard Flush-to-Nearest and Flush-Override bits. They are not a part of the MIPS architecture and take two positions reserved for an implementation-dependent use in the architecture. They are present in all the FPU implementations made by MIPS Technologies since the spin-off from SGI. I haven't been able to track down a single other MIPS FPU implementation that would make any use of these bits and they are required to be hardwired to zero by the architecture specification if unimplemented. Therefore I think it makes sense to report them in the current way. GDB has no guaranteed access to the CP0 Processor Identification (PRId) register to validate this feature properly and the ID information stored in the CP1 Floating Point Implementation Register (FIR) is from my experience not reliable enough (there's no Company ID available there for once unlike in CP0.PRId and Processor ID is not guaranteed to be unique). As a side note we should probably dump CP1.FIR information as well, as there's useful stuff indicating some FPU features there. That's material for another change however. gdb/ 2014-12-18 Nigel Stephens <nigel@mips.com> Maciej W. Rozycki <macro@codesourcery.com> * mips-tdep.c (print_fpu_flags): New function. (mips_print_float_info): Likewise. (mips_gdbarch_init): Install mips_print_float_info as gdbarch print_float_info routine. gdb/testsuite/ 2014-12-18 Nigel Stephens <nigel@mips.com> Maciej W. Rozycki <macro@codesourcery.com> * gdb.base/float.exp: Handle the new output from "info float" on MIPS targets.
2014-12-18Refactor gdbarch method print_float_infoYao Qi6-37/+43
This patch is to change print_float_info gdbarch method for the following two reasons, 1. we want to add a default implementation of print_float_info to dump the float pointer registers. It can be reused by backend to print something more than float point registers. 2. we want to simplify the caller of print_float_info, infcmd.c:print_float_info. gdb: 2014-12-18 Yao Qi <yao@codesourcery.com> * gdbarch.sh (print_float_info): Change its type from 'M' to 'm'. * gdbarch.c: Re-generated. * gdbarch.h: Likewise. * infcmd.c (default_print_float_info): New function. (print_float_info): Removed. Move code to default_print_float_info. (float_info): Adjust to call gdbarch_print_float_info. * inferior.h (default_print_float_info): Declare it.
2014-12-18Remove h8300_print_float_infoYao Qi2-9/+6
In infcmd.c:print_float_info, if the architecture doesn't have gdbarch method print_float_info implemented and doesn't float reggroup, GDB will prints "No floating-point info available for this processor." The h8300 port doesn't have float registers, and don't need to implement print_float_info. This patch is to remove it. gdb: 2014-12-18 Yao Qi <yao@codesourcery.com> * h8300-tdep.c (h8300_print_float_info): Remove. (h8300_gdbarch_init): Remove the call to set_gdbarch_print_float_info.
2014-12-18infcmd.c (jump_command): Minor simplification.Doug Evans2-2/+9
gdb/ChangeLog: * infcmd.c (jump_command): Minor simplification.
2014-12-18language_lookup_primitive_type: Renamed from ↵Doug Evans10-27/+31
language_lookup_primitive_type_by_name. gdb/ChangeLog: * language.c (language_lookup_primitive_type): Renamed from language_lookup_primitive_type_by_name. All callers updated.
2014-12-18Fix file name in earlier entry.Doug Evans1-1/+1
2014-12-18Display DW_LANG_C11 as (C11).Mark Wielaard2-1/+6
* dwarf.c (read_and_display_attr_value): Change display name of DW_LANG_C11 from (ANSI C11) to (C11).
2014-12-18Automatic date update in version.inGDB Administrator1-1/+1
2014-12-17Fix MinGW compilationJan Kratochvil11-6/+36
On Sun, 14 Dec 2014 07:00:28 +0100, Yao Qi wrote: The build on mingw host is broken because mingw has no mkdtemp. ../../../git/gdb/compile/compile.c: In function 'get_compile_file_tempdir': ../../../git/gdb/compile/compile.c:194:3: error: implicit declaration of function 'mkdtemp' [-Werror=implicit-function-declaration] tempdir_name = mkdtemp (tname); ^ ../../../git/gdb/compile/compile.c:194:16: error: assignment makes pointer from integer without a cast [-Werror] tempdir_name = mkdtemp (tname); ^ cc1: all warnings being treated as errors In the end I have managed to test it by Wine myself: $ wine build_win32/gdb/gdb.exe -q build_win32/gdb/gdb.exe -ex start -ex 'compile code 1' -ex 'set confirm no' -ex quit [...] Temporary breakpoint 1, main (argc=1, argv=0x241418) at ../../gdb/gdb.c:29 29 args.argc = argc; Could not load libcc1.so: Module not found. Even if it managed to load libcc1.so (it needs host-dependent name libcc1.dll) then it would soon end up at least on: default_infcall_mmap: error (_("This target does not support inferior memory allocation by mmap.")); As currently there is only: linux-tdep.c: set_gdbarch_infcall_mmap (gdbarch, linux_infcall_mmap); While one could debug Linux targets from MS-Windows host I find it somehow overcomplicated now when we are trying to get it running at least on native Linux x86*. The 'compile' project needs a larger port effort to run on MS-Windows. gdb/ChangeLog 2014-12-17 Jan Kratochvil <jan.kratochvil@redhat.com> Fix MinGW compilation. * compile/compile.c (get_compile_file_tempdir): Call error if !HAVE_MKDTEMP. * config.in: Regenerate. * configure: Regenerate. * configure.ac (AC_CHECK_FUNCS): Add mkdtemp. gdb/testsuite/ChangeLog 2014-12-17 Jan Kratochvil <jan.kratochvil@redhat.com> Fix MinGW compilation. * gdb.compile/compile-ops.exp: Update untested message if !skip_compile_feature_tests. * gdb.compile/compile-setjmp.exp: Likewise. * gdb.compile/compile-tls.exp: Likewise. * gdb.compile/compile.exp: Likewise. * lib/gdb.exp (skip_compile_feature_tests): Check also "Command not supported on this host".
2014-12-17value_maybe_namespace_elt: Remove redundant call to lookup_static_symbol.Doug Evans2-9/+5
Anytime you can remove a symbol lookup that loops over all objfiles is A Good Thing. The call to lookup_static_symbol in valops.c:value_maybe_namespace_elt is redundant with this call in cp_lookup_nested_symbol: /* Now search all static file-level symbols. We have to do this for things like typedefs in the class. We do not try to guess any imported namespace as even the fully specified namespace search is already not C++ compliant and more assumptions could make it too magic. */ size = strlen (parent_name) + 2 + strlen (nested_name) + 1; concatenated_name = alloca (size); xsnprintf (concatenated_name, size, "%s::%s", parent_name, nested_name); sym = lookup_static_symbol (concatenated_name, VAR_DOMAIN); if (sym != NULL) return sym; Earlier in value_maybe_namespace_elt we do this: sym = cp_lookup_symbol_namespace (namespace_name, name, get_selected_block (0), VAR_DOMAIN); That sequence goes like: value_maybe_namespace_elt -> cp_lookup_symbol_namespace -> cp_lookup_symbol_in_namespace -> lookup_symbol_file -> cp_lookup_nested_symbol -> lookup_static_symbol The call was added in commit 41f62f3939b1c69e68ef5652feb44fef90eb85c9. https://sourceware.org/ml/gdb-patches/2010-06/msg00663.html With a part 2 here: https://sourceware.org/ml/gdb-patches/2010-06/msg00664.html At the time the call to lookup_static_symbol (spelled lookup_static_symbol_aux at the time) was needed. However, this patch, 8dea366bbed7986295681c101dcfbd35aeb6dfc4, https://sourceware.org/ml/gdb-patches/2012-11/msg00387.html augmented lookup_symbol_file to call cp_lookup_nested_symbol and introduced the redundancy. It's kinda buried, so it's totally not unexpected that this happened. gdb/ChangeLog: * valops.c (value_maybe_namespace_elt): Remove redundant call to lookup_static_symbol.
2014-12-17New parameter "debug symbol-lookup".Doug Evans12-61/+466
gdb/ChangeLog: New parameter "debug symbol-lookup". * NEWS: Mention it. * cp-namespace.c (cp_lookup_symbol_imports_or_template): Add debug output. (cp_lookup_symbol_namespace, cp_lookup_symbol_nonlocal): Ditto. (cp_lookup_nested_symbol): Ditto. * language.c (language_lookup_primitive_type_by_name): Add debug output. * minsyms.c (lookup_minimal_symbol): Add debug output. * objfiles.c (objfile_debug_name): Moved here, and renamed ... * symfile-debug.c (debug_objfile_name): ... from here. All callers updated. * objfiles.h (objfile_debug_name): Declare. * symtab.h (symbol_lookup_debug): Declare. * symtab.c (symbol_lookup_debug): New global. (lookup_language_this): Add debug output. (lookup_symbol_aux, lookup_symbol_in_block): Ditto. (lookup_symbol_in_objfile_symtabs, lookup_symbol_via_quick_fns): Ditto. (lookup_symbol_in_static_block, lookup_symbol_in_objfile): Ditto. (_initialize_symtab): Add new parameter "debug symbol-lookup". gdb/doc/ChangeLog: * gdb.texinfo (Debugging Output): Document "debug symbol-lookup".
2014-12-17Make buildsym set-up/tear-down more consistent, and document it.Doug Evans4-76/+180
gdb/ChangeLog: * buildsym.c: Add comments describing how the buildsym machinery is used by the various file formats. (really_free_pendings): Enhance function comment. See pending_macros to NULL. Simplify resetting pending_addrmap. Call free_buildsym_compunit. (free_buildsym_compunit): Set current_subfile to NULL. (prepare_for_building): New function. (start_symtab): Call it. Remove call to set_last_source_file. (restart_symtab): New arg "cust". All callers updated. Simplify, call prepare_for_building. Re-initialize buildsym_compunit. (reset_symtab_globals): Enhance function comment. Set local_symbols, file_symbols, global_symbols to NULL. Set pending_macros to NULL. Simplify resetting pending_addrmap. Call free_buildysym_compunit. (end_symtab_without_blockvector): Delete. All callers updated. (end_symtab_with_blockvector): Remove redundant call to free_buildsym_compunit. (augment_type_symtab): Remove arg "cust". All callers updated. (buildsym_init): Remove resetting of free_pendings, file_symbols, global_symbols, pending_blocks, pending_macros. Instead make handling consistent with pending_addrmap: Assert value was reset at end of previous symtab building. Initialize context_stack here.
2014-12-16boards/stabs.exp: New file.Doug Evans2-0/+49
gdb/ChangeLog: * boards/stabs.exp: New file.
2014-12-16cp_lookup_symbol_via_imports: Renamed from cp_lookup_symbol_imports.Doug Evans2-13/+18
gdb/ChangeLog: * cp-namespace.c (cp_lookup_symbol_via_imports): Renamed from cp_lookup_symbol_imports. All callers updated.
2014-12-16cp_find_type_baseclass_by_name: Renamed from find_type_baseclass_by_name.Doug Evans4-6/+11
gdb/ChangeLog: * cp-namespace.c (cp_find_type_baseclass_by_name): Renamed from find_type_baseclass_by_name. All callers updated.
2014-12-16symtab.h (struct symbol_search) <symtab>: Delete, unnecessary.Doug Evans3-12/+17
gdb/ChangeLog: * symtab.h (struct symbol_search) <symtab>: Delete. All uses updated. * symtab.c (compare_search_syms): Use SYMBOL_SYMTAB accessor. (print_symbol_info): Delete arg symtab. All callers updated. (symtab_symbol_info): Use SYMBOL_SYMTAB accessor.
2014-12-17Automatic date update in version.inGDB Administrator1-1/+1
2014-12-16Fix internal error in gold when -Map and --compress-debug-sections are usedCary Coutant2-4/+21
together. gold/ * mapfile.cc (Mapfile::print_input_section): Print uncompressed sizes. (Mapfile::print_output_data): Use current_data_size() to avoid assert for sections requiring postprocessing; if address is not valid, print 0. (Mapfile::print_output_section): Use current_data_size(); print note that addresses and sizes are before compression.
2014-12-16Fix octeon3 testsuite falloutMatthew Fortune7-6/+15
gas/testsuite/ * gas/mips/attr-gnu-4-5.d: Ignore ASEs. * gas/mips/attr-gnu-4-6.d: Likewise. * gas/mips/attr-gnu-4-7.d: Likewise. * gas/mips/attr-none-o32-fp64-nooddspreg.d: Likewise. * gas/mips/attr-none-o32-fp64.d: Likewise. * gas/mips/attr-none-o32-fpxx.d: Likewise.