aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-02-11Support -plugin-opt=disable-outputusers/hjl/pr17878H.J. Lu4-0/+48
LLVM plugin uses --plugin-opt=disable-output to disable output. all_symbols_read_hook() calls exit() to disable output when --plugin-opt=disable-output is passed to LLVM plugin. This patch registers plugin_cleanup() with atexit(), which removes output file if --plugin-opt=disable-output is used. PR ld/17878 * configure.ac: Check if atexit exists. * config.in: Regenerated. * configure: Likewise. * plugin.c (plugin_t): Add disable_output. (plugin_opt_plugin_arg): Set disable_output for disable-output. (plugin_cleanup): New. (plugin_load_plugins): Register plugin_cleanup() with atexit().
2015-02-11Add --[no-]map-whole-files for gold compatibilityH.J. Lu2-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.
2015-02-11Output "warning:" or "error:" in plugin messagesH.J. Lu8-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.
2015-02-11Remove unused dump_tv_tagH.J. Lu3-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.
2015-02-11Fixes a problem with the RL78 disassembler which would incorrectly ↵Nick Clifton3-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.
2015-02-11[AArch64] Fix code formatting in the cpu-tableJiong Wang2-6/+10
2015-02-11 Matthew Wahab <matthew.wahab@arm.com> * config/tc-aarch64.c (aarch64_cpus): Fix code formatting.
2015-02-11framefilter quit: New testJan Kratochvil2-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.
2015-02-11framefilter quit: Use RETURN_MASK_ERRORJan Kratochvil2-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.
2015-02-11sim/mcore/interp.c: Include "unistd.h".Chen Gang2-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".
2015-02-11framefilter quit: Make it exception safeJan Kratochvil2-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.
2015-02-11framefilter quit: Code cleanup: Avoid gotosJan Kratochvil2-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.
2015-02-11framefilter quit: Code cleanup: ReindentationJan Kratochvil2-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.
2015-02-11framefilter quit: Obvious whitespacing fixesJan Kratochvil2-15/+17
gdb/ChangeLog 2015-02-11 Jan Kratochvil <jan.kratochvil@redhat.com> * python/py-framefilter.c (py_print_frame): Whitespacing fixes.
2015-02-11Add ChangeLogs for 439b7f41bH.J. Lu2-0/+47
2015-02-11Add ChangeLogs for commit 5ae0078cdH.J. Lu2-0/+37
2015-02-11Fixes for invalid memory accesses triggered by running readelf on fuzzed ↵Nick Clifton2-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.
2015-02-11Add tests for non-object IR fileH.J. Lu20-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.
2015-02-11Merge linker plugin handling into BFD plugin supportH.J. Lu5-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
2015-02-11xcoffread.c: delete 'within_function' definitionPedro Alves2-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.
2015-02-11Fix redefinition errors in C++ modeTom Tromey32-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.
2015-02-11[ARM] Add support for Cortex-A72Jiong Wang2-0/+6
2015-02-11 Matthew Wahab <matthew.wahab@arm.com> * config/tc-arm.c: Add support for Cortex-A72.
2015-02-11Wrap BFD headers in extern "C"Pedro Alves11-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".
2015-02-11Fix adjust_pc_after_break, remove still current thread checkPedro Alves5-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.
2015-02-11gold/arm.cc: Output mapping symbol for PLT codeWill Newton2-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.
2015-02-10lib/gdb.exp (gdb_load): Always return a result.Doug Evans2-0/+6
gdb/testsuite/ChangeLog: * lib/gdb.exp (gdb_load): Always return a result.
2015-02-10internal_type_self_type: Handle TYPE_SPECIFIC_NONE.Doug Evans2-0/+9
gdb/ChangeLog: * gdbtypes.c (internal_type_self_type): If TYPE_SPECIFIC_FIELD hasn't been initialized yet, return NULL.
2015-02-10Initialize use_mmapH.J. Lu2-0/+5
* plugin.c (plugin_maybe_claim): Initialize use_mmap.
2015-02-10Unmap the buffer if plugin didn't claim the fileH.J. Lu2-12/+50
If plugin didn't claim the file, unmap the buffer. * plugin.c (plugin_input_file_t): Add use_mmap. (plugin_pagesize): New. (get_view): Use plugin_pagesize. Set use_mmap if mmap is used. (plugin_load_plugins): Initialize plugin_pagesize. (plugin_maybe_claim): Unmap the buffer if plugin didn't claim the file.
2015-02-10Rename new_symfile_objfile, make static.Doug Evans3-5/+9
gdb/ChangeLog: * symfile.h (new_symfile_objfile): Delete. * symfile.c (finish_new_objfile): Renamed from new_symfile_objfile. All callers updated.
2015-02-10Fix a pair of screen-resizing issues in TUIPatrick Palka3-0/+15
This patch fixes a pair of TUI issues related to screen resizing: 1. In tui_handle_resize_during_io(), when the TUI screen gets resized, we fail to update GDB's idea about the height of the output window. You can see this bug by doing: a. Enter TUI mode. b. "show height" c. Resize the terminal. d. "show height" And observe that despite resizing the terminal, the reported height remains unchanged. Note that a similar issue exists in the CLI. The fix for this is simple: call tui_update_gdb_sizes() after performing a resize, so that the "height" variable remains consistent with the height of TUI's output window. 2. In tui_enable(), the call to tui_update_gdb_sizes() may clobber readline's idea of the actual screen dimensions, and a subsequent pending resize will use bogus terminal dimensions. You can see this bug by doing: a. Enter TUI mode. b. Exit TUI mode. c. Resize the terminal. d. Enter TUI mode. e. Press a key to resize the screen. And observe that the terminal gets incorrectly resized to the wrong dimensions. To fix this issue, we should oppurtunistically resize the screen in tui_enable(). That way we eliminate the possibility of a pending resize triggering right after we call tui_update_gdb_sizes(). gdb/ChangeLog: * tui/tui-io.c (tui_handle_resize_during_io): Call tui_update_gdb_sizes() after resizing the screen. * tui/tui.c (tui_enable): Resize the terminal before calling tui_update_gdb_sizes().
2015-02-10Fix truncation of TUI command historyPatrick Palka2-4/+16
If we submit a command while the prompt cursor is somewhere other than at the end of the command line, the command line gets truncated as the command window gets shifted one line up. This happens because we fail to properly move the cursor to the end of the command line before transmitting the newline to ncurses. We need to move the cursor because when ncurses outputs a newline it truncates any text that appears past the end of the cursor. The fix is generic enough to work properly even in multi-line secondary prompts like the quit prompt. gdb/ChangeLog: * tui/tui-io.c (tui_getc): Move cursor to the end of the command line before printing a newline.
2015-02-11Automatic date update in version.inGDB Administrator1-1/+1
2015-02-11gdb producer_is_gcc fix bool return value.Mark Wielaard2-2/+6
gdb/ChangeLog: * utils.c (producer_is_gcc): Return true or false.
2015-02-10Change producer_is_gcc function return type to bool.Mark Wielaard4-10/+29
gdb/ChangeLog: * utils.h (producer_is_gcc): Change return type to bool. Add major argument. * utils.c (producer_is_gcc): Likewise. (producer_is_gcc_ge_4): Adjust producer_is_gcc call. * dwarf2read.c (check_producer): Likewise.
2015-02-10Add "signal SIGTRAP" testPedro Alves3-0/+118
Some local changes I was working on related to SIGTRAP handling resulted in "signal SIGTRAP" no longer passing the SIGTRAP to the inferior. Surprisingly, only annota1.exp catches this. This commit adds a test that doesn't rely on annotations, so that at the point annotations are finaly dropped, we still have this use case covered ... This is a multi-threaded test to also exercise the case of first needing to do a step-over before delivering the signal. Tested on x86_64 Fedora 20, native, remote/extended-remote gdbserver. gdb/testsuite/ 2015-02-10 Pedro Alves <palves@redhat.com> * gdb.threads/signal-sigtrap.c: New file. * gdb.threads/signal-sigtrap.exp: New file.
2015-02-10displaced_step_fixup may access memory from the wrong inferior/threadPedro Alves2-0/+9
displaced_step_fixup takes an thread to work with, as argument. OTOH, gdbarch_displaced_step_fixup fixes up the current thread. The former calls the latter without making sure the current thread is the one that was passed in. If it is not, then gdbarch_displaced_step_fixup may e.g., try reading from a running thread, which doesn't work on some targets, or worse, read memory from the wrong inferior and succeed. This is mostly a latent problem currently, as non-stop switches the current thread to the event thread early in fetch_inferior_event. Tested on x86_64 Fedora 20. gdb/ 2015-02-10 Pedro Alves <palves@redhat.com> * infrun.c (displaced_step_fixup): Switch to the event thread before calling gdbarch_displaced_step_fixup.
2015-02-10gdbserver: Fix crash when QTinit is handled with no inferior process attachedAntoine Tremblay6-2/+98
When gdbserver is called with --multi and attach has not been called yet and tstart is called on the gdb client, gdbserver would crash. This patch fixes gdbserver so that it returns E01 to the gdb client. Also this patch adds a testcase to verify this bug named no-attach-trace.exp gdb/gdbserver/ChangeLog: PR breakpoints/15956 * tracepoint.c (cmd_qtinit): Add check for current_thread. gdb/testsuite/ChangeLog: * gdb.trace/no-attach-trace.c: New file. * gdb.trace/no-attach-trace.exp: New file.
2015-02-10Add myself as write-after-approval GDB maintainerAntoine Tremblay2-0/+5
gdb/ChangeLog: * MAINTAINERS (Write After Approval): Add Antoine Tremblay.
2015-02-10opcodes/microblaze: Rename 'or', 'and', 'xor' to avoid C++ conflictPedro Alves3-4/+13
Building GDB as a C++ program, we see: In file included from gdb/microblaze-tdep.c:37:0: gdb/../opcodes/../opcodes/microblaze-opcm.h: At global scope: gdb/../opcodes/../opcodes/microblaze-opcm.h:32:51: error: expected identifier before ‘or’ token ncget, ncput, muli, bslli, bsrai, bsrli, mului, or, and, xor, ^ gdb/../opcodes/../opcodes/microblaze-opcm.h:32:51: error: expected ‘}’ before ‘or’ token gdb/../opcodes/../opcodes/microblaze-opcm.h:32:51: error: expected unqualified-id before ‘or’ token gdb/../opcodes/../opcodes/microblaze-opcm.h:60:1: error: expected declaration before ‘}’ token }; ^ opcodes/ChangeLog: 2015-02-10 Pedro Alves <palves@redhat.com> Tom Tromey <tromey@redhat.com> * microblaze-opcm.h (or, and, xor): Rename to microblaze_or, microblaze_and, microblaze_xor. * microblaze-opc.h (opcodes): Adjust.
2015-02-10Finish constification of varobj interfaceSimon Marchi6-32/+66
This completes the constification of the struct varobj pointers in the lang_varobj_ops interface partially done in b09e2c591f9221d865bfe8425990a6bf9fab24e3. As suggested by Pedro, varobj_get_path_expr casts away the const to assign the "mutable" struct member. gdb/ChangeLog: * ada-varobj.c (ada_name_of_child): Constify parent. (ada_path_expr_of_child): Same. (ada_value_of_child): Same. (ada_type_of_child): Same. * c-varobj.c (c_is_path_expr_parent): Same. (c_describe_child): Same. (c_name_of_child): Same. (c_value_of_child): Same. (c_type_of_child): Same. (cplus_number_of_children): Same. (cplus_describe_child): Constify var. (cplus_name_of_child): Constify parent. (cplus_value_of_child): Same. (cplus_type_of_child): Same. * jv-varobj.c (java_name_of_child): Same. (java_value_of_child): Same. (java_type_of_child): Same. * varobj.c (value_of_child): Same. (varobj_default_is_path_expr_parent): Constify var, parent and return value. (varobj_get_path_expr): Constify var, modify path_expr through mutable_var. (install_new_value): Constify parent. (value_of_child): Constify parent. * varobj.h (struct varobj): Constify parent. (struct lang_varobj_ops): Constify name_of_child, value_of_child and type_of_child. (varobj_get_path_expr): Constify var. (varobj_get_path_expr_parent): Constify var and return value.
2015-02-10Fix memory access violations discovered by running readelf compiled with ↵Nick Clifton3-5/+26
undefined memory access sanitization on fuzzed binaries. PR binutils/17531 * dwarf.c (display_debug_pubnames_worker): Use dwarf_vma type for offset. * readelf.c (dump_relocations): Handle printing offsets which are MIN_INT. (process_corefile_note_segment): Add range check of the namesz field.
2015-02-10Fixes for memory access violations triggered by running readelf on fuzzed ↵Nick Clifton2-2/+14
binaries. PR binutils/17531 * dwarf.c (process_debug_info): Zero the debug information array since correct initialisation cannot be relied upon. (process_cu_tu_index): Improve range checks.
2015-02-10Fix memory access violations triggered by running objdump compiled with ↵Nick Clifton7-58/+76
out-of-bounds sanitization checking. PR binutils/17512 * dwarf.c (eh_addr_size): Use an unsigned type. (size_of_encoded_value): Return an unsigned type. (read_leb128): Break if the shift becomes too big. (process_extended_line_op): Do not read the address if the length is too long. (read_cie): Warn and fail if the pointer size or segment size are too big. * dwarf.h (DWARF2_External_LineInfo): Delete unused and incorrect structure definition. (DWARF2_External_PubNames): Likewise. (DWARF2_External_CompUnit): Likewise. (DWARF2_External_ARange): Likewise. (DWARF2_Internal_LineInfo): Use dwarf_vma type for li_prologue_length. (eh_addr_size): Update prototype. * coffcode.h (styp_to_sec_flags): Use an unsigned long type to hold the flag bits. * peXXigen.c (pe_print_reloc): Use unsigned types to hold the size and number of relocs. (pe_print_debugdata): Use a 32-bit aligned buffer to store the codeview record. * versados.c (process_otr): Check the esdid value before using it to access the EDATA.
2015-02-10Add the missing HAVE_GETPAGESIZE check in get_viewH.J. Lu1-0/+4
2015-02-10Align offset passed to mmapH.J. Lu2-3/+16
Offset passed to mmap must be a multiple of the page size. This patch aligns offset passed to mmap. * plugin.c (get_view): Align offset passed to mmap.
2015-02-10Relax ARM prologue unwinder assumptionLuis Machado2-10/+35
Modify the ARM prologue unwinder to use the stop_reason hook instead of returning imprecise frame id's through the arm prologue this_id hook. gdb/ 2015-02-10 Luis Machado <lgustavo@codesourcery.com> * arm-tdep.c (arm_prologue_unwind_stop_reason): New function. (arm_prologue_this_id): Move PC and SP limit checks to arm_prologue_unwind_stop_reason. (arm_prologue_unwind) <stop_reason> : Set to arm_prologue_unwind_stop_reason.
2015-02-10Recognize new DWARF5/GCC5 DW_LANG Fortran 2003 and Fortran 2008 standards.Mark Wielaard2-0/+7
DWARFv5 defines and GCC5 may output two new DW_LANG constants for the Fortran 2003 and Fortran 2008 standards. Recognize both as variants of language_fortran. gdb/ChangeLog: * dwarf2read.c (set_cu_language): Recognize DW_LANG_Fortran03 and DW_LANG_Fortran08 as language_fortran. http://dwarfstd.org/ShowIssue.php?issue=141121.1
2015-02-10Recognize new DWARF5/GCC5 DW_LANG constants for Fortran 03 and Fortran 08.Mark Wielaard4-0/+13
DWARFv5 defines and GCC5 may output two new DW_LANG constants for the Fortran 2003 and Fortran 2008 standards. Handle and display both in binutils. binutils/ChangeLog: * dwarf.c (read_and_display_attr_value): Handle DW_LANG_Fortran03 and DW_LANG_Fortran08. include/ChangeLog: * dwarf2.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08. http://dwarfstd.org/ShowIssue.php?issue=141121.1
2015-02-09PR remote/17946: Fix wrong comparison of pointer against charSergio Durigan Junior2-1/+7
We were comparing a pointer against a char on remote.c. 'dcb' filed a bug to inform us about that. I pushed the following patch under the obvious rule. gdb/ChangeLog: 2015-02-09 Sergio Durigan Junior <sergiodj@redhat.com> PR remote/17946 * gdb/remote.c (remote_parse_stop_reply): Fix wrong comparison of pointer against char.
2015-02-10Automatic date update in version.inGDB Administrator1-1/+1