aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-03-23gdb: Minor cleanup in some gdb.arch/* testsAndrew Burgess6-33/+16
A small number of tests incorrectly tried to pass -Wa,-g through to GCC as an extra compile time flag, either to gdb_compile or prepare_for_testing. The problem is that the syntax used for passing the flags was incorrect, and as a result these extra flags were being ignored. Luckily, the 'debug' flag was being passed in each case anyway, which means that the '-g' flag would already be added. Given that all these tests pass 'debug', and the invalid flag has been ignored for some time, I'm just removing the flags in this commit. I've also changed the tests from using gdb_compile to prepare_for_testing, which allows some extra code to be removed from a couple of tests scripts. There should be no change in the test results after this commit. gdb/testsuite/ChangeLog: * gdb.arch/amd64-disp-step-avx.exp: Remove unneeded assembler flag option, syntax was wrong anyway. * gdb.arch/arm-disp-step.exp: Likewise. * gdb.arch/sparc64-regs.exp: Likewise. * gdb.arch/amd64-disp-step.exp: Remove unneeded assembler flag option, syntax was wrong anyway, switch to use prepare_for_testing. * gdb.arch/i386-disp-step.exp: Likewise.
2018-03-23Move gdbserver tdesc header funcs to c fileAlan Hayward3-42/+57
gdbserver/ * tdesc.c (target_desc::~target_desc): Move to here. (target_desc::operator==): Likewise. * tdesc.h (target_desc::~target_desc): Move from here. (target_desc::operator==): Likewise.
2018-03-23Testsuite: fully migrate to use_gdb_stub convenience funcAndreas Arnez25-24/+52
In the GDB test suite, there are still multiple invocations of "target_info exists use_gdb_stub". However, the recommended way of checking for use_gdb_stub is to call the convenience function of the same name. Replace these occurrences and just call "use_gdb_stub" instead. gdb/testsuite/ChangeLog: * gdb.ada/exec_changed.exp: Replace "target_info exists use_gdb_stub" by "use_gdb_stub". * gdb.ada/start.exp: Likewise. * gdb.base/async-shell.exp: Likewise. * gdb.base/attach-pie-misread.exp: Likewise. * gdb.base/attach-wait-input.exp: Likewise. * gdb.base/break-entry.exp: Likewise. * gdb.base/break-interp.exp: Likewise. * gdb.base/dprintf-detach.exp: Likewise. * gdb.base/nostdlib.exp: Likewise. * gdb.base/solib-nodir.exp: Likewise. * gdb.base/statistics.exp: Likewise. * gdb.base/testenv.exp: Likewise. * gdb.mi/mi-exec-run.exp: Likewise. * gdb.mi/mi-start.exp: Likewise. * gdb.multi/dummy-frame-restore.exp: Likewise. * gdb.multi/multi-arch-exec.exp: Likewise. * gdb.multi/multi-arch.exp: Likewise. * gdb.multi/tids.exp: Likewise. * gdb.multi/watchpoint-multi.exp: Likewise. * gdb.python/py-events.exp: Likewise. * gdb.threads/attach-into-signal.exp: Likewise. * gdb.threads/attach-stopped.exp: Likewise. * gdb.threads/threadapply.exp: Likewise. * lib/selftest-support.exp: Likewise.
2018-03-22Remove some cleanups from record-full.cTom Tromey2-15/+12
This removes some cleanups from record-full.c in a straightforward way. Tested by the buildbot. gdb/ChangeLog 2018-03-22 Tom Tromey <tom@tromey.com> * record-full.c (record_full_exec_insn): Use gdb::byte_vector. (record_full_goto_bookmark): Use std::string.
2018-03-23Automatic date update in version.inGDB Administrator1-1/+1
2018-03-22ppc: Fix stwux and stdux masks in skip_prologuePedro Franco de Carvalho2-9/+8
This patch merges the masks for matching the stwux and stdux instructions in rs6000-tdep.c:skip_prologue into a single mask that only matches these two instructions. Commit 72dd273062 fixed the warning described in PR tdep/18295, this patch addresses the comment in the same PR indicating that the mask was too permissive. gdb/Changelog: PR tdep/18295 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux a single mask.
2018-03-22ppc: Detect when LR is saved through frame pointerPedro Franco de Carvalho2-18/+63
This patch extends rs6000-tdep.c:skip_prologue so that it can detect when the Link Register is saved using the frame pointer (usually r31) in adition to the stack pointer (r1). The frame pointer offset from the frame base is tracked separately from the stack pointer offset for cases when the frame pointer is not in synch with the stack pointer at the moment of the LR save. Previously, "stq" could also be detected as an instruction that saves LR or CR. Because this was likely unintentional, this patch also restricts the matches to stw/stwu/std/stdu. gdb/ChangeLog: * rs6000-tdep.c (store_insn_p): New function. (skip_prologue): New variable alloca_reg_offset. Set lr_reg and cr_reg to their unshifted values. Use store_insn_p to match LR saves using either R1 or fdata->alloca_reg. Use store_insn_p to match CR saves. Set alloca_reg_offset when alloca_reg and framep are set. Remove lr_reg shift when assigning to fdata->lr_register.
2018-03-22Make "info proc cmdline" show args on GNU/LinuxAndreas Arnez4-4/+38
Currently "info proc cmdline" on GNU/Linux does not show the full command line, but only argument 0. And even a warning is shown if there are more. This was discussed in 2014 already: https://sourceware.org/ml/gdb-patches/2014-04/msg00212.html Follow the advice there and avoid target_fileio_read_stralloc. Instead, use target_fileio_read_alloc to read the whole command line and then replace NUL characters by spaces. Also add an appropriate test case. Note that gdbserver already handles this correctly. gdb/ChangeLog: * linux-tdep.c (linux_info_proc): For "info proc cmdline", print command line args instead of emitting a warning. gdb/testsuite/ChangeLog: * gdb.base/info-proc.exp: Add test for "info proc cmdline".
2018-03-22S390: Correct brace style in s390_get_wordsizeAndreas Arnez2-4/+9
This corrects bad formatting in the newly introduced function s390_get_wordsize. gdb/gdbserver/ChangeLog: * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2018-03-22x86: use local variable in check_VecOperands()Jan Beulich2-7/+13
This is just to make a subsequent change a little easier to read.
2018-03-22x86: drop pointless VecESizeJan Beulich3-952/+958
The attribute is meaningful only in templates allowing embedded broadcast. Drop them everywhere else.
2018-03-22x86: drop remaining redundant DispNJan Beulich2-75/+81
A few of them were missed in commit 7ac2002247 ("x86: derive DispN from BaseIndex") and also couldn't be removed by subsequent commits touching certain templates anyway.
2018-03-22ix86: allow HLE store of accumulator to absolute addressJan Beulich5-0/+25
Since they're shorter to encode, the 0xa0...0xa3 encodings are preferred for moves between accumulator and absolute address outside of 64-bit mode. With HLE release semantics this encoding is unsupported though, with the assembler raising an error. The operation is valid though, we merely need to pick the longer encoding in that case.
2018-03-22x86: fix swapped operand handling for BNDMOVJan Beulich10-7/+54
The wrong placement of the Load attribute in the templates prevented this from working. The disassembler also didn't handle this consistently with other similar dual-encoding insns.
2018-03-22x86/Intel: fix fallout from earlier template foldingJan Beulich8-27/+366
While many templates allowing multiple suitably matching XMM/YMM/ZMM operand sizes can be folded, a few need to be split in order to not wrongly accept "xmmword ptr" operands when only XMM registers are permitted (and memory operands are more narrow). Add a test case validating this.
2018-03-22x86: fold a few XOP templatesJan Beulich8-240/+200
Also add a new test case verifying that mixed operands of SIMD insns with a size-less memory operand in the middle are properly rejected.
2018-03-22Get rid of VEC(static_tracepoint_marker_p)Simon Marchi14-195/+183
This patch replaces VEC(static_tracepoint_marker_p) with std::vector, and does some c++ification around that. I thought a new overload of hex2str was useful, so I added it as well as corresponding unit tests. I also added an overload of ui_out::field_string that takes an std::string directly. gdb/ChangeLog: * tracepoint.h (struct static_tracepoint_marker): Initialize fields, define default constructor, move constructor and move assignment, disable the rest. <str_id, extra>: Make std::string. (release_static_tracepoint_marker): Remove. (free_current_marker): Remove. * tracepoint.c (free_current_marker): Remove. (parse_static_tracepoint_marker_definition): Adjust to std::string, use new hex2str overload. (release_static_tracepoint_marker): Remove. (print_one_static_tracepoint_marker): Get marker by reference and adjust to std::string. (info_static_tracepoint_markers_command): Adjust to std::vector changes * target.h (static_tracepoint_marker_p): Remove typedef. (DEF_VEC_P(static_tracepoint_marker_p)): Remove. (struct target_ops) <to_static_tracepoint_marker_at>: Return bool. <to_static_tracepoint_markers_by_strid>: Return std::vector. * target-debug.h (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove. (target_debug_print_std_vector_static_tracepoint_marker): New. (target_debug_print_struct_static_tracepoint_marker_p): Rename to... (target_debug_print_static_tracepoint_marker_p): ... this. * target-delegates.c: Re-generate. * breakpoint.h (struct tracepoint) <static_trace_marker_id>: Make std::string. * breakpoint.c (init_breakpoint_sal): Adjust to std::string. (decode_static_tracepoint_spec): Adjust to std::vector. (tracepoint_print_one_detail): Adjust to std::string. (strace_marker_decode_location): Adjust to std::string. (update_static_tracepoint): Adjust to std::string, remove call to release_static_tracepoint_marker. * linux-nat.c (linux_child_static_tracepoint_markers_by_strid): Adjust to std::vector. * remote.c (remote_static_tracepoint_marker_at): Return bool. (remote_static_tracepoint_markers_by_strid): Adjust to std::vector. * common/rsp-low.h (hex2str): New overload with explicit count of bytes. * common/rsp-low.c (hex2str): New overload with explicit count of bytes. * unittests/rsp-low-selftests.c (test_hex2str): New function. (_initialize_rsp_low_selftests): Add test_hex2str test. * unittests/tracepoint-selftests.c (test_parse_static_tracepoint_marker_definition): Adjust to std::string.
2018-03-22Make parse_static_tracepoint_marker_definition work with multiple static ↵Simon Marchi4-3/+91
tracepoint definitions Since I modify the parse_static_tracepoint_marker_definition function in the next patch, I wanted to write a unit test for it. Doing so showed that it doesn't handle multiple consecutive static tracepoint definitions separated by commas. However, the RSP documentation [1] states that servers may return multiple definitions, like: 1234:6d61726b657231:6578747261207374756666,abba:6d61726b657232: The problem is that the function uses strlen to compute the length of the last field (the extra field). If there are additional definitions in addition to the one we are currently parsing, the returned length will include those definitions, and we'll try to hex-decode past the extra field. This patch changes parse_static_tracepoint_marker_definition to consider the case where the current definition is followed by a comma and more definitions. It also adds the unit test that found the issue in the first place. I don't think this causes any backwards compatibility issues, because the previous code only handled single static tracepoint definitions, and the new code handles that correctly. gdb/ChangeLog: * tracepoint.c (parse_static_tracepoint_marker_definition): Consider case where the definition is followed by more definitions. * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add tracepoint-selftests.c. * unittests/tracepoint-selftests.c: New. [1] https://sourceware.org/gdb/onlinedocs/gdb/Tracepoint-Packets.html#qTfSTM
2018-03-22Automatic date update in version.inGDB Administrator1-1/+1
2018-03-21Add myself as a write-after-approval GDB maintainer.Pedro Franco de Carvalho2-0/+6
gdb/ChangeLog: 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com> * MAINTAINERS (Write After Approval): Add Pedro Franco de Carvalho.
2018-03-21DT_FLAGS_1: Add Solaris bitsH.J. Lu4-0/+29
The following bits in DT_FLAGS_1 are used by Solaris: #define DF_1_KMOD 0x10000000 /* kernel module */ #define DF_1_WEAKFILTER 0x20000000 /* apply weak binding to DT_FILTER */ #define DF_1_NOCOMMON 0x40000000 /* no COMMON symbols exist */ binutils/ * readelf.c (process_dynamic_section): Also dump DF_1_KMOD, DF_1_WEAKFILTER and DF_1_NOCOMMON. include/ * elf/common.h (DF_1_KMOD): New. (DF_1_WEAKFILTER): Likewise. (DF_1_NOCOMMON): Likewise.
2018-03-21S390: Make IPA recognize tdescs with guarded storageAndreas Arnez3-2/+23
The in-process agent does not handle tdescs with guarded storage yet. This is fixed. gdb/gdbserver/ChangeLog: * linux-s390-ipa.c (get_ipa_tdesc): Add handling for S390_TDESC_GS. * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise. (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64 and init_registers_s390_gs_linux64.
2018-03-21S390: gdbserver: Don't write guarded storage registersAndreas Arnez2-24/+12
On S390, the guarded storage register set is only valid if guarded storage is active. Reading/writing the register set yields errors if this is not the case. Then gdbserver emits warnings like these: Warning: ptrace(regsets_store_inferior_registers): No data available Apart from confusing the user, this can also lead to test case failures due to unexpected output. To suppress this, make the guarded storage regsets read-only for now. gdb/gdbserver/ChangeLog: * linux-s390-low.c (s390_fill_gs): Remove function. (s390_fill_gsbc): Remove function. (s390_regsets): Set fill functions for the guarded storage regsets to NULL.
2018-03-21S390: Enable re-attaching with native-extended-gdbserverAndreas Arnez2-44/+62
On s390x, when running attach.exp with native-extended-gdbserver, gdbserver crashes in find_regno like this: .../regcache.c:252: A problem internal to GDBserver has been detected. Unknown register tdb0 requested On the GDB side it looks like this: (gdb) attach 31568 Attaching to process 31568 Remote connection closed The test case attempts to attach to a new process via the already running gdbserver. Thus s390_arch_setup is called a second time, and that's where the problem occurs. In order to determine the word width (32 or 64 bits), s390_arch_setup reads the pswm register through the regcache. For that it uses a temporary tdesc which is supposed to work for all s390 targets, since the actual tdesc has not been determined yet. But in this second round this doesn't work, because s390_regsets has been updated already and now contains regsets not described by the temporary tdesc, such as the one containing tdb0. This is fixed by rearranging the logic in s390_arch_setup. gdb/gdbserver/ChangeLog: * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by the word size. Add comment. (s390_get_wordsize): New function. (s390_arch_setup): No longer select a temporary tdesc to fetch the pswm with it. Instead, use s390_get_wordsize to determine the word size first and derive the correct tdesc from that directly.
2018-03-21PowerPC64 synthetic symbolsAlan Modra2-9/+20
STT_FILE and a bunch of other symbol types aren't proper symbols to mark the start of a function's code. * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting symbols. Use size_t counts. Delete redundant opd test.
2018-03-21Delete unused elf32-ppc.c codeAlan Modra2-24/+4
Local symbols were being read but not used. * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2018-03-21Make tls_mask unsigned in elf32-ppc.cAlan Modra2-6/+14
* elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask field unsigned. (update_local_sym_info): Likewise for local_got_tls_masks. (ppc_elf_tls_optimize): Likewise for lgot_masks.
2018-03-21Correct multi-toc tprel relocsAlan Modra2-2/+10
Commit f15d0b545b trimmed some unnecessary TPREL relocs, but missed changing another place where they are allocated. * elf64-ppc.c (ppc_size_one_stub): Fix comment typo. (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we do in size_dynamic_sections.
2018-03-21Don't exceed reloc array boundsAlan Modra3-4/+14
* elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1] without first checking array bounds. * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2018-03-21Automatic date update in version.inGDB Administrator1-1/+1
2018-03-20ld/testsuite: XFAIL pr20995-2 on aarch64*-*-elf*Roland McGrath2-2/+7
ld/ * testsuite/ld-elf/shared.exp (pr20995-2): XFAIL on aarch64*-*-elf*, another target without RELRO.
2018-03-20Fix misleading indentation error.Stephen Roberts2-12/+16
This patch fixes a compile error introduced by my previous change, which caused the indentation of the following code block to become incorrect. ChangeLog: 2018-03-20 Stephen Roberts <stephen.roberts@arm.com> * gdb/symtab.c (find_pc_sect_line): fixed indentation.
2018-03-20Adjust testsuite/ld-plugin/pr22983.dH.J. Lu2-4/+11
* testsuite/ld-plugin/pr22983.d: Allow leading underscore as well as extra lines between symbols.
2018-03-20Replace the linear search in find_pc_sect_line with a binary search.Stephen Roberts6-11/+216
This patch addresses slowness when setting breakpoints, especially in heavily templatized code. Profiling showed that find_pc_sect_line in symtab.c was the performance bottleneck. The original logic performed a linear search over ordered data. This patch uses a binary search, as suggested by comments around the function. There are no behavioural changes, but gdb is now faster at setting breakpoints in template code. Tested using on make check on an x86 target. The optimisation speeds up the included template-breakpoints.py performance test by a factor of 7 on my machine. ChangeLog: 2018-03-20 Stephen Roberts <stephen.roberts@arm.com> * gdb/symtab.c (find_pc_sect_line): now uses binary search. gdb/testsuite/ * gdb.perf/template-breakpoints.cc: New file. * gdb.perf/template-breakpoints.exp: New file. * gdb.perf/template-breakpoints.py: New file.
2018-03-20gc.exp: Remove extraneous LD flags from the personality testMaciej W. Rozycki2-1/+6
Complement commit 8988502d7534 ("MIPS/LD/testsuite: Correct dynamic links with VR4100, VR4300 and VR5000") and commit bf48520113c4 ("gc.exp: Fix a typo: $LFLAGS -> $LDFLAGS"), and remove extraneous additional LD flags explicitly passed to the personality test on invocation. This passing has accidentally leaked from a WIP version of the former change. With the actual version committed the $LDFLAGS global variable is used instead for `run_dump_test' to use implicitly, so that `-call_shared' precedes `-lpersonality' on the linker's command line, as otherwise a shared `libpersonality.so' library wouldn't be considered for linking, causing the test to fail. ld/ * testsuite/ld-gc/gc.exp: Remove extraneous LD flags from the personality test.
2018-03-20Updated Russian and Spanish translations for the binutils/ sub-directory.Nick Clifton3-4758/+12056
* po/es.po: Updated Spanish translation. * po/ru.po: Updated Russian translation.
2018-03-20Set non_ir_ref_dynamic if a symbol is made dynamicH.J. Lu8-1/+70
If a symbol is made dynamic by --dynamic-list, it has non-IR reference. bfd/ PR ld/22983 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list. ld/ PR ld/22983 * testsuite/ld-plugin/lto.exp: Run PR ld/22983 test. * testsuite/ld-plugin/pr22983.d: New file. * testsuite/ld-plugin/pr22983.t: Likewise. * testsuite/ld-plugin/pr22983a.c: Likewise. * testsuite/ld-plugin/pr22983b.c: Likewise.
2018-03-20Automatic date update in version.inGDB Administrator1-1/+1
2018-03-19Support bare-identifier field initializers in RustTom Tromey5-0/+36
In Rust one can initialize a struct member from an identically-named local variable by simply mentioning the member name in the initializer, like: let x = 0; let y = Struct { x }; This initializes "Struct::x" from "x". This patch adds this form of initializer to the Rust expression parser and adds a test. Tested on x86-64 Fedora 26 using rustc 1.23. 2018-03-19 Tom Tromey <tom@tromey.com> * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain "IDENT" production. 2018-03-19 Tom Tromey <tom@tromey.com> * gdb.rust/simple.rs (main): Add local variables field1, field2, y0. * gdb.rust/simple.exp: Test bare identifier form of struct initializer.
2018-03-19Convert observers to C++Tom Tromey86-1234/+999
This converts observers from using a special source-generating script to be plain C++. This version of the patch takes advantage of C++11 by using std::function and variadic templates; incorporates Pedro's patches; and renames the header file to "observable.h" (this change eliminates the need for a clean rebuild). Note that Pedro's patches used a template lambda in tui-hooks.c, but this failed to compile on some buildbot instances (presumably due to differing C++ versions); I replaced this with an ordinary template function. Regression tested on the buildbot. gdb/ChangeLog 2018-03-19 Pedro Alves <palves@redhat.com> Tom Tromey <tom@tromey.com> * unittests/observable-selftests.c: New file. * common/observable.h: New file. * observable.h: New file. * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c, arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c, breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c, corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c, extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c, infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c, linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c, mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c, ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c, python/py-breakpoint.c, python/py-finishbreakpoint.c, python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c, record-btrace.c, record-full.c, record.c, regcache.c, remote.c, riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c, spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c, symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c, tui/tui-interp.c, valops.c: Update all users. * tui/tui-hooks.c (tui_bp_created_observer) (tui_bp_deleted_observer, tui_bp_modified_observer) (tui_inferior_exit_observer, tui_before_prompt_observer) (tui_normal_stop_observer, tui_register_changed_observer): Remove. (tui_observers_token): New global. (attach_or_detach, tui_attach_detach_observers): New functions. (tui_install_hooks, tui_remove_hooks): Use tui_attach_detach_observers. * record-btrace.c (record_btrace_thread_observer): Remove. (record_btrace_thread_observer_token): New global. * observer.sh: Remove. * observer.c: Rename to observable.c. * observable.c (namespace gdb_observers): Define new objects. (observer_debug): Move into gdb_observers namespace. (struct observer, struct observer_list, xalloc_observer_list_node) (xfree_observer_list_node, generic_observer_attach) (generic_observer_detach, generic_observer_notify): Remove. (_initialize_observer): Update. Don't include observer.inc. * Makefile.in (generated_files): Remove observer.h, observer.inc. (clean mostlyclean): Likewise. (observer.h, observer.inc): Remove targets. (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c. (COMMON_SFILES): Use observable.c, not observer.c. * .gitignore: Remove observer.h. gdb/doc/ChangeLog 2018-03-19 Tom Tromey <tom@tromey.com> * observer.texi: Remove. gdb/testsuite/ChangeLog 2018-03-19 Tom Tromey <tom@tromey.com> * gdb.gdb/observer.exp: Remove.
2018-03-19Testsuite: Fix ambiguous "break" due to libinproctraceAndreas Arnez26-50/+79
Some of GDB's trace test cases define a function end() and place a breakpoint there with "break end". However, when libinproctrace is linked to the binary, there are multiple methods named "end", such as std::string::end() from the C++ library or format_pieces::end() from common/format.h. GDB then creates multiple breakpoints instead of just a single one, and some FAILs result, such as these: FAIL: gdb.trace/trace-mt.exp: ftrace on: break end FAIL: gdb.trace/trace-mt.exp: ftrace off: break end Fix this by adding the "-qualified" option to the break commands. For consistency, change all occurrences of "break end" (and similar) in all trace test cases, even if the current behavior does not cause problems. Also, consequently use the gdb_breakpoint convenience proc. gdb/testsuite/ChangeLog: * gdb.trace/actions-changed.exp: Call gdb_breakpoint with the "qualified" option when setting breakpoints. * gdb.trace/backtrace.exp: Likewise. * gdb.trace/circ.exp: Likewise. * gdb.trace/collection.exp: Likewise. * gdb.trace/disconnected-tracing.exp: Likewise. * gdb.trace/ftrace-lock.exp: Likewise. * gdb.trace/ftrace.exp: Likewise. * gdb.trace/infotrace.exp: Likewise. * gdb.trace/packetlen.exp: Likewise. * gdb.trace/passc-dyn.exp: Likewise. * gdb.trace/qtro.exp: Likewise. * gdb.trace/read-memory.exp: Likewise. * gdb.trace/report.exp: Likewise. * gdb.trace/signal.exp: Likewise. * gdb.trace/status-stop.exp: Likewise. * gdb.trace/strace.exp: Likewise. * gdb.trace/tfind.exp: Likewise. * gdb.trace/trace-break.exp: Likewise. * gdb.trace/trace-condition.exp: Likewise. * gdb.trace/trace-mt.exp: Likewise. * gdb.trace/tstatus.exp: Likewise. * gdb.trace/tsv.exp: Likewise. * gdb.trace/unavailable-dwarf-piece.exp: Likewise. * gdb.trace/unavailable.exp: Likewise. * gdb.trace/while-dyn.exp: Likewise.
2018-03-19Updated Spanish translation for the bfd/ sub-directory, and updated Ukranian ↵Nick Clifton4-2341/+5006
translation for the gas/ sub-directory. bfd * po/es.po: Updated Spanish translation. gas * po/uk.po: Updated Ukranian translation.
2018-03-18Remove some cleanups from solib.cTom Tromey2-6/+10
This removes some cleanups from solib.c, replacing them with gdb::def_vector. Regression tested by the buildbot. gdb/ChangeLog 2018-03-18 Tom Tromey <tom@tromey.com> * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use gdb::def_vector. (bfd_lookup_symbol_from_dyn_symtab): Likewise.
2018-03-19Automatic date update in version.inGDB Administrator1-1/+1
2018-03-18Automatic date update in version.inGDB Administrator1-1/+1
2018-03-17Change auto_load_objfile_script_1 to use std::stringTom Tromey2-18/+12
This replaces some manual string manipulation in auto_load_objfile_script_1 with std::string, simplifying the code and allowing the removal of some cleanups. Tested by the buildbot. 2018-03-17 Tom Tromey <tom@tromey.com> * auto-load.c (auto_load_objfile_script_1): Use std::string.
2018-03-17Remove target_fileio_close_cleanupTom Tromey2-16/+38
This removes target_fileio_close_cleanup in favor of a new RAII class. The new class is similar to scoped_fd but calls target_fileio_close_cleanup rather than close. Regression tested by the buildbot. gdb/ChangeLog 2018-03-17 Tom Tromey <tom@tromey.com> * target.c (class scoped_target_fd): New. (target_fileio_close_cleanup): Remove. (target_fileio_read_alloc_1): Use scoped_target_fd.
2018-03-17Automatic date update in version.inGDB Administrator1-1/+1
2018-03-16Add silent Makefile rulesSimon Marchi9-57/+180
Many projects (e.g. the Linux kernel) and build systems use "silent" rules, which means that they'll only print a summary of what's being done instead of printing all the detailed command lines. While chatting on the #gdb IRC channel, I realized a few people (including me) thought it would be nice to have it in GDB too. The idea is that too much text is not useful, the important information gets lost. If there's only the essential information, it's more likely to be useful. Most of the time, when I look at the build output, it's to see how it's progressing. By just printing a brief summary of each operation, I can easily spot what's currently being compiled and therefore how the build progresses (with time you know the order in which files are compiled almost by heart). As with other projects (Linux, automake-based things, probably others), it's possible to print the complete command lines by passing V=1 to make (or any other non-zero value). I had one hesitation about this: when people report build failures, we are more likely to miss the full compile command line. We'll probably sometimes need to ask people to include the build log with "make V=1". I don't think it's a big downside, if other projects the size of the Linux kernel can live with it, I'm sure we can too. gdb/ChangeLog: * silent-rules.mk: New. * Makefile.in: Include silent-rules.mk (srcdir, VPATH, top_srcdir): Move up. (COMPILE): Add ECHO_CXX. (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD. (init.c): Add ECHO_INIT_C. (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD. (version.c): Add ECHO_GEN. (printcmd.o): Add ECHO_CXX. (target-float.o): Add ECHO_CXX. (ada-exp.o): Add ECHO_CXX. (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN. (insight$(EXEEXT)): Add ECHO_CXXLD. * gnulib/configure.ac: Add AM_SILENT_RULES. * gnulib/aclocal.m4: Re-generate. * gnulib/configure: Re-generate. * gnulib/import/Makefile.in: Re-generate. gdb/gdbserver/ChangeLog: * Makefile.in: Include silent-rules.mk. (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up. (COMPILE): Add ECHO_CXX. (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD. (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD. ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD. (version-generated.c): Add ECHO_GEN. (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED. (IPAGENT_COMPILE): Add ECHO_CXX. (%-generated.c): Add ECHO_REGDAT.
2018-03-16Remove make_cleanup_free_section_addr_infoTom Tromey12-261/+180
This removes make_cleanup_free_section_addr_info. Instead -- per Simon's suggestion -- this changes section_addr_info to be a std::vector. Regression tested by the buildbot. gdb/ChangeLog 2018-03-16 Tom Tromey <tom@tromey.com> * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs". * utils.h (make_cleanup_free_section_addr_info): Don't declare. * utils.c (do_free_section_addr_info) (make_cleanup_free_section_addr_info): Remove. * symfile.h (struct other_sections): Add constructor. (struct section_addr_info): Remove. (section_addr_info): New typedef. (struct sym_fns) <sym_offsets>: Change type of parameter. (build_section_addr_info_from_objfile) (relative_addr_info_to_section_offsets, addr_info_make_relative) (default_symfile_offsets, symbol_file_add) (symbol_file_add_from_bfd) (build_section_addr_info_from_section_table): Update. (alloc_section_addr_info, free_section_addr_info): Don't declare. * symfile.c (alloc_section_addr_info): Remove. (build_section_addr_info_from_section_table): Change return type. Update. (build_section_addr_info_from_bfd) (build_section_addr_info_from_objfile): Likewise. (free_section_addr_info): Remove. (relative_addr_info_to_section_offsets): Change type of "addrs". (addrs_section_compar): Now a std::sort comparator. (addrs_section_sort): Change return type. (addr_info_make_relative): Change type of "addrs". Update. (default_symfile_offsets, syms_from_objfile_1) (syms_from_objfile, symbol_file_add_with_addrs): Likewise. (symbol_file_add_separate): Update. (symbol_file_add): Change type of "addrs". Update. (add_symbol_file_command): Update. Remove cleanups. * symfile-mem.c (symbol_file_add_from_memory): Update. Remove cleanups. * symfile-debug.c (debug_sym_offsets): Change type of "info". * solib.c (solib_read_symbols): Update. * objfiles.c (objfile_relocate): Update. Remove cleanups. * machoread.c (macho_symfile_offsets): Update. * jit.c (jit_bfd_try_read_symtab): Update.