summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Properly place the NULL STT_FILE symbolusers/hjl/pr17975H.J. Lu2015-02-1519-75/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We output a NULL STT_FILE symbol for forced local symbols so that they are not associated with the STT_FILE symbol for real local symbols. This patch makes sure that the NULL STT_FILE symbol is placed before forced local symbols. bfd/ PR ld/17975 * elflink.c (elf_link_output_extsym): Only check filesym_count when outputting a NULL FILE symbol. Set second_pass_sym to h->forced_local && !h->root.linker_def. ld/testsuite/ PR ld/17975 * ld-i386/tlsbin-nacl.rd: Likewise. * ld-i386/tlsbin.rd: Likewise. * ld-i386/tlsbindesc-nacl.rd: Likewise. * ld-i386/tlsbindesc.rd: Likewise. * ld-i386/tlsdesc-nacl.rd: Likewise. * ld-i386/tlsdesc.rd: Likewise. * ld-i386/tlsnopic-nacl.rd: Likewise. * ld-i386/tlsnopic.rd: Likewise. * ld-i386/tlspic-nacl.rd: Likewise. * ld-i386/tlspic.rd: Likewise. * ld-x86-64/tlsbin-nacl.rd: Likewise. * ld-x86-64/tlsbin.rd: Likewise. * ld-x86-64/tlsbindesc-nacl.rd: Likewise. * ld-x86-64/tlsbindesc.rd: Likewise. * ld-x86-64/tlsdesc-nacl.rd: Likewise. * ld-x86-64/tlsdesc.rd: Likewise. * ld-x86-64/tlspic-nacl.rd: Likewise. * ld-x86-64/tlspic.rd: Likewise.
* Set root.linker_def on _TLS_MODULE_BASE_H.J. Lu2015-02-153-0/+8
| | | | | | * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def on _TLS_MODULE_BASE_. * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
* This fixes a bug I introduced to the PDP11 target when I was trying to fix ↵Nick Clifton2015-02-151-1/+6
| | | | | | | an illegal memory access problem. * pdp11.c (aout_get_external_symbols): Return TRUE if there are no symbols - just set the count to zero.
* fix dbb3fbbb dwarf2.c breakageAlan Modra2015-02-152-12/+17
| | | | | | | | m68hc11-elf +FAIL: 68HC12 indexed addressing mode with 5, 9 and 16-bit offsets (indexed12) m68hc12-elf +FAIL: 68HC12 indexed addressing mode with 5, 9 and 16-bit offsets (indexed12) * dwarf2.c (read_rangelist): Correct buffer overflow check Whitespace throughout file.
* Automatic date update in version.inGDB Administrator2015-02-151-1/+1
|
* Add a testcase for PR ld/17973H.J. Lu2015-02-146-2/+39
| | | | | | | | | | | | | | | | | | | ld/ PR ld/17973 * testplug2.c (allsymbolsread_silent): New. (set_register_hook): Handle allsymbolsreadsilent. (onall_symbols_read): Skip a message if allsymbolsread_silent is TRUE. ld/testsuite/ PR ld/17973 * ld-plugin/plugin.exp (regassilent): New. Compile tmpdir/dummy.s and ld-plugin/pr17973.s. (plugin_tests): Add a test for PR ld/17973. * ld-plugin/pr17973.d: New file. * ld-plugin/pr17973.s: Likewise.
* PR ld/17973 LTO file symsAlan Modra2015-02-1414-48/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LTO output objects have an STT_FILE symbol using the name of the file, a temporary file. This results in executables that can't be exactly reproduced, so the file name needs to be dropped. We don't want to lose all file symbols when linking a mix of lto and non-lto objects as a file symbol can be used to figure which source file generated a given local symbol. So lto output objects need to be marked. I chose to mark lto output objects with a new bfd flag. This flag is also used to fix a bug in the link-once handling; An object being loaded after "loading_lto_outputs" is set might be one extracted from an archive to satisfy new references from lto objects, not an lto object itself. The new flag is copied from archive to elements, and the same done for no_export. This fixes a bug in that --exclude-libs doesn't work with thin archives. I'm not completely happy with this part of the patch and may revist this to avoid the hack in _bfd_look_for_bfd_in_cache. PR ld/17973 include/ * bfdlink.h (struct bfd_link_info): Delete loading_lto_outputs. bfd/ * bfd.c (struct bfd): Add lto_output. * linker.c (_bfd_handle_already_linked): Explicitly test for objects added by the lto plugin. * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and no_export flags from archive. * archive.c (open_nested_file): New function, setting lto_output and no_export, extracted from.. (find_nested_archive): ..here. Flip params. Rename from _bfd_find_nested_archive. (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file. (_bfd_look_for_bfd_in_cache): Copy no_export. * elflink.c (elf_link_add_object_symbols): Remove now unnecessary my_archive->no_export test. (elf_link_input_bfd): Drop existing lto_output STT_FILE syms. Don't use the file name when adding lto_output STT_FILE sym. * bfd-in2.h: Regenerate. ld/ * ldlang.h (struct lang_input_statement_flags): Add lto_output. * ldlang.c (lang_process): Don't set loading_lto_outputs. * ldfile.c (ldfile_try_open_bfd): Transfer entry flags.lto_output to bfd. * plugin.c (add_input_file, add_input_library): Set flags.lto_output.
* Automatic date update in version.inGDB Administrator2015-02-141-1/+1
|
* misc cp-namespace.c cleanupsDoug Evans2015-02-132-9/+19
| | | | | | | | | | | | | gdb/ChangeLog: * cp-namespace.c (cp_basic_lookup_symbol): Rename parameter anonymous_namespace to is_in_anonymous for consistency with the rest of the file. (cp_lookup_bare_symbol): Fix typo in comment. (cp_search_static_and_baseclasses): Ditto. (search_symbol_list): Use vertical space in comment better. (reset_directive_searched): Ditto. Fix typo. (cp_lookup_nested_symbol_1): Clarify contents of NESTED_NAME parameter.
* sim/common/gentmap.c: Include "string.h".Chen Gang2015-02-142-0/+5
| | | | | | | | | | | | | | The related warnings: gcc ../../../binutils-gdb/sim/mcore/../common/gentmap.c -o gentmap -g -O -I. -I../../../binutils-gdb/sim/mcore -I../common -I../../../binutils-gdb/sim/mcore/../common -I../../include -I../../../binutils-gdb/sim/mcore/../../include -I../../bfd -I../../../binutils-gdb/sim/mcore/../../bfd -I../../opcodes -I../../../binutils-gdb/sim/mcore/../../opcodes ../../../binutils-gdb/sim/mcore/../common/gentmap.c: In function ‘main’: ../../../binutils-gdb/sim/mcore/../common/gentmap.c:119:7: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration] if (strcmp (argv[1], "-h") == 0) ^ 2015-02-13 Chen Gang <gang.chen.5i5j@gmail.com> * gentmap.c: Include "string.h".
* Mention support for LLVM plugin in NEWSH.J. Lu2015-02-132-0/+6
| | | | * NEWS: Mention support for LLVM plugin.
* Fixes for memory access violations triggered by running readelf on fuzzed ↵Nick Clifton2015-02-132-2/+21
| | | | | | | | | | binaries. PR binutils/17531 * dwarf.c (display_debug_aranges): Add check for an excessive ar_length value. (process_cu_tu_index): Check for a row * columns sum being too large.
* Fix illegal memory access errors triggered by running srconv on fuzzed binaries.Nick Clifton2015-02-133-5/+17
| | | | | | | | | | PR binutils/17512 * dwarf.c (read_leb128): Fix test for shift becoming too large. * coffgrok.c (do_define): Add check for type size overflow. * srconv.c (walk_tree_sfile): Check that enough sections are available before parsing. (prescan): Likewise.
* Fix mistake in recent code to check for an unterminated leb128 number.Nick Clifton2015-02-132-2/+7
| | | | * dwarf.c (read_leb128): Fix test for shift becoming too large.
* Update Yao Qi's email address in MAINTAINERSYao Qi2015-02-132-1/+5
| | | | | | gdb: * MAINTAINERS: Update my email address.
* binutils/dwarf.c white spaceAlan Modra2015-02-132-305/+311
| | | | | | | The style fix here is for num_units * sizeof * debug_information. * dwarf.c: Formatting, whitespace. (process_debug_info): Style fix.
* Correct ld.texinfo cross referenceAlan Modra2015-02-132-4/+7
| | | | | | | Fixes warning: @pxref cross-reference name should not contain `:' * ld.texinfo (Options <--defsym>): Correct cross reference.
* PowerPC64 offset check should test entire 64-bit value is in sectionAlan Modra2015-02-132-2/+7
| | | | | | PR binutils/17512 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove now redundant assert.
* Automatic date update in version.inGDB Administrator2015-02-131-1/+1
|
* Add missing TLSLE relocations for gold aarch64 backend.Jing Yu2015-02-123-5/+52
| | | | | | | | | | | | | gold/ChangeLog: * aarch64-reloc.def (TLSLE_MOVW_TPREL_G2, TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC, TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC,): New relocation. * aarch64.cc (Target_aarch64::Scan::local): Add cases for new TLSLE_MOVW_* relocations. (Target_aarch64::Scan::global): Likewise. (Target_aarch64::Relocate::relocate): Likewise. (Target_aarch64::Relocate::relocate_tls): Add cases and handlings for new TLSLE_MOVW_* relocations.
* completer.c (completion_list_add_name): Fix memory leak.Doug Evans2015-02-122-0/+5
| | | | | | gdb/ChangeLog: * completer.c (completion_list_add_name): Fix memory leak.
* Fix documentation of the QTDV packetDavid Taylor2015-02-122-2/+12
| | | | | | | | gdb/doc/ChangeLog 2015-02-12 David Taylor <dtaylor@emc.com> * gdb.texinfo (Tracepoint Packets): Document the builtin and name fields of the QTDV packet.
* completer.c (complete_line): Remove incorrect comment.Doug Evans2015-02-122-8/+5
| | | | | | gdb/ChangeLog: * completer.c (complete_line): Remove incorrect comment.
* Fix memory access violations triggered by running addr2line on fuzzed binaries.Nick Clifton2015-02-124-134/+308
| | | | | | | | | | | | | | | | | | | | | PR binutils/17512 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes) (read_4_bytes, read_8_bytes, read_n_bytes, read_string) (read_indirect_string, read_alt_indirect_string) (read_alt_indirect_ref, read_address, read_abbrevs) (read_attribute_value, read_attribute, decode_line_info) (find_abstract_instance_name, read_rangelist) (scan_unit_for_symbols, parse_comp_unit) (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass end pointers to reading functions and check for offsets taking pointers out of range. Replace calls to read_*_leb128 with calls to safe_read_leb128. (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge offset. * syms.c (_bfd_stab_section_find_nearest_line): Add checks for computed file_name address being before the start of the string table.
* oops - changelog entry accidentally omitted from previous delta.Nick Clifton2015-02-121-0/+8
|
* Replace elf_i386 with elf_i386_nacl for naclH.J. Lu2015-02-122-1/+5
| | | | * ld-i386/i386.exp: Replace elf_i386 with elf_i386_nacl for nacl.
* Automatic date update in version.inGDB Administrator2015-02-121-1/+1
|
* Add --[no-]map-whole-files for gold compatibilityH.J. Lu2015-02-112-0/+11
| | | | | | | | | | | | | Gold supports: --map-whole-files Map whole files to memory (default on 64-bit hosts) --no-map-whole-files Map relevant file parts to memory (default on 32-bit hosts) This patch adds --[no-]map-whole-files command line options for gold compatibility. They are ignored for ld. * lexsup.c (ld_options): Add --[no-]map-whole-files for gold option compatibility.
* Output "warning:" or "error:" in plugin messagesH.J. Lu2015-02-118-5/+47
| | | | | | | | | | | | | | | | | | | | When plugin generates LDPL_WARNING, LDPL_FATAL and LDPL_ERROR messages, linker should display "warning:" or "error:" in plugin messages like regular linker messages. ld/ * plugin.c (message): Output "warning:" for LDPL_WARNING. Output "error:" for LDPL_FATAL and LDPL_ERROR. * testplug2.c (parse_option): Handle fatal, error and warning. ld/testsuite/ * ld-plugin/plugin-27.d: New. * ld-plugin/plugin-28.d: Likewise. * ld-plugin/plugin-29.d: Likewise. * plugin.exp (plugin_tests): Add tests for LDPL_FATAL, LDPL_ERROR and LDPL_WARNING.
* Remove unused dump_tv_tagH.J. Lu2015-02-113-98/+11
| | | | | | | | * testplug2.c (dump_tv_tag): Removed. (onall_symbols_read): Return LDPS_ERR if the file descriptor isn't closed. * testplug3.c (dump_tv_tag): Removed. (onclaim_file): Fix typo.
* Fixes a problem with the RL78 disassembler which would incorrectly ↵Nick Clifton2015-02-113-93/+93
| | | | | | | | | | disassemble [HL+0] as [HL]. * rl78-decode.opc: Add 'a' attribute to instructions that support [HL+0] addressing. * rl78-decode.c: Regenerate. * rl78-dis.c (print_insn_rl78): Display the offset in [HL+0] addresses.
* [AArch64] Fix code formatting in the cpu-tableJiong Wang2015-02-112-6/+10
| | | | | | 2015-02-11 Matthew Wahab <matthew.wahab@arm.com> * config/tc-aarch64.c (aarch64_cpus): Fix code formatting.
* framefilter quit: New testJan Kratochvil2015-02-112-0/+17
| | | | | | | | | | It definitely does not test all the RETURN_MASK_ERROR cases. But it tests at least two of them. gdb/testsuite/ChangeLog 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.python/py-framefilter.exp (pagination quit - *): New tests.
* framefilter quit: Use RETURN_MASK_ERRORJan Kratochvil2015-02-112-13/+18
| | | | | | | | | | | Now when the code is exception safe we can let RETURN_QUIT to pass through as all the installed cleanups with handle that. gdb/ChangeLog 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * python/py-framefilter.c (py_print_single_arg, enumerate_locals) (py_print_frame): Use RETURN_MASK_ERROR.
* sim/mcore/interp.c: Include "unistd.h".Chen Gang2015-02-112-0/+5
| | | | | | | | | | | | | | | | | The related warnings: gcc -DHAVE_CONFIG_H -DPROFILE=1 -DWITH_PROFILE=-1 -DDEFAULT_INLINE=0 -I. -I../../../binutils-gdb/sim/mcore -I../common -I../../../binutils-gdb/sim/mcore/../common -I../../include -I../../../binutils-gdb/sim/mcore/../../include -I../../bfd -I../../../binutils-gdb/sim/mcore/../../bfd -I../../opcodes -I../../../binutils-gdb/sim/mcore/../../opcodes -g -O2 -c -o interp.o -MT interp.o -MMD -MP -MF .deps/interp.Tpo ../../../binutils-gdb/sim/mcore/interp.c ../../../binutils-gdb/sim/mcore/interp.c: In function ‘handle_trap1’: ../../../binutils-gdb/sim/mcore/interp.c:559:22: warning: implicit declaration of function ‘link’ [-Wimplicit-function-declaration] cpu.gr[RET1] = link ((char *) a[0], (char *) a[1]); ^ ../../../binutils-gdb/sim/mcore/interp.c:585:22: warning: implicit declaration of function ‘access’ [-Wimplicit-function-declaration] cpu.gr[RET1] = access ((char *) a[0], a[1]); ^ 2015-02-11 Chen Gang <gang.chen.5i5j@gmail.com> * interp.c: Include "unistd.h".
* framefilter quit: Make it exception safeJan Kratochvil2015-02-112-33/+35
| | | | | | | | | | gdb/ChangeLog 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * python/py-framefilter.c (py_print_frame): Mention RETURN_QUIT in function comment. Wrap all function that can throw in cleanups. (gdbpy_apply_frame_filter): Wrap all function that can throw in cleanups.
* framefilter quit: Code cleanup: Avoid gotosJan Kratochvil2015-02-112-29/+79
| | | | | | | | | | | | | | | | | | | | | | | | goto error patters are sometimes AFAIK used in C for the cases like: int retval=-1; if (!(a=malloc())) goto error; if (!(b=malloc())) goto error_a; if (!(c=malloc())) goto error_b; retval=0; error_c: free(c); error_b: free(b); error_a: free(a); error: return retval; But here there is single error label with one do_cleanups() which I do not find it worth the goto complication. Without goto one can then furher merge code in the exit paths in the next patches and ... after all it is all the same, just without a goto. gdb/ChangeLog 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * python/py-framefilter.c (py_print_frame): Substitute goto error. Remove the error label.
* framefilter quit: Code cleanup: ReindentationJan Kratochvil2015-02-112-133/+132
| | | | | | | | | | | Nothing significant but I find code more clear with less deep indentation. gdb/ChangeLog 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * python/py-framefilter.c (py_print_frame): Put conditional code paths with goto first, indent the former else codepath left. Put variable 'elided' to a new inner block.
* framefilter quit: Obvious whitespacing fixesJan Kratochvil2015-02-112-15/+17
| | | | | | | gdb/ChangeLog 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * python/py-framefilter.c (py_print_frame): Whitespacing fixes.
* Add ChangeLogs for 439b7f41bH.J. Lu2015-02-112-0/+47
|
* Add ChangeLogs for commit 5ae0078cdH.J. Lu2015-02-112-0/+37
|
* Fixes for invalid memory accesses triggered by running readelf on fuzzed ↵Nick Clifton2015-02-112-15/+38
| | | | | | | | | | | binaries. PR binutils/17531 * dwarf.c (display_debug_pubnames_worker): Work around compiler bug checking address ranges. (display_debug_frames): Likewise. (display_gdb_index): Likewise. (process_cu_tu_index): Add range check on the ncols value.
* Add tests for non-object IR fileH.J. Lu2015-02-1120-3/+1873
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds linker, nm and ar tests for non-object IR file, including archive with non-object IR member. ld/ PR ld/17878 * Makefile.am (noinst_LTLIBRARIES): Add libldtestplug2.la and libldtestplug3.la. (libldtestplug2_la_SOURCES): New. (libldtestplug2_la_CFLAGS): Likewise. (libldtestplug2_la_LDFLAGS): Likewise. (libldtestplug3_la_SOURCES): New. (libldtestplug3_la_CFLAGS): Likewise. (libldtestplug3_la_LDFLAGS): Likewise. * Makefile.in: Regenerated. * testplug2.c: New file. * testplug3.c: Likewise. ld/testsuite/ PR ld/17878 * ld-plugin/func.c: Add some comments. * ld-plugin/plugin-13.d: New file. * ld-plugin/plugin-14.d: Likewise. * ld-plugin/plugin-15.d: Likewise. * ld-plugin/plugin-16.d: Likewise. * ld-plugin/plugin-17.d: Likewise. * ld-plugin/plugin-18.d: Likewise. * ld-plugin/plugin-19.d: Likewise. * ld-plugin/plugin-20.d: Likewise. * ld-plugin/plugin-21.d: Likewise. * ld-plugin/plugin-22.d: Likewise. * ld-plugin/plugin-23.d: Likewise. * ld-plugin/plugin-24.d: Likewise. * ld-plugin/plugin-25.d: Likewise. * ld-plugin/plugin-26.d: Likewise. * ld-plugin/plugin.exp (plugin2_name): New. (plugin3_name): Likewise. (plugin2_path): Likewise. (plugin3_path): Likewise. (testsrcfiles): Likewise. (testsrcfiles_notext): Likewise. (plugin_tests): Add tests for non-object IR file. (plugin_lib_tests): Likewise. (plugin_extra_elf_tests): Likewise. (plugin_src_tests): New tests for non-object IR file. Run nm --plugin test. Run ar --plugin test. Run plugin_src_tests.
* Merge linker plugin handling into BFD plugin supportH.J. Lu2015-02-115-39/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linker plugin_maybe_claim is the interface of linker plugin support. This patch extracts linker plugin_maybe_claim into plugin_object_p and makes it available to BFD via a new function: void register_ld_plugin_object_p (const bfd_target *(*) (bfd *)); bfd_plugin_object_p calls plugin_object_p registered by linker first. It adds an enum bfd_plugin_format field and a pointer to plugin dummy BFD so that plugin_object_p stores plugin dummy BFD to allow plugin_maybe_claim to retrieve it later. bfd/ PR ld/17878 * bfd.c (bfd_plugin_format): New. (bfd): Add plugin_format and plugin_dummy_bfd. * plugin.c (try_load_plugin): Take a pointer to bfd_boolean argument to return TRUE if any plugin is found. Set plugin_format. (has_plugin): New. (bfd_plugin_target_p): New. (bfd_plugin_specified_p): Likewise. (bfd_plugin_target_p): Likewise. (register_ld_plugin_object_p): Likewise. (bfd_plugin_set_plugin): Set has_plugin. (load_plugin): Cache try_load_plugin result. (bfd_plugin_object_p): Try ld_plugin_object_p first. Check plugin_format. * plugin.h (bfd_plugin_target_p): New. (bfd_plugin_specified_p): Likewise. (register_ld_plugin_object_p): Likewise. * bfd-in2.h: Regenerated. ld/ PR ld/17878 * plugin.c: Include ../bfd/plugin.h. (plugin_get_ir_dummy_bfd): Call bfd_create with link_info.output_bfd instead of srctemplate. Copy BFD info from srctemplate only if it doesn't use BFD plugin target vector. (plugin_load_plugins): Call register_ld_plugin_object_p with (plugin_object_p) (plugin_maybe_claim): Renamed to ... (plugin_object_p): This. Return dummy BFD target vector if input is calimed by plugin library, otherwise return NULL. Update plugin_format and plugin_dummy_bfd. (plugin_maybe_claim): New. Use plugin_object_p. xx
* xcoffread.c: delete 'within_function' definitionPedro Alves2015-02-112-5/+4
| | | | | | | | | | | Linking GDB as a C++ program, we get: src/gdb/buildsym.c:226: multiple definition of `within_function' xcoffread.o:src/gdb/xcoffread.c:181: first defined here gdb/ 2015-02-11 Pedro Alves <palves@redhat.com> * xcoffread.c (within_function): Delete.
* Fix redefinition errors in C++ modeTom Tromey2015-02-1132-101/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In C, we can forward declare static structure instances. That doesn't work in C++ though. C++ treats these as definitions. So then the compiler complains about symbol redefinition, like: src/gdb/elfread.c:1569:29: error: redefinition of ‘const sym_fns elf_sym_fns_lazy_psyms’ src/gdb/elfread.c:53:29: error: ‘const sym_fns elf_sym_fns_lazy_psyms’ previously declared here The intent of static here is naturally to avoid making these objects visible outside the compilation unit. The equivalent in C++ would be to instead define the objects in the anonymous namespace. But given that it's desirable to leave the codebase compiling as both C and C++ for a while, this just makes the objects extern. (base_breakpoint_ops is already declared in breakpoint.h, so we can just remove the forward declare from breakpoint.c) gdb/ChangeLog: 2015-02-11 Tom Tromey <tromey@redhat.com> Pedro Alves <palves@redhat.com> * breakpoint.c (base_breakpoint_ops): Delete. * dwarf2loc.c (dwarf_expr_ctx_funcs): Make extern. * elfread.c (elf_sym_fns_gdb_index, elf_sym_fns_lazy_psyms): Make extern. * guile/guile.c (guile_extension_script_ops, guile_extension_ops): Make extern. * ppcnbsd-tdep.c (ppcnbsd2_sigtramp): Make extern. * python/py-arch.c (arch_object_type): Make extern. * python/py-block.c (block_syms_iterator_object_type): Make extern. * python/py-bpevent.c (breakpoint_event_object_type): Make extern. * python/py-cmd.c (cmdpy_object_type): Make extern. * python/py-continueevent.c (continue_event_object_type) * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove 'qual' parameter. Update all callers. * python/py-evtregistry.c (eventregistry_object_type): Make extern. * python/py-exitedevent.c (exited_event_object_type): Make extern. * python/py-finishbreakpoint.c (finish_breakpoint_object_type): Make extern. * python/py-function.c (fnpy_object_type): Make extern. * python/py-inferior.c (inferior_object_type, membuf_object_type): Make extern. * python/py-infevents.c (call_pre_event_object_type) (inferior_call_post_event_object_type). (memory_changed_event_object_type): Make extern. * python/py-infthread.c (thread_object_type): Make extern. * python/py-lazy-string.c (lazy_string_object_type): Make extern. * python/py-linetable.c (linetable_entry_object_type) (linetable_object_type, ltpy_iterator_object_type): Make extern. * python/py-newobjfileevent.c (new_objfile_event_object_type) (clear_objfiles_event_object_type): Make extern. * python/py-objfile.c (objfile_object_type): Make extern. * python/py-param.c (parmpy_object_type): Make extern. * python/py-progspace.c (pspace_object_type): Make extern. * python/py-signalevent.c (signal_event_object_type): Make extern. * python/py-symtab.c (symtab_object_type, sal_object_type): Make extern. * python/py-type.c (type_object_type, field_object_type) (type_iterator_object_type): Make extern. * python/python.c (python_extension_script_ops) (python_extension_ops): Make extern. * stap-probe.c (stap_probe_ops): Make extern.
* [ARM] Add support for Cortex-A72Jiong Wang2015-02-112-0/+6
| | | | | | 2015-02-11 Matthew Wahab <matthew.wahab@arm.com> * config/tc-arm.c: Add support for Cortex-A72.
* Wrap BFD headers in extern "C"Pedro Alves2015-02-1111-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | These were the BFD changes needed for building a C++ GDB with --enable-targets=all, on x86_64 Fedora 20. For libbfd.h and libcoff.h, this does same as already done when generating bfd.h: open extern "C" in the -in.h header, and close it from the Makefile. bfd/doc/ChangeLog: 2015-02-11 Pedro Alves <palves@redhat.com> * Makefile.am (libbfd.h, libcoff.h): Close extern "C" scope. * Makefile.in: Regenerate. bfd/ChangeLog: 2015-02-11 Pedro Alves <palves@redhat.com> * libbfd-in.h [__cplusplus]: Open extern "C" scope. * libcoff-in.h [__cplusplus]: Open extern "C" scope. * libbfd.h: Regenerate. * libcoff.h: Regenerate. * elf-bfd.h [__cplusplus]: Wrap in extern "C". * mach-o.h [__cplusplus]: Wrap in extern "C". * som.h [__cplusplus]: Wrap in extern "C".
* Fix adjust_pc_after_break, remove still current thread checkPedro Alves2015-02-115-2/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On decr_pc_after_break targets, GDB adjusts the PC incorrectly if a background single-step stops somewhere where PC-$decr_pc has a breakpoint, and the thread that finishes the step is not the current thread, like: ADDR1 nop <-- breakpoint here ADDR2 jmp PC IOW, say thread A is stepping ADDR2's line in the background (an infinite loop), and the user switches focus to thread B. GDB's adjust_pc_after_break logic confuses the single-step stop of thread A for a hit of the breakpoint at ADDR1, and thus adjusts thread A's PC to point at ADDR1 when it should not, and reports a breakpoint hit, when thread A did not execute the instruction at ADDR1 at all. The test added by this patch exercises exactly that. I can't find any reason we'd need the "thread to be examined is still the current thread" condition in adjust_pc_after_break, at least nowadays; it might have made sense in the past. Best just remove it, and rely on currently_stepping(). Here's the test's log of a run with an unpatched GDB: 35 while (1); (gdb) PASS: gdb.threads/step-bg-decr-pc-switch-thread.exp: next over nop next& (gdb) PASS: gdb.threads/step-bg-decr-pc-switch-thread.exp: next& over inf loop thread 1 [Switching to thread 1 (Thread 0x7ffff7fc2740 (LWP 29027))](running) (gdb) PASS: gdb.threads/step-bg-decr-pc-switch-thread.exp: switch to main thread Breakpoint 2, thread_function (arg=0x0) at ...src/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.c:34 34 NOP; /* set breakpoint here */ FAIL: gdb.threads/step-bg-decr-pc-switch-thread.exp: no output while stepping gdb/ChangeLog: 2015-02-11 Pedro Alves <pedro@codesourcery.com> * infrun.c (adjust_pc_after_break): Don't adjust the PC just because the event thread is not the current thread. gdb/testsuite/ChangeLog: 2015-02-11 Pedro Alves <pedro@codesourcery.com> * gdb.threads/step-bg-decr-pc-switch-thread.c: New file. * gdb.threads/step-bg-decr-pc-switch-thread.exp: New file.
* gold/arm.cc: Output mapping symbol for PLT codeWill Newton2015-02-112-0/+13
| | | | | | | | | | | | | | Output an ARM state mapping symbol at the start of the PLT. With the current code objdump will fail to disassemble the PLT that gold creates. gold/ChangeLog: 2015-02-11 Will Newton <will.newton@linaro.org> PR gold/13321 * arm.cc (Target_arm::make_plt_section): Create an ARM state mapping symbol at the start of the PLT.