aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-01-03Do not use PyObject_CallNoArgsTom Tromey1-2/+2
PyObject_CallNoArgs was introduced in Python 3.9, so avoid it in favor of PyObject_CallObject.
2023-01-03Fix a potential problem in the BFD library when accessing the Windows' nul ↵Himal2-0/+11
device driver. PR 29947 * bfdio.c (_bfd_real_fopen): Do not add a prefix to the Windows' nul device filename.
2023-01-03Fix a translation problem in the x86 assembler.Nick Clifton2-7/+25
PR 29952 * config/tc-i386.c (md_assemble): Avoid constructing translatable strings.
2023-01-03Updated translations for various languages and sub-directoriesNick Clifton23-17502/+18901
2023-01-03Add new NT_ARM_ZA and NT_ARM_SSVE register set constants.Luis Machado4-0/+18
2023-01-03[gdb] Fix segfault during inferior call to ifuncAndrew Burgess2-2/+10
With a simple test-case: ... $ cat test.c char *p = "a"; int main (void) { return strlen (p); } $ gcc -g test.c ... we run into this segfault: ... $ gdb -q -batch a.out -ex start -ex "p strlen (p)" Temporary breakpoint 1 at 0x1151: file test.c, line 4. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Temporary breakpoint 1, main () at test.c:4 4 return strlen (p); Fatal signal: Segmentation fault ... The strlen is an ifunc, and consequently during the call to call_function_by_hand_dummy for "p strlen (p)" another call to call_function_by_hand_dummy is used to resolve the ifunc. This invalidates the get_current_frame () result in the outer call. Fix this by using prepare_reinflate and reinflate. Note that this series ( https://inbox.sourceware.org/gdb-patches/20221214033441.499512-1-simon.marchi@polymtl.ca/ ) should address this problem, but this patch is a simpler fix which is easy to backport. Tested on x86_64-linux. Co-Authored-By: Tom de Vries <tdevries@suse.de> PR gdb/29941 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29941
2023-01-02sim: sh: move some generated source files to built sourcesMike Frysinger2-13/+20
This should have been part of the previous commit 80636a54bcfa2bca3dc8f ("sim: build: move generated headers to built sources"), but they were missed because they're .c files effectively treated as .h files.
2023-01-02sim: build: add var for tracking sim enable directlyMike Frysinger2-34/+69
Rather than rely on SIM_SUBDIRS being set, add a dedicated variable to track whether to enable the sim. While the current code works fine, it won't work as we remove the recursive make logic (i.e. the SIM_SUBDIRS variable).
2023-01-02sim: common: drop libcommon.a linkageMike Frysinger2-8/+3
All of these objects should be in libsim.a already, so don't link to it too. In practice it never gets used, but no point in listing it.
2023-01-02sim: build: move generated headers to built sourcesMike Frysinger14-123/+189
Automake's automatic header deptracking has a bootstrap problem where it can't detect generated headers when compiling. We've been handling that by adding a custom SIM_ALL_RECURSIVE_DEPS variable, but that only works when building objects recursively in subdirs. As we move those out to the top-level, we don't have any recursive steps anymore. The Automake approach is to declare those headers in BUILT_SOURCES. This isn't completely foolproof as the Automake manual documents: it only activates for `make all`, not `make foo.o`, but that shouldn't be a huge limitation as it only affects the initial compile. After that, rebuilds should work fine.
2023-01-02sim: cgen: drop common subdir build rulesMike Frysinger2-74/+0
Now that everything has been hoisted to the top-level, we can delete this unused logic.
2023-01-02sim: or1k: hoist cgen rules to top-levelMike Frysinger3-34/+21
2023-01-02sim: m32r: hoist cgen rules to top-levelMike Frysinger3-48/+37
2023-01-02sim: lm32: hoist cgen rules to top-levelMike Frysinger3-22/+21
2023-01-02sim: iq2000: hoist cgen rules to top-levelMike Frysinger3-26/+21
2023-01-02sim: frv: hoist cgen rules to top-levelMike Frysinger3-24/+21
2023-01-02sim: cris: hoist cgen rules to top-levelMike Frysinger3-33/+33
2023-01-02sim: bpf: hoist cgen rules to top-levelMike Frysinger3-90/+67
2023-01-02sim: cgen: hoist rules to the top-level buildMike Frysinger2-0/+113
The rules seem to generate the same output as existing subdir cgen rules with cgen ports, so hopefully this should be correct. These are the last set of codegen rules that we run in subdirs, so this will help unblock killing off subdir builds entirely.
2023-01-02sim: build: use Automake include varsMike Frysinger4-14/+4
Rather than define our own hack for emitting an include statement, use the existing Automake include variables. These have the nice side-effect of being more portable.
2023-01-03Automatic date update in version.inGDB Administrator1-1/+1
2023-01-02Simplify debug_expTom Tromey1-1/+1
debug_exp should call expression::dump rather than using the 'op' member.
2023-01-02Initial implementation of Debugger Adapter ProtocolTom Tromey26-2/+2297
The Debugger Adapter Protocol is a JSON-RPC protocol that IDEs can use to communicate with debuggers. You can find more information here: https://microsoft.github.io/debug-adapter-protocol/ Frequently this is implemented as a shim, but it seemed to me that GDB could implement it directly, via the Python API. This patch is the initial implementation. DAP is implemented as a new "interp". This is slightly weird, because it doesn't act like an ordinary interpreter -- for example it doesn't implement a command syntax, and doesn't use GDB's ordinary event loop. However, this seemed like the best approach overall. To run GDB in this mode, use: gdb -i=dap The DAP code will accept JSON-RPC messages on stdin and print responses to stdout. GDB redirects the inferior's stdout to a new pipe so that output can be encapsulated by the protocol. The Python code uses multiple threads to do its work. Separate threads are used for reading JSON from the client and for writing JSON to the client. All GDB work is done in the main thread. (The first implementation used asyncio, but this had some limitations, and so I rewrote it to use threads instead.) This is not a complete implementation of the protocol, but it does implement enough to demonstrate that the overall approach works. There is a rudimentary test suite. It uses a JSON parser written in pure Tcl. This parser is under the same license as Tcl itself, so I felt it was acceptable to simply import it into the tree. There is also a bit of documentation -- just documenting the new interpreter name.
2023-01-02Fix target remote pipe command for MinGWJonas Hoerberg1-0/+6
The cced7cacecad104fff0 ("gdb: preserve `|` in connection details string") commit added '|' detection and removal to ser-pipe.c, but missed to add it to ser-mingw.c. This results in the error message below for MinGW hosts: error starting child process '| <executable> <args>': CreateProcess: No such file or directory This commit add the missing '|' detection and removal to ser-mingw.c.
2023-01-02Remove target: prefix from gdb_sysroot in find_separate_debug_fileTom Tromey1-12/+25
I noticed that, when using gdbserver, gdb might print: Reading /usr/lib/debug/lib64//libcap.so.2.48-2.48-4.fc36.x86_64.debug from remote target... Reading target:/usr/lib/debug/lib64//libcap.so.2.48-2.48-4.fc36.x86_64.debug from remote target... The second line has the "target:" prefix, but from the code it's clear that this string is being passed verbatim to gdbserver -- which seems wrong. I filed PR remote/29929 for this. The problem here is that find_separate_debug_file uses gdb_sysroot without checking to see if it starts with the "target:" prefix. This patch changes this code to be a little more careful. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29929
2023-01-02[gdb/testsuite] Fix gdb.python/py-breakpoint.exp with libstdc++ debug infoTom de Vries1-1/+2
On x86_64-linux, I run into: ... (gdb) python hbp1 = gdb.Breakpoint("add", type=gdb.BP_HARDWARE_BREAKPOINT)^M Hardware assisted breakpoint 2 at 0x40072e: add. (7 locations)^M (gdb) FAIL: gdb.python/py-breakpoint.exp: test_hardware_breakpoints: \ Set hardware breakpoint ... due to libstdc++ debug info: ... $ gdb -q -batch outputs/gdb.python/py-breakpoint/py-breakpoint \ -ex start \ -ex "b add" \ -ex "info break" Temporary breakpoint 1 at 0x40076a: file py-breakpoint.c, line 50. Temporary breakpoint 1, main (argc=1, argv=$hex) at py-breakpoint.c:50 50 int foo = 5; Breakpoint 2 at 0x40072e: add. (7 locations) Num Type Disp Enb Address What 2 breakpoint keep y <MULTIPLE> 2.1 y 0x000000000040072e in add(int) at \ py-breakpoint.c:39 2.2 y 0x00007ffff7b131de in \ (anonymous namespace)::fast_float::bigint::add at \ ../../../../../libstdc++-v3/src/c++17/fast_float/fast_float.h:1815 ... 2.7 y 0x00007ffff7b137e4 in \ (anonymous namespace)::fast_float::bigint::add at \ ../../../../../libstdc++-v3/src/c++17/fast_float/fast_float.h:1815 ... Fix this by using qualified=True. Tested on x86_64-linux. PR testsuite/29910 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29910
2023-01-01sim: replace -I$srcroot/bfd include with -I$srcrootMike Frysinger11-13/+13
Clean up includes a bit by making ports include bfd/ headers explicitly. This matches other projects, and makes it more clear where these headers are coming from.
2023-01-01sim: replace -I$srcroot/opcodes include with -I$srcrootMike Frysinger12-19/+19
Clean up includes a bit by making ports include opcodes/ headers explicitly. This matches other projects, and makes it more clear where these headers are coming from.
2023-01-02obsolete target tidyAlan Modra45-1048/+32
Delete a few files only used for obsolete targets, and tidy config, xfails and other pieces of support specific to those targets. And since I was editing target triplets in test files, fix the nm alpha-linuxecoff fails.
2023-01-02Automatic date update in version.inGDB Administrator1-1/+1
2023-01-01sim: build: drop unused SIM_EXTRA_LIBSMike Frysinger3-6/+1
Now that all run binaries are linked in the topdir, this subdir libs variable isn't used anywhere, so punt it.
2023-01-01sim: erc32: drop -I$(srcroot)Mike Frysinger1-1/+1
Since the port doesn't actually use this include, drop it. No other port is doing this either.
2023-01-01sim: drop mention of & support for subdir configureMike Frysinger3-105/+2
Now that no ports use these common configure APIs, delete the logic and remove it from the documentation.
2023-01-01sim: refresh copyright dates a bitMike Frysinger6-7/+7
Update a few files that were missed, and revert the generated Automake output that uses dates from Automake itself.
2023-01-01sim: or1k: drop unused rulesMike Frysinger1-12/+0
These rules are the same as the common ones, so drop them to simplify.
2023-01-01sim: iq2000: drop unused cpu define logicMike Frysinger1-6/+0
These defines seem to have been added in anticipation of adding another cpu port (IQ10BF?), but that was over 20 years ago, and that port has yet to materialize. So drop these compile flags since they don't do anything to the generated code. If another port ever shows up, it's easy enough to readd things as needed.
2023-01-01manual copyright year range of various GDB files to add 2023Joel Brobecker3-5/+5
This commit updates the following file... gdb/doc/gdb.texinfo gdb/doc/refcard.tex gdb/syscalls/update-netbsd.sh ... by hand as instructed by the gdb/copyright.py script. The update by hand is needed because the copyright headers to update are actually nested inside those files, rather than located at the start of the file.
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker7045-7045/+7045
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2023-01-01gdb/copyright.py: Adjust following rename of sim/ppc/ppc-instructions...Joel Brobecker1-1/+1
... to sim/ppc/powerpc.igen This file is in the NOT_FSF_LIST because this file has a copyright which is not assigned to the FSF. Since the file got renamed, the corresponding entry in NOT_FSF_LIST needs to be renamed as well.
2023-01-01Update copyright year in help message of gdb, gdbserver, gdbreplayJoel Brobecker3-6/+6
This commit updates the copyright year displayed by gdb, gdbserver and gdbreplay's help message from 2022 to 2023, as per our Start of New Year procedure. The corresponding source files' copyright header are also updated accordingly.
2023-01-01Update year range in gprofng copyright noticesAlan Modra286-287/+288
This adds 'Innovative Computing Labs' as an external author to update-copyright.py, to cover the copyright notice in gprofng/common/opteron_pcbe.c, and uses that plus another external author 'Oracle and' to update gprofng copyright dates. I'm not going to commit 'Oracle and' as an accepted author, but that covers the string "Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved." found in gprofng/testsuite/gprofng.display/jsynprog files.
2023-01-01Update year range in copyright notice of binutils filesAlan Modra2786-3123/+3125
The newer update-copyright.py fixes file encoding too, removing cr/lf on binutils/bfdtest2.c and ld/testsuite/ld-cygwin/exe-export.exp, and embedded cr in binutils/testsuite/binutils-all/ar.exp string match.
2023-01-01Update etc/update-copyright.pyAlan Modra1-11/+33
This picks up some improvements from gcc/contrib. exceptions must derive from BaseException, port to python3, retain original file mode, fix name of script in examples. Adds libsframe to list of default dirs. I would have added gprofng too but there are some files claiming copyright by authors other than the Free Software Foundation.
2023-01-01Automatic date update in version.inGDB Administrator1-1/+1
2022-12-31Update version numbers in howto-make-a-release documentNick Clifton1-5/+22
2022-12-31Update version number and regenerate filesNick Clifton17-8691/+9617
2022-12-31Add markers for 2.40 branchNick Clifton18-3/+61
2022-12-31sync libiberty sources with gcc mainlineNick Clifton9-111/+737
2022-12-31[gdb/cli] Add maintenance ignore-probesTom de Vries4-0/+145
There's a command "disable probes", but SystemTap probes, for instance libc:longjmp cannot be disabled: ... $ gdb -q -batch a.out -ex start -ex "disable probes libc ^longjmp$" ... Probe libc:longjmp cannot be disabled. Probe libc:longjmp cannot be disabled. Probe libc:longjmp cannot be disabled. ... Add a command "maintenance ignore-probes" that ignores probes during get_probes, such that we can easily pretend to use a libc without the libc:longjmp probe: ... (gdb) maint ignore-probes -verbose libc ^longjmp$ ignore-probes filter has been set to: PROVIDER: 'libc' PROBE_NAME: '^longjmp$' OBJNAME: '' (gdb) start ^M ... Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M ... The "Ignoring ..." messages can be suppressed by not using -verbose. Note that as with "disable probes", running simply "maint ignore-probes" ignores all probes. The ignore-probes filter can be reset by using: ... (gdb) maint ignore-probes -reset ignore-probes filter has been reset ... For now, the command is only supported for SystemTap probes. PR cli/27159 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27159
2022-12-31ld/testsuite: Don't add index to sizes in pdb.expMark Harmstone1-3/+3