aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-01-23Simplify some Rust expression-evaluation codeTom Tromey2-54/+29
A few Rust operations do a bit of work in their 'evaluate' functions and then call another function -- but are also the only caller. This patch simplifies this code by removing the extra layer. Tested on x86-64 Fedora 34. I'm checking this in.
2022-01-23bfd: Partially revert commit 0e3839bde6fH.J. Lu2-62/+64
Partially revert commit 0e3839bde6f93e1e3eefce815be3636e3d81054d Author: H.J. Lu <hjl.tools@gmail.com> Date: Sun Jan 23 07:29:27 2022 -0800 bfd: Properly install library and header files PR binutils/28807 * Makefile.am: Revert bfdlib_LTLIBRARIES and bfdinclude_HEADERS changes. * Makefile.in: Regenerate.
2022-01-23bfd: Properly install library and header filesH.J. Lu3-72/+64
Rename bfdlib_LTLIBRARIES and bfdinclude_HEADERS to lib_LTLIBRARIES and include_HEADERS to fix the missing installed library and header files in bfd caused by commit bd32be01c997f686ab0b53f0640eaa0aeb61fbd3 Author: Mike Frysinger <vapier@gentoo.org> Date: Fri Dec 3 00:23:20 2021 -0500 bfd: merge doc subdir up a level PR binutils/28807 * Makefile.am (bfdlib_LTLIBRARIES): Renamed to ... (lib_LTLIBRARIES): This. (bfdinclude_HEADERS): Renamed to ... (include_HEADERS): This. * Makefile.in: Regenerate. * doc/local.mk (install): Removed.
2022-01-23Regenerate Makefile.in files with automake 1.15.1H.J. Lu8-8/+0
Regenerate Makefile.in files with the unmodified automake 1.15.1 to remove runstatedir = @runstatedir@ bfd/ * Makefile.in: Regenerate. binutils/ * Makefile.in: Regenerate. gas/ * Makefile.in: Regenerate. gold/ * Makefile.in: Regenerate. * testsuite/Makefile.in: Likewise. gprof/ * Makefile.in: Regenerate. ld/ * Makefile.in: Regenerate. opcodes/ * Makefile.in: Regenerate.
2022-01-23Regenerate configure files with autoconf 2.69H.J. Lu7-103/+19
Regenerate configure files with the unmodified autoconf 2.69 to remove --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] bfd/ * configure: Regenerate. binutils/ * configure: Regenerate. gas/ * configure: Regenerate. gold/ * configure: Regenerate. gprof/ * configure: Regenerate. ld/ * configure: Regenerate. opcodes/ * configure: Regenerate.
2022-01-23Automatic date update in version.inGDB Administrator1-1/+1
2022-01-22bfd: merge doc subdir up a levelMike Frysinger7-1158/+628
This avoids a recursive make into the doc subdir and speeds up the build slightly. It also allows for more parallelism.
2022-01-22bfd: rename core.texi to corefile.texiMike Frysinger4-10/+4
This is a generated file name from a correspondingly named C file. Rename it to avoid unique build rules since there's no difference to the generated manual.
2022-01-22bfd: replace doc header generation with pattern rulesMike Frysinger2-156/+12
This unifies boilerplate rules for most files with pattern rules.
2022-01-22Allow inferring tmp_prefix from the dll name from a def file.Martin Storsj?2-17/+22
2022-01-22Adjust default page sizes for haiku arm.Alexander von Gluck IV3-3/+9
* configure.tgt (arm-haiku): Fix typo. * emulparams/armelf_haiku.su (MAXPAGESIZE): Use the default value. (COMMONPAGESIZE): Likewise.
2022-01-22Update release makeing script with new release numbersNick Clifton1-16/+19
2022-01-22Change version number to 2.38.50 and regenerate filesNick Clifton25-2296/+2660
2022-01-22Add markers for 2.38 branchNick Clifton18-0/+63
2022-01-22RISC-V: create new frag after alignment.Lifang Xia1-0/+6
PR 28793: The alignment may be removed in linker. We need to create new frag after alignment to prevent the assembler from computing static offsets. gas/ * config/tc-riscv.c (riscv_frag_align_code): Create new frag.
2022-01-22Automatic date update in version.inGDB Administrator1-1/+1
2022-01-21gdb: include gdbsupport/buildargv.h in ser-mingw.cSimon Marchi1-0/+1
Fixes: CXX ser-mingw.o /home/simark/src/binutils-gdb/gdb/ser-mingw.c: In function ‘int pipe_windows_open(serial*, const char*)’: /home/simark/src/binutils-gdb/gdb/ser-mingw.c:870:3: error: ‘gdb_argv’ was not declared in this scope 870 | gdb_argv argv (name); | ^~~~~~~~ Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28802 Change-Id: I7f3e8ec5f9ca8582d587545fdf6b69901259f199
2022-01-21Updated Serbian translation for the ld sub-directoryNick Clifton2-1989/+2270
2022-01-21gdb/doc: fill in two missing @rAndrew Burgess1-2/+2
I noticed two places in the docs where we appear to be missing @r. makeinfo seems to do the correct things despite these being missing (at least, I couldn't see any difference in the pdf or info output), but it doesn't hurt to have the @r in place.
2022-01-21drop old unused stamp-h.in fileMike Frysinger6-6/+0
This was needed by ancient versions of automake, but that hasn't been the case since at least automake-1.5, so punt this from the tree.
2022-01-20gdbsupport/gdb_regex.cc: replace defs.h include with common-defs.hSimon Marchi1-1/+1
This was forgotten when gdb_regex was moved from gdb to gdbsupport. Change-Id: I73b446f71861cabbf7afdb7408ef9d59fa64b804
2022-01-21Automatic date update in version.inGDB Administrator1-1/+1
2022-01-20Avoid bad breakpoints with --gc-sectionsTom Tromey5-2/+109
We found a case where --gc-sections can cause gdb to set an invalid breakpoint. In the included test case, gdb will set a breakpoint with two locations, one of which is 0x0. The code in lnp_state_machine::check_line_address is intended to filter out this sort of problem, but in this case, the entire CU is empty, causing unrelocated_lowpc==0x0 -- which circumvents the check. It seems to me that if a CU is empty like this, then it is ok to simply ignore the line table, as there won't be any locations anyway.
2022-01-20Automatic date update in version.inGDB Administrator1-1/+1
2022-01-19Add `set print array-indexes' tests for C/C++ arraysMaciej W. Rozycki3-0/+217
Add `set print array-indexes' tests for C/C++ arrays, complementing one for Fortran arrays.
2022-01-19Respect `set print array-indexes' with Fortran arraysMaciej W. Rozycki5-27/+279
Add `set print array-indexes' handling for Fortran arrays. Currently the setting is ignored and indices are never shown. Keep track of the most recent index handled so that any outstanding repeated elements printed when the limit set by `set print elements' is hit have the correct index shown. Output now looks like: (gdb) set print array-indexes on (gdb) print array_1d $1 = ((-2) = 1, (-1) = 1, (0) = 1, (1) = 1, (2) = 1) (gdb) set print repeats 4 (gdb) set print elements 12 (gdb) print array_2d $2 = ((-2) = ((-2) = 2, <repeats 5 times>) (-1) = ((-2) = 2, <repeats 5 times>) (0) = ((-2) = 2, (-1) = 2, ...) ...) (gdb) for a 5-element vector and a 5 by 5 array filled with the value of 2.
2022-01-19Add `set print repeats' tests for C/C++ arraysMaciej W. Rozycki4-0/+243
Add `set print repeats' tests for C/C++ arrays, complementing one for Fortran arrays and covering the different interpretation of the `set print elements' setting in particular where the per-dimension count of the elements handled is matched against the trigger rather than the total element count as with Fortran arrays.
2022-01-19Respect `set print repeats' with Fortran arraysMaciej W. Rozycki8-28/+572
Implement `set print repeats' handling for Fortran arrays. Currently the setting is ignored and always treated as if no limit was set. Unlike the generic array walker implemented decades ago the Fortran one is a proper C++ class. Rather than trying to mimic the old walker then, which turned out a bit of a challenge where interacting with the `set print elements' setting, write it entirely from scratch, by adding an extra specialization handler method for processing dimensions other than the innermost one and letting the specialization class call the `walk_1' method from the handler as it sees fit. This way repeats can be tracked and the next inner dimension recursed into as a need arises only, or unconditionally in the base class. Keep track of the dimension number being handled in the class rather as a parameter to the walker so that it does not have to be passed across by the specialization class. Use per-dimension element count tracking, needed to terminate processing early when the limit set by `set print elements' is hit. This requires extra care too where the limit triggers exactly where another element that is a subarray begins. In that case rather than recursing we need to terminate processing or lone `(...)' would be printed. Additionally if the skipped element is the last one in the current dimension we need to print `...' by hand, because `continue_walking' won't print it at the upper level, because it can see the last element has already been taken care of. Preserve the existing semantics of `set print elements' where the total count of the elements handled is matched against the trigger level which is unlike with the C/C++ array printer where the per-dimension element count is used instead. Output now looks like: (gdb) set print repeats 4 (gdb) print array_2d $1 = ((2, <repeats 5 times>) <repeats 5 times>) (gdb) set print elements 12 (gdb) print array_2d $2 = ((2, <repeats 5 times>) (2, <repeats 5 times>) (2, 2, ...) ...) (gdb) for a 5 by 5 array filled with the value of 2. Amend existing test cases accordingly that rely on the current incorrect behavior and explicitly request that there be no limit for printing repeated elements there. Add suitable test cases as well covering sliced arrays in particular. Co-Authored-By: Andrew Burgess <andrew.burgess@embecosm.com>
2022-01-19fbsd-nat: Add include for gdb_argv.John Baldwin1-0/+1
2022-01-19PowerPC64 DT_RELR ELFv1Alan Modra1-14/+14
More fun with R_PPC64_NONE found in .opd. Fixed by the allocate_dynrelocs and ppc64_elf_size_dynamic_sections changes, and since we are doing ifunc, opd and SYMBOL_REFERENCES_LOCAL tests later, don't duplicate that work in check_relocs. * elf64-ppc.c (ppc64_elf_check_relocs): Remove opd and ifunc conditions for rel_count. (dec_dynrel_count): Likewise. (allocate_dynrelocs): Test for opd and ifunc when allocating relative relocs. (ppc64_elf_size_dynamic_sections): Likewise.
2022-01-19PowerPC64 DT_RELR local PLTAlan Modra1-1/+2
Similarly to the local GOT case. * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate space for PLT relocs against local syms when enable_dt_relr.
2022-01-19PowerPC64 DT_RELR local GOTAlan Modra1-4/+6
Fixes another case where we end up with superfluous R_PPC64_NONE. * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate space for GOT relocs against non-TLS local syms when enable_dt_relr. (ppc64_elf_layout_multitoc): Likewise.
2022-01-19Automatic date update in version.inGDB Administrator1-1/+1
2022-01-19Re: PowerPC64 DT_RELRAlan Modra1-5/+3
HJ: "There are 238 R_PPC64_NONEs in libc.so.6 alone." Indeed, let's make them go away. I had the SYMBOL_REFERENCES_LOCAL test in the wrong place. check_relocs is too early to know whether a symbol is dynamic in a shared library. Lots of glibc symbols are made local by version script, but that doesn't happen until size_dynamic_sections. * elf64-ppc.c (ppc64_elf_check_relocs): Don't count relative relocs here depending on SYMBOL_REFERENCES_LOCAL. (dec_dynrel_count): Likewise. (allocate_dynrelocs): Do so here instead.
2022-01-18Fix the remote-sim.c buildTom Tromey1-0/+1
My earlier patch to move gdb_argv broke the remote-sim.c build. This patch fixes the bug. I'm checking it in.
2022-01-18gdbserver: introduce remote_debug_printfSimon Marchi5-97/+48
Add remote_debug_printf, and use it for all debug messages controlled by remote_debug. Change remote_debug to be a bool, which is trivial in this case. Change-Id: I90de13cb892faec3830047b571661822b126d6e8
2022-01-18gdbserver: introduce threads_debug_printf, THREADS_SCOPED_DEBUG_ENTER_EXITSimon Marchi13-798/+483
Add the threads_debug_printf and THREADS_SCOPED_DEBUG_ENTER_EXIT, which use the logging infrastructure from gdbsupport/common-debug.h. Replace all debug_print uses that are predicated by debug_threads with threads_dethreads_debug_printf. Replace uses of the debug_enter and debug_exit macros with THREADS_SCOPED_DEBUG_ENTER_EXIT, which serves essentially the same purpose, but allows showing what comes between the enter and the exit in an indented form. Note that "threads" debug is currently used for a bit of everything in GDBserver, not only threads related stuff. It should ideally be cleaned up and separated logically as is done in GDB, but that's out of the scope of this patch. Change-Id: I2d4546464462cb4c16f7f1168c5cec5a89f2289a
2022-01-18gdbserver: turn debug_threads into a booleanSimon Marchi5-17/+11
debug_threads is always used as a boolean. Except in ax.cc and tracepoint.cc. These files have their own macros that use debug_threads, and have a concept of verbosity level. But they both have a single level, so it's just a boolean in the end. Remove this concept of level. If we ever want to re-introduce it, I think it will be better implemented in a more common location. Change debug_threads to bool and adjust some users that were treating it as an int. Change-Id: I137f596eaf763a08c977dd74417969cedfee9ecf
2022-01-18Simplify Ada catchpointsTom Tromey1-65/+3
All the Ada catchpoints use the same breakpoint_ops contents, because the catchpoint itself records its kind. This patch simplifies the code by removing the redundant ops structures.
2022-01-18Move "catch exec" to a new fileTom Tromey3-191/+237
The "catch exec" code is reasonably self-contained, and so this patch moves it out of breakpoint.c (the second largest source file in gdb) and into a new file, break-catch-exec.c.
2022-01-18Move "catch fork" to a new fileTom Tromey3-243/+287
The "catch fork" code is reasonably self-contained, and so this patch moves it out of breakpoint.c (the second largest source file in gdb) and into a new file, break-catch-fork.c.
2022-01-18Unify "catch fork" and "catch vfork"Tom Tromey1-142/+41
I noticed that "catch fork" and "catch vfork" are nearly identical. This patch simplifies the code by unifying these two cases.
2022-01-18Move gdb_regex to gdbsupportTom Tromey29-34/+36
This moves the gdb_regex convenience class to gdbsupport.
2022-01-18Introduce gdb-hashtab module in gdbsupportTom Tromey10-59/+110
gdb has some extensions and helpers for working with the libiberty hash table. This patch consolidates these and moves them to gdbsupport.
2022-01-18Move gdb obstack code to gdbsupportTom Tromey63-69/+72
This moves the gdb-specific obstack code -- both extensions like obconcat and obstack_strdup, and things like auto_obstack -- to gdbsupport.
2022-01-18Move gdb_argv to gdbsupportTom Tromey18-185/+220
This moves the gdb_argv class to a new header in gdbsupport.
2022-01-18Simplify event_location_probeTom Tromey3-23/+16
event_location_probe currently stores two strings, but really only needs one. This patch simplifies it and removes some unnecessary copies as well.
2022-01-18Use std::string in event_locationTom Tromey2-39/+34
This changes event_location to use std::string, removing some manual memory management, and an unnecessary string copy.
2022-01-18Split event_location into subclassesTom Tromey1-239/+281
event_location uses the old C-style discriminated union approach. However, it's better to use subclassing, as this makes the code clearer and removes some chances for error. This also enables future cleanups to avoid manual memory management and copies.
2022-01-18Remove EL_* macros from location.cTom Tromey1-93/+90
This patch removes the old-style EL_* macros from location.c. This cleans up the code by itself, IMO, but also enables further cleanups in subsequent patches.