aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-07-09 * testsuite/nds32/ji-jr.d: Fix name tag.Jeff Law2-1/+5
2018-07-09LD/testsuite: run_dump_test: Report UNSUPPORTED for excluded targetsMaciej W. Rozycki2-3/+51
Bring the LD implementation of `run_dump_test' in line with its binutils and GAS counterparts and report the UNSUPPORTED status for tests the run of which has been prevented by means of one or more of `target', `alltargets' and `notarget' tags. Define `skip', `anyskip' and `noskip' tags, which do not report anything for tests that are not run. The rationale behind this is that we want to have unsupported tests reported to ensure that they have actually been attempted and have not been accidentally suppressed. Then tests which have target-specific variants that cannot be expressed with a single .d file can make use of the newly added tags to silently suppress the uninteresting variants. ld/ * testsuite/lib/ld-lib.exp (run_dump_test): Call `unsupported' if the target being tested has been excluded by means of one or more of `target', `alltargets' and `notarget' tags. Add support for `skip', `anyskip' and `noskip' tags.
2018-07-09LD/testsuite: run_dump_test: Use the intended test name ASAPMaciej W. Rozycki2-9/+14
Bring the LD implementation of `run_dump_test' in line with its binutils and GAS counterparts and use the intended test name, from the `name' tag if set, for test status reporting as soon as it is available. ld/ * testsuite/lib/ld-lib.exp (run_dump_test): Move the setting of `testname' earlier on and use it for test status reporting.
2018-07-09S12Z/opcodes: Correct a `reg' global shadowing error for pre-4.8 GCCMaciej W. Rozycki2-14/+22
Remove `-Wshadow' compilation errors: cc1: warnings being treated as errors .../opcodes/s12z-dis.c: In function 'lea_reg_xys_opr': .../opcodes/s12z-dis.c:814: error: declaration of 'reg' shadows a global declaration .../opcodes/s12z-dis.c:783: error: shadowed declaration is here .../opcodes/s12z-dis.c: In function 'lea_reg_xys': .../opcodes/s12z-dis.c:843: error: declaration of 'reg' shadows a global declaration .../opcodes/s12z-dis.c:783: error: shadowed declaration is here .../opcodes/s12z-dis.c: In function 'print_insn_loop_primitive': .../opcodes/s12z-dis.c:2206: error: declaration of 'reg' shadows a global declaration .../opcodes/s12z-dis.c:783: error: shadowed declaration is here which for versions of GCC before 4.8 prevent support for S12Z targets from being built. See also GCC PR c/53066. opcodes/ * s12z-dis.c (lea_reg_xys_opr): Rename `reg' local variable to `reg_xys'. (lea_reg_xys): Likewise. (print_insn_loop_primitive): Rename `reg' local variable to `reg_dxy'.
2018-07-09gdb/testsuite: Allow for failure to read some memory addressesAndrew Burgess2-12/+62
In the gdb.base/examine-backward.exp test script, we check to see if address zero is readable, and then read memory first forward from address zero, and then backward from address zero. The problem is, being able to read address zero does not guarantee that you'll be able to read from the other end of the address space, and the test probably shouldn't assume that is the case. This patch updates the test script so that even if address zero is known non-readable, we still run the tests, the tests in question are mostly about, can GDB calculate the correct address to read from, we can confirm this even if the final read ultimately fails. We also no longer assume that if address zero is readable, then the other end of the address space will be readable. One further change is that, when we examined the memory at address zero, the regexp used to match the address expected that the zero address would have two '0' digits as the least significant digits. As GDB strips leading zeros from addresses this was causing the test to fail. I've reduced the zero address to a single 0 digit. gdb/testsuite/ChangeLog: * gdb.base/examine-backward.exp: Still run tests around address 0x0, even if address 0x0 is not readable. Update the pattern for matching address 0x0 in expected output.
2018-07-09Don't mention XM_CDEPS or NAT_CLIBSTom Tromey2-2/+7
Neither XM_CDEPS nor NAT_CLIBS are defined anywhere, so remove the uses. gdb/ChangeLog 2018-07-09 Tom Tromey <tom@tromey.com> * Makefile.in (CDEPS): Don't mention XM_CDEPS. (CLIBS): Don't mention NAT_CLIBS.
2018-07-09Remove ADD_FILES and ADD_DEPS from Makefile.inTom Tromey2-8/+10
Nothing defines XM_ADD_FILES, TM_ADD_FILES, or NAT_ADD_FILES any more, so consequently ADD_FILES and ADD_DEPS are no longer needed. So, this removes them. gdb/ChangeLog 2018-07-09 Tom Tromey <tom@tromey.com> * Makefile.in (ADD_FILES, ADD_DEPS): Remove. (LIBGDB_OBS, clean mostlyclean): Update. (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2018-07-09Minimize yacc and lex outputTom Tromey3-12/+13
This minimizes the "make" output from the yacc and lex rules, following the same technique as the rest of the Makefile. The lex rule had a special case to deal with the situation where flex is not available. I don't think this is needed, so I removed it. If flex is truly unavailable, the person building gdb can simply "touch" the output file. gdb/ChangeLog 2018-07-09 Tom Tromey <tom@tromey.com> * Makefile.in (%.c: %.y): Use ECHO_YACC. (%.c: %.l): Use ECHO_LEX. Just fail if flex not available. * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2018-07-09Fix exec.c handling in MakefileTom Tromey2-2/+7
exec.c ws handled specially in COMMON_OBS, but there doesn't seem to be a reason for this. This changes the Makefile to treat exec.c as an ordinary source file. gdb/ChangeLog 2018-07-09 Tom Tromey <tom@tromey.com> * Makefile.in (ALLDEPFILES): Remove exec.c. (COMMON_OBS): Remove exec.o. (COMMON_SFILES): Add exec.c.
2018-07-09Remove lint supportTom Tromey2-11/+4
I don't think anyone uses lint any more, so this removes the support for it from the Makefile. gdb/ChangeLog 2018-07-09 Tom Tromey <tom@tromey.com> * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2018-07-09Use a stamp file for version.cTom Tromey2-3/+15
This introduces a stamp file for version.c, preventing unnecessary version.o rebuilds. gdb/ChangeLog 2018-07-09 Tom Tromey <tom@tromey.com> * Makefile.in (clean mostlyclean): Remove stamp-version. (version.c): Depend on stamp-version. (stamp-version): New rule, from version.c rule.
2018-07-09Use a stamp file for init.cTom Tromey2-4/+11
This introduces a stamp file for init.c. This prevents constant rebuilds of init.o, by arranging for init.c to only be modified when its contents change. (FWIW this is a standard idiom in use by Automake and by gdb itself for many years.) gdb/ChangeLog 2018-07-09 Tom Tromey <tom@tromey.com> * Makefile.in (init.c): Depend on stamp-init. (stamp-init): New rule, from init.c rule. (clean mostlyclean): Remove stamp-init.
2018-07-09Simplify INIT_FILESTom Tromey2-12/+7
This simplifies the INIT_FILES variable. COMMON_OBS includes CONFIG_OBS and SUBDIR_GCC_COMPILE_OBS, so there's no need to reference CONFIG_OBS or SUBDIR_GCC_COMPILE_SRCS there. Once this is done, it it clear that duplicates can't occur, so remove the duplicate-removing code as well. gdb/ChangeLog 2018-07-09 Tom Tromey <tom@tromey.com> * Makefile.in (INIT_FILES): Remove CONFIG_SRCS, SUBDIR_GCC_COMPILE_SRCS.
2018-07-09Remove some unused code from init.c build ruleTom Tromey2-8/+4
The init.c build rule has a few sed expressions that aren't necessary any more. This removes them. gdb/ChangeLog 2018-07-09 Tom Tromey <tom@tromey.com> * Makefile.in (init.c): Remove some unused sed rules.
2018-07-09Remove TSOBS from gdb/Makefile.inTom Tromey2-5/+11
The TSOBS variable doesn't seem to serve a useful purpose in gdb/Makefile.in, so remove it. gdb/ChangeLog 2018-07-09 Tom Tromey <tom@tromey.com> * Makefile.in (TSOBS): Remove. (INIT_FILES): Update. (LIBGDB_OBS): Update. (COMMON_SFILES): Add inflow.c. (SFILES): Remove inflow.c.
2018-07-09bfd: Use changequote for "i[3-7]86-*-linux-*"H.J. Lu3-1/+9
Use changequote to match "i[3-7]86-*-linux-*", instead of "i3-786-*-linux-*". PR ld/23388 * configure.ac: Use changequote for "i[3-7]86-*-linux-*". * configure: Regenerated.
2018-07-09m68hc1* fixesAlan Modra6-3/+13
With config.sub now properly returning m68hc12-unknown-elf rather than m68hc12-unknown-none, more ELF tests run. This patch enables STB_GNU_UNIQUE processing fixing some testsuite failures that probably no m68hc12 user cares about, and removes some XPASSes. bfd/ * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call _bfd_elf_post_process_headers. ld/ * testsuite/ld-discard/extern.d: Remove m68hc12 xfail. * testsuite/ld-discard/start.d: Likewise. * testsuite/ld-discard/static.d: Likewise.
2018-07-09[ARM] Fix warning cannot find thumb start symbolChristophe Lyon2-1/+6
In case params.thumb_entry_symbol has its default NULL value, using it to print a warning in gld${EMULATION_NAME}_finish results in a crash. Use h->root.string instead which either points to params.thumb_entry_symbol name or to entry_symbol name. 2018-07-09 Christophe Lyon <christophe.lyon@linaro.org> * emultempl/armelf.em (gld${EMULATION_NAME}_finish): Use the right symbol name in case of warning. Change-Id: Iec61a833c0ad538b1440bf326ba67834c314dd63
2018-07-09Automatic date update in version.inGDB Administrator1-1/+1
2018-07-08Automatic date update in version.inGDB Administrator1-1/+1
2018-07-07contrib/gdb-add-index.sh -dwarf-5Jan Kratochvil2-2/+12
------------------------------------------------------------------------------ (gdb) help save gdb-index Save a gdb-index file. Usage: save gdb-index [-dwarf-5] DIRECTORY No options create one file with .gdb-index extension for pre-DWARF-5 compatible .gdb_index section. With -dwarf-5 creates two files with extension .debug_names and .debug_str for DWARF-5 .debug_names section. ------------------------------------------------------------------------------ But gdb-add-index command provided no way how to pass the -dwarf-5 option. gdb/ChangeLog 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com> * contrib/gdb-add-index.sh ($dwarf5): New, use it.
2018-07-07ia64-tdep.c: Fix -Wwrite-strings errorsSimon Marchi2-10/+19
Simply add const where necessary to get rid of errors like: /home/simark/src/binutils-gdb/gdb/ia64-libunwind-tdep.c:114:1: error: ISO C++ forbids converting a string constant to ‘char*’ [-Werror=write-strings] static char *get_reg_name = STRINGIFY(UNW_OBJ(get_reg)); ^~~~~~~~~~~~~~ /home/simark/src/binutils-gdb/gdb/common/preprocessor.h:28:25: note: in definition of macro ‘STRINGIFY_1’ #define STRINGIFY_1(x) #x ^ /home/simark/src/binutils-gdb/gdb/ia64-libunwind-tdep.c:114:29: note: in expansion of macro ‘STRINGIFY’ static char *get_reg_name = STRINGIFY(UNW_OBJ(get_reg)); ^~~~~~~~~ gdb/ChangeLog: * ia64-tdep.c (get_reg_name, get_fpreg_name, get_saveloc_name, is_signal_frame_name, step_name, init_remote_name, create_addr_space_name, destroy_addr_space_name, search_unwind_table_name, find_dyn_list_name): Constify.
2018-07-07Automatic date update in version.inGDB Administrator1-1/+1
2018-07-06xtensa: don't emit dynamic relocation for weak undefined symbolMax Filippov2-2/+20
Resolved reference to a weak undefined symbol in PIE must not have a dynamic relative relocation against itself, otherwise the value of a reference will be changed from 0 to the base of executable, breaking code like the following: void weak_function (void); if (weak_function) weak_function (); This fixes tests for PR ld/22269 and a number of PIE tests in xtensa gcc testsuite. bfd/ 2018-07-06 Max Filippov <jcmvbkbc@gmail.com> * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate space for dynamic relocation for undefined weak symbol. (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE relocation for undefined weak symbols. (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation section for relocations against undefined weak symbols.
2018-07-06Add checks for the NT_ARM_SVE section in a core file.Alan Hayward3-0/+37
The NT_ARM_SVE section is documented here: https://github.com/torvalds/linux/blob/master/Documentation/arm64/sve.txt * A NT_ARM_SVE note will be added to each coredump for each thread of the dumped process. The contents will be equivalent to the data that would have been read if a PTRACE_GETREGSET of NT_ARM_SVE were executed for each thread when the coredump was generated. * elf.c (elfcore_grok_aarch_sve): New function. (elfcore_grok_note): Check for Aarch64 SVE. (elfcore_write_aarch_sve): New function. (elfcore_write_register_note): Check for Aarch64 SVE. * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
2018-07-06Fix SBO bit in disassembly mask for ldrah on AArch64.Tamar Christina2-1/+6
The disassembly mask for ldarh incorrectly didn't mask out bit 20 which is part of the SBO part of the instruction and shouldn't be considered input. This fixes the wrong bit fixing the disassembly of instructions to ldarh and makes the behavior consistent. opcodes/ PR binutils/23242 * aarch64-tbl.h (ldarh): Fix disassembly mask.
2018-07-06Fix the read/write flag for these registers on AArch64Tamar Christina5-5/+44
The previous constraints were based on information already in opcodes and it seems that a few of them were wrong. I have now hand verified the ones changed by the previous patch and corrected where needed. This prevents a warning to be issued when one shouldn't be. opcodes/ PR binutils/23369 * aarch64-opc.c (aarch64_sys_regs): Make read/write csselr_el1, vsesr_el2, osdtrrx_el1, osdtrtx_el1, pmsidr_el1. gas/testsuite/ PR binutils/23369 * gas/aarch64/msr.d (csselr_el1, vsesr_el2, osdtrrx_el1, osdtrtx_el1, pmsidr_el1): New. * gas/aarch64/msr.s: Likewise.
2018-07-06gdb/testsuite: Ensure test links in malloc and freeAndrew Burgess2-0/+8
The test associated with the source file gdb.base/share-env-with-gdbserver.c relies on calling malloc and free within the inferior from GDB. However, as the test source itself makes no use of these functions, there's no requirement that they be linked into the test executable. This commit adds a dummy call to malloc and free to ensure they are linked into the test executable. gdb/testsuite/ChangeLog: * gdb.base/share-env-with-gdbserver.c (main): Add call to malloc/free.
2018-07-06Stop readelf from reporting gaps in the gnu build notes if the gap crosses a ↵Nick Clifton2-2/+28
section boundary. * readelf.c (same_section): New function. (print_gnu_build_attribute_description): Do not complain about gaps that cross a section boundary.
2018-07-06Fix the relocs created to adjust notes created by the assembler.Nick Clifton2-3/+8
* write.c (maybe_generate_build_notes): Bias reloc offsets by the number of notes already generated.
2018-07-06Update config.subSebastian Huber2-9/+7
* config.sub: Sync with upstream version 2018-07-03.
2018-07-06Fix diagnostic errorsAlan Modra9-6/+46
Fixes a number of build errors like the following .../elf32-arm.c: In function 'elf32_arm_nabi_write_core_note': .../elf32-arm.c:2177: error: #pragma GCC diagnostic not allowed inside functions .../elf32-arm.c:2186: error: #pragma GCC diagnostic not allowed inside functions See the comment in diagnostics.h. include/ * diagnostics.h: Comment on macro usage. bfd/ * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally. * elf32-ppc.c (ppc_elf_write_core_note): Likewise. * elf32-s390.c (elf_s390_write_core_note): Likewise. * elf64-ppc.c (ppc64_elf_write_core_note): Likewise. * elf64-s390.c (elf_s390_write_core_note): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
2018-07-06[GOLD] PowerPC .gnu.attributes supportAlan Modra4-7/+393
elfcpp/ * powerpc.h (Tag_GNU_Power_ABI_FP): Define. (Tag_GNU_Power_ABI_Vector, Tag_GNU_Power_ABI_Struct_Return): Define. gold/ * powerpc.cc: Include attributes.h. (Powerpc_relobj::attributes_section_data_): New variable, with accessor and associated constructor and destructor support. (Powerpc_dynobj::attributes_section_data_): Likewise. (Powerpc_relobj::do_read_symbols): Stash SHT_GNU_ATTRIBUTES section contents in attributes_section_data_. (Powerpc_dynobj::do_read_symbols): Likewise. (Target_powerpc): Add attributes_section_data_, last_fp_, last_ld_, last_vec_, and last_struct_ vars. (Target_powerpc::merge_object_attributes): New function. (Target_powerpc::do_finalize_sections): Iterate over input objects merging attributes. Create output attributes section.
2018-07-05darwin: Silence syscall deprecated declaration warningSimon Marchi4-7/+34
This patch silences this warning: /Users/simark/src/binutils-gdb/gdb/darwin-nat.c:839:10: error: 'syscall' is deprecated: first deprecated in macOS 10.12 - syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost(). [-Werror,-Wdeprecated-declarations] res = syscall (SYS___pthread_kill, thread->gdb_port, nsignal); ^ /usr/include/unistd.h:745:6: note: 'syscall' has been explicitly marked deprecated here int syscall(int, ...); ^ The comment of the new pthread_kill function explains why we use the syscall function directly. include/ChangeLog: * diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS): Define for clang. gdb/ChangeLog: * darwin-nat.c (darwin_pthread_kill): New function. (darwin_resume_thread): Use darwin_pthread_kill.
2018-07-05RISC-V: Add riscv-*-* configure support, and minor cleanup.Jim Wilson4-3/+14
bfd/ * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*. (riscv64*-*-*): Likewise. (riscv-*-*): Add as an alias for riscv32*-*-*. ld/ * configure.tgt (riscv-*-*): Add as an alias for riscv32*-*-*.
2018-07-06Automatic date update in version.inGDB Administrator1-1/+1
2018-07-05MIPS/LD/testsuite: Use $linux_gnu consistently across `mips-elf.exp'Maciej W. Rozycki2-2/+7
Replace two remaining spelled-out calls to `[istarget mips*-*-linux*]' in `mips-elf.exp' with $linux_gnu, which is equivalent. ld/ * testsuite/ld-mips-elf/mips-elf.exp: Replace remaining calls to `[istarget mips*-*-linux*]' with $linux_gnu.
2018-07-05x86: Remove x86 ISA properties with empty bitsH.J. Lu17-4/+230
There is no need to generate x86 ISA properties with empty bits in linker output. bfd/ PR ld/23372 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86 ISA properties with empty bits. ld/ PR ld/23372 * testsuite/ld-i386/i386.exp: Run pr23372a and pr23372b. * testsuite/ld-i386/pr23372a.d: New file. * testsuite/ld-i386/pr23372a.s: Likewise. * testsuite/ld-i386/pr23372b.d: Likewise. * testsuite/ld-i386/pr23372b.s: Likewise. * testsuite/ld-i386/pr23372c.s: Likewise. * testsuite/ld-x86-64/pr23372a-x32.d: Likewise. * testsuite/ld-x86-64/pr23372a.d: Likewise. * testsuite/ld-x86-64/pr23372a.s: Likewise. * testsuite/ld-x86-64/pr23372b-x32.d: Likewise. * testsuite/ld-x86-64/pr23372b.d: Likewise. * testsuite/ld-x86-64/pr23372b.s: Likewise. * testsuite/ld-x86-64/pr23372c.s: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pr23372a, pr23372a-x32, pr23372b and pr23372b-x32.
2018-07-05Update config.guess and config.subSebastian Huber3-748/+755
* config.guess: Sync with upstream version 2018-06-26. * config.sub: Sync with upstream version 2018-07-02.
2018-07-05Updated Russian, Bulgarian, and Brazilian Portuguese translations for ↵Nick Clifton9-11457/+20411
various components of the binutuls. ld * po/bg.po: Updated Bulgarian translation. * po/pt_BR.po: Updated Brazilian Portuguese translation. binutils* po/bg.po: Updated Bulgarian translation. bfd,gas * po/ru.po: Updated Russian translation.
2018-07-05[gdb] Fix build error in macroexp.cTom de Vries2-0/+14
When doing a combined build with the gcc and binutils-gdb repos, I run into this build error in gdb: ... gdb/macroexp.c: \ In function ‘void get_next_token_for_substitution(macro_buffer*, \ macro_buffer*, char**, macro_buffer*, char**, int*, bool*)’: gdb/macroexp.c:925:17: error: \ implicitly-declared ‘constexpr macro_buffer& \ macro_buffer::operator=(const macro_buffer&)’ is deprecated \ [-Werror=deprecated-copy] *token = *lookahead; ... Wdeprecated-copy is a new gcc warning added after gcc 8. This patch fixes the build error by adding an explicit copy operator to the macro_buffer class. I've added asserts to ensure that both the dest and src of the copy are shared, in other words, neither is owner of the text pointer. I've run the gdb testsuite on x86_64-linux and the asserts did not trigger. 2018-07-05 Tom de Vries <tdevries@suse.de> * macroexp.c (macro_buffer) <operator=>: New member function.
2018-07-05Error for mismatched powerpc ABI tagsAlan Modra13-44/+96
And report the two input files that are incompatible rather than reporting that an input file is incompatible with the output. bfd/ * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error on mismatch. Remove "warning: " from messages. Track last bfd used to set tags. (ppc_elf_merge_obj_attributes): Likewise. Handle status from _bfd_elf_ppc_merge_fp_attributes. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status from _bfd_elf_ppc_merge_fp_attributes. ld/ * testsuite/ld-powerpc/attr-gnu-4-12.d: Update expected output. * testsuite/ld-powerpc/attr-gnu-4-13.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-21.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-23.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-31.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-32.d: Likewise. * testsuite/ld-powerpc/attr-gnu-8-23.d: Likewise. * testsuite/ld-powerpc/attr-gnu-12-21.d: Likewise.
2018-07-05Automatic date update in version.inGDB Administrator1-1/+1
2018-07-04Use exit_inferior in darwin_attach_pidTom Tromey2-2/+5
Commit a50c11c666 was intended to use exit_inferior in darwin_attach_pid, but I accidentally pushed the wrong version of the patch. This fixes the problem. gdb/ChangeLog 2018-07-04 Tom Tromey <tom@tromey.com> * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
2018-07-04darwin: Don't use sbrkSimon Marchi5-4/+20
This patch gets rid of this warning on macOS: CXX main.o /Users/simark/src/binutils-gdb/gdb/main.c:492:27: error: 'sbrk' is deprecated [-Werror,-Wdeprecated-declarations] lim_at_start = (char *) sbrk (0); ^ /usr/include/unistd.h:585:1: note: 'sbrk' has been explicitly marked deprecated here __deprecated __WATCHOS_PROHIBITED __TVOS_PROHIBITED ^ /usr/include/sys/cdefs.h:176:37: note: expanded from macro '__deprecated' #define __deprecated __attribute__((deprecated)) ^ sbrk on macOS is not useful for our purposes, since sbrk(0) always returns the same value. From what I read, brk/sbrk on macOS is just an emulation, it always returns a pointer in a 4MB section reserved for that. So instead of letting users use "maint set per-command space on" and print silly results, I think we should just disable that feature for this platform (as we do for platforms that don't have sbrk). I defined a HAVE_USEFUL_SBRK macro and used that instead of HAVE_SBRK. gdb/ChangeLog: * common/common-defs.h (HAVE_USEFUL_SBRK): Define. * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK. * maint.c: Likewise. * top.c: Likewise.
2018-07-04Update NEWS post GDB 8.2 branch creation.Joel Brobecker2-1/+9
gdb/ChangeLog: * NEWS: Create a new section for the next release branch. Rename the section of the current branch, now that it has been cut.
2018-07-04Bump version to 8.2.50.DATE-git.Joel Brobecker2-1/+6
Now that the GDB 8.2 branch has been created, we can bump the version number. gdb/ChangeLog: GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e): * version.in: Bump version to 8.2.50.DATE-git.
2018-07-04Warn if /proc is not accessiblegdb-8.2-branchpointVyacheslav Barinov6-5/+45
There's a buildroot where I want to debug a binary, and I tried to connect to it from outside, but got very weird errors like architecture mismatch or protocol errors. At last, after switching on '--debug' for gdbserver I found a message 'Can't open /proc/pid/' message and suddenly found that I forgot to mount procfs in my buildroot. Make discovering the problem easier by making GDB / GDBserver warn (even without --debug) if /proc can not be accessed. Native debugging: (gdb) start Temporary breakpoint 1 at 0x400835: file test.c, line 10. Starting program: /tmp/test warning: /proc is not accessible. GDBserver/remote debugging: $ ./gdbserver :9999 ./gdbserver gdbserver: /proc is not accessible. gdb/ChangeLog: 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com> Pedro Alves <palves@redhat.com> * linux-nat.c (linux_init_ptrace): Rename to ... (linux_init_ptrace_procfs): ... this. Call linux_proc_init_warnings. (linux_nat_target::post_attach) (linux_nat_target::post_startup_inferior): Adjust. * nat/linux-procfs.c (linux_proc_init_warnings): Define function. * nat/linux-procfs.h (linux_proc_init_warnings): Declare function. gdb/gdbserver/ChangeLog: 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com> Pedro Alves <palves@redhat.com> * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2018-07-04ld: Set non_ir_ref_regular for --undefined SYMBOLH.J. Lu6-7/+26
Set non_ir_ref_regular to TRUE for symbols forced into the output file so that they won't be removed by garbage collection with LTO. PR ld/23309 * ldlang.c (insert_undefined): Set non_ir_ref_regular to TRUE. * plugin.c (is_visible_from_outside): Don't scan entry_symbol. * testsuite/ld-plugin/pr23309.c: New file. * testsuite/ld-plugin/pr23309.d: Likewise.
2018-07-04ld: Properly display default for -z separate-codeH.J. Lu2-0/+13
Check DEFAULT_LD_Z_SEPARATE_CODE to display default for -z separate-code. PR ld/23358 * lexsup.c (elf_shlib_list_options): Properly display default for -z separate-code.