aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2021-11-14Fix build with current GCC: EL_EXPLICIT(location) always non-NULLPedro Alves1-6/+5
Compiling GDB with current GCC (1b4a63593b) runs into this: src/gdb/location.c: In function 'int event_location_empty_p(const event_location*)': src/gdb/location.c:963:38: error: the address of 'event_location::<unnamed union>::explicit_loc' will never be NULL [-Werror=address] 963 | return (EL_EXPLICIT (location) == NULL | ^ src/gdb/location.c:57:30: note: 'event_location::<unnamed union>::explicit_loc' declared here 57 | struct explicit_location explicit_loc; | ^~~~~~~~~~~~ GCC is right, EL_EXPLICIT is defined as returning the address of an union field: /* An explicit location. */ struct explicit_location explicit_loc; #define EL_EXPLICIT(P) (&((P)->u.explicit_loc)) and thus must always be non-NULL. Change-Id: Ie74fee7834495a93affcefce03c06e4d83ad8191
2021-11-14[PR gdb/16238] Add completer for the show user commandLancelot SIX2-1/+143
The 'show user' command (which shows the definition of non-python/scheme user defined commands) is currently missing a completer. This is mentioned in PR 16238. Having one can improve the user experience. In this commit I propose an implementation for such completer as well as the associated tests. Tested on x86_64 GNU/Linux. All feedbacks are welcome. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16238
2021-11-12Fix gdb.base/sigstep.exp test for ppcCarl Love1-1/+11
The test stops at <signal_handler called> which is the call to the handler rather than in the handler as intended. This patch replaces the gdb_test "$enter_cmd to handler" with a gdb_test_multiple test. The multiple test looks for the stop at <signal_handler called>. If found, the command is issued again. The test passes if gdb stops in the handler as expected. (gdb) PASS: gdb.base/sigstep.exp: stepi to handler, nothing in handler, step from handler: continue to signal stepi <signal handler called> 1: x/i $pc => 0x7ffff7f80440 <__kernel_start_sigtramp_rt64>: bctrl (gdb) stepi handler (sig=551) at sigstep.c:32 32 { 1: x/i $pc => 0x10000097c <handler>: addis r2,r12,2 (gdb) PASS: gdb.base/sigstep.exp: stepi to handler, nothing in handler, step from handler: stepi to handler Patch has been tested on x86_64-linux and ppc64le-linux with no test failures.
2021-11-12[gdb/testsuite] Fix regexp in gdb.base/foll-vfork.expTom de Vries1-3/+3
On OBS I ran into: ... (gdb) PASS: gdb.base/foll-vfork.exp: exit: \ vfork relations in info inferiors: continue to child exit info inferiors^M Num Description Connection Executable ^M 1 <null> foll-vfork-exit ^M * 2 <null> foll-vfork-exit ^M (gdb) I'm the proud parent of child #5044!^M FAIL: gdb.base/foll-vfork.exp: exit: vfork relations in info inferiors: \ vfork relation no longer appears in info inferiors (timeout) ... Fix this by removing the '$' anchor in the corresponding '$gdb_prompt $' regexps. Tested on x86_64-linux.
2021-11-11gdb: fix "set scheduler-locking" thread exit hangSimon Marchi3-2/+89
GDB hangs when doing this: - launch inferior with multiple threads - multiple threads hit some breakpoint(s) - one breakpoint hit is presented as a stop, the rest are saved as pending wait statuses - "set scheduler-locking on" - resume the currently selected thread (because of scheduler-locking, it's the only one resumed), let it execute until exit - GDB hangs, not showing the prompt, impossible to interrupt with ^C When the resumed thread exits, we expect the target to return a TARGET_WAITKIND_NO_RESUMED event, and that's what we see: [infrun] fetch_inferior_event: enter [infrun] scoped_disable_commit_resumed: reason=handling event [infrun] random_pending_event_thread: None found. [Thread 0x7ffff7d9c700 (LWP 309357) exited] [infrun] print_target_wait_results: target_wait (-1.0.0 [process -1], status) = [infrun] print_target_wait_results: -1.0.0 [process -1], [infrun] print_target_wait_results: status->kind = no-resumed [infrun] handle_inferior_event: status->kind = no-resumed [infrun] handle_no_resumed: TARGET_WAITKIND_NO_RESUMED (ignoring: found resumed) [infrun] prepare_to_wait: prepare_to_wait [infrun] reset: reason=handling event [infrun] maybe_set_commit_resumed_all_targets: not requesting commit-resumed for target native, no resumed threads [infrun] fetch_inferior_event: exit The problem is in handle_no_resumed: we check if some other thread is actually resumed, to see if we should ignore that event (see comments in that function for more info). If this condition is true: (thread->executing () || thread->has_pending_waitstatus ()) ... then we ignore the event. The problem is that there are some non-resumed threads with a pending event, which makes us ignore the event. But these threads are not resumed, so we end up waiting while nothing executes, hence waiting for ever. My first fix was to change the condition to: (thread->executing () || (thread->resumed () && thread->has_pending_waitstatus ())) ... but then it occured to me that we could simply check for: (thread->resumed ()) Since "executing" implies "resumed", checking simply for "resumed" covers threads that are resumed and executing, as well as threads that are resumed with a pending status, which is what we want. Change-Id: Ie796290f8ae7f34c026ca3a8fcef7397414f4780
2021-11-11[gdb/testsuite] Add gdb.arch/ppc64-break-on-_exit.expTom de Vries4-0/+303
Add a regression test-case for commit a50bdb99afe "[gdb/tdep, rs6000] Don't skip system call in skip_prologue": - set a breakpoint on a local copy of glibc's _exit, and - verify that it triggers. The test-case uses an assembly file by default, but also has the possibility to use a C source file instead. Tested on ppc64le-linux. Verified that the test-case fails without aforementioned commit, and passes with the commit. Both with assembly and C source.
2021-11-10Handle PIE in .debug_loclistsTom Tromey1-16/+15
Simon pointed out that my recent patches to .debug_loclists caused some regressions. After a brief discussion we realized it was because his system compiler defaults to PIE. This patch changes this code to unconditionally apply the text offset here. It also changes loclist_describe_location to work more like dwarf2_find_location_expression. I tested this by running the gdb.dwarf2 tests both with and without -pie.
2021-11-10gdb: adjust x_file fields on COFF readersClément Chigot2-7/+7
Commit e86fc4a5bc37 ("PR 28447: implement multiple parameters for .file on XCOFF") changes the structure associated to the internal representation of files in COFF formats. However, gdb directory update has been forgotten, leading to compilation errors of this kind: CXX coffread.o /home/simark/src/binutils-gdb/gdb/coffread.c: In function 'const char* coff_getfilename(internal_auxent*)': /home/simark/src/binutils-gdb/gdb/coffread.c:1343:29: error: 'union internal_auxent::<unnamed struct>::<unnamed>' has no member named 'x_zeroes' 1343 | if (aux_entry->x_file.x_n.x_zeroes == 0) | ^~~~~~~~ Fix it by adjusting the COFF code in GDB. Change-Id: I703fa134bc722d47515efbd72b88fa5650af6c3c
2021-11-10[gdb/testsuite] Add gdb.opt/break-on-_exit.expTom de Vries2-0/+92
Add a test-case to excercise the problem scenario reported in PR28527 and fixed in commit a50bdb99afe "[gdb/tdep, rs6000] Don't skip system call in skip_prologue": - set a breakpoint on _exit, and - verify that it triggers. Note that this is not a regression test for that commit. Since the actual code in _exit may vary across os instances, we cannot guarantee that the problem will always trigger with this test-case. Rather, this test-case is a version of the original test-case (gdb.threads/process-dies-while-detaching.exp) that is minimal while still reproducing the problem reported in PR28527, in that same setting. The benefit of this test-case is that it exercise real-life code and may expose similar problems in other settings. Also, it provides a much easier test-case to investigate in case a similar problem occurs. Tested on x86_64-linux and ppc64le-linux.
2021-11-09Test case for Bug 28308Kevin Buettner3-0/+159
The purpose of this test is described in the comments in dprintf-execution-x-script.exp. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28308 The name of this new test was based on that of an existing test, bp-cmds-execution-x-script.exp. I started off by copying that test, adding to it, and then rewriting almost all of it. It's different enough that I decided that listing the copyright year as 2021 was sufficient.
2021-11-09Fix PR 28308 - dprintf breakpoints not working when run from scriptKevin Buettner1-11/+3
This commit fixes Bug 28308, titled "Strange interactions with dprintf and break/commands": Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28308 Since creating that bug report, I've found a somewhat simpler way of reproducing the problem. I've encapsulated it into the GDB test case which I've created along with this bug fix. The name of the new test is gdb.base/dprintf-execution-x-script.exp, I'll demonstrate the problem using this test case, though for brevity, I've placed all relevant files in the same directory and have renamed the files to all start with 'dp-bug' instead of 'dprintf-execution-x-script'. The script file, named dp-bug.gdb, consists of the following commands: dprintf increment, "dprintf in increment(), vi=%d\n", vi break inc_vi commands continue end run Note that the final command in this script is 'run'. When 'run' is instead issued interactively, the bug does not occur. So, let's look at the interactive case first in order to see the correct/expected output: $ gdb -q -x dp-bug.gdb dp-bug ... eliding buggy output which I'll discuss later ... (gdb) run Starting program: /mesquite2/sourceware-git/f34-master/bld/gdb/tmp/dp-bug vi=0 dprintf in increment(), vi=0 Breakpoint 2, inc_vi () at dprintf-execution-x-script.c:26 26 in dprintf-execution-x-script.c vi=1 dprintf in increment(), vi=1 Breakpoint 2, inc_vi () at dprintf-execution-x-script.c:26 26 in dprintf-execution-x-script.c vi=2 dprintf in increment(), vi=2 Breakpoint 2, inc_vi () at dprintf-execution-x-script.c:26 26 in dprintf-execution-x-script.c vi=3 [Inferior 1 (process 1539210) exited normally] In this run, in which 'run' was issued from the gdb prompt (instead of at the end of the script), there are three dprintf messages along with three 'Breakpoint 2' messages. This is the correct output. Now let's look at the output that I snipped above; this is the output when 'run' is issued from the script loaded via GDB's -x switch: $ gdb -q -x dp-bug.gdb dp-bug Reading symbols from dp-bug... Dprintf 1 at 0x40116e: file dprintf-execution-x-script.c, line 38. Breakpoint 2 at 0x40113a: file dprintf-execution-x-script.c, line 26. vi=0 dprintf in increment(), vi=0 Breakpoint 2, inc_vi () at dprintf-execution-x-script.c:26 26 dprintf-execution-x-script.c: No such file or directory. vi=1 Breakpoint 2, inc_vi () at dprintf-execution-x-script.c:26 26 in dprintf-execution-x-script.c vi=2 Breakpoint 2, inc_vi () at dprintf-execution-x-script.c:26 26 in dprintf-execution-x-script.c vi=3 [Inferior 1 (process 1539175) exited normally] In the output shown above, only the first dprintf message is printed. The 2nd and 3rd dprintf messages are missing! However, all three 'Breakpoint 2...' messages are still printed. Why does this happen? bpstat_do_actions_1() in gdb/breakpoint.c contains the following comment and code near the start of the function: /* Avoid endless recursion if a `source' command is contained in bs->commands. */ if (executing_breakpoint_commands) return 0; scoped_restore save_executing = make_scoped_restore (&executing_breakpoint_commands, 1); Also, as described by this comment prior to the 'async' field in 'struct ui' in top.h, the main UI starts off in sync mode when processing command line arguments: /* True if the UI is in async mode, false if in sync mode. If in sync mode, a synchronous execution command (e.g, "next") does not return until the command is finished. If in async mode, then running a synchronous command returns right after resuming the target. Waiting for the command's completion is later done on the top event loop. For the main UI, this starts out disabled, until all the explicit command line arguments (e.g., `gdb -ex "start" -ex "next"') are processed. */ This combination of things, the state of the static global 'executing_breakpoint_commands' plus the state of the async field in the main UI causes this behavior. This is a backtrace after hitting the dprintf breakpoint for the second time when doing 'run' from the script file, i.e. non-interactively: Thread 1 "gdb" hit Breakpoint 3, bpstat_do_actions_1 (bsp=0x7fffffffc2b8) at /ironwood1/sourceware-git/f34-master/bld/../../worktree-master/gdb/breakpoint.c:4431 4431 if (executing_breakpoint_commands) #0 bpstat_do_actions_1 (bsp=0x7fffffffc2b8) at gdb/breakpoint.c:4431 #1 0x00000000004d8bc6 in dprintf_after_condition_true (bs=0x1538090) at gdb/breakpoint.c:13048 #2 0x00000000004c5caa in bpstat_stop_status (aspace=0x116dbc0, bp_addr=0x40116e, thread=0x137f450, ws=0x7fffffffc718, stop_chain=0x1538090) at gdb/breakpoint.c:5498 #3 0x0000000000768d98 in handle_signal_stop (ecs=0x7fffffffc6f0) at gdb/infrun.c:6172 #4 0x00000000007678d3 in handle_inferior_event (ecs=0x7fffffffc6f0) at gdb/infrun.c:5662 #5 0x0000000000763cd5 in fetch_inferior_event () at gdb/infrun.c:4060 #6 0x0000000000746d7d in inferior_event_handler (event_type=INF_REG_EVENT) at gdb/inf-loop.c:41 #7 0x00000000007a702f in handle_target_event (error=0, client_data=0x0) at gdb/linux-nat.c:4207 #8 0x0000000000b8cd6e in gdb_wait_for_event (block=block@entry=0) at gdbsupport/event-loop.cc:701 #9 0x0000000000b8d032 in gdb_wait_for_event (block=0) at gdbsupport/event-loop.cc:597 #10 gdb_do_one_event () at gdbsupport/event-loop.cc:212 #11 0x00000000009d19b6 in wait_sync_command_done () at gdb/top.c:528 #12 0x00000000009d1a3f in maybe_wait_sync_command_done (was_sync=0) at gdb/top.c:545 #13 0x00000000009d2033 in execute_command (p=0x7fffffffcb18 "", from_tty=0) at gdb/top.c:676 #14 0x0000000000560d5b in execute_control_command_1 (cmd=0x13b9bb0, from_tty=0) at gdb/cli/cli-script.c:547 #15 0x000000000056134a in execute_control_command (cmd=0x13b9bb0, from_tty=0) at gdb/cli/cli-script.c:717 #16 0x00000000004c3bbe in bpstat_do_actions_1 (bsp=0x137f530) at gdb/breakpoint.c:4469 #17 0x00000000004c3d40 in bpstat_do_actions () at gdb/breakpoint.c:4533 #18 0x00000000006a473a in command_handler (command=0x1399ad0 "run") at gdb/event-top.c:624 #19 0x00000000009d182e in read_command_file (stream=0x113e540) at gdb/top.c:443 #20 0x0000000000563697 in script_from_file (stream=0x113e540, file=0x13bb0b0 "dp-bug.gdb") at gdb/cli/cli-script.c:1642 #21 0x00000000006abd63 in source_gdb_script (extlang=0xc44e80 <extension_language_gdb>, stream=0x113e540, file=0x13bb0b0 "dp-bug.gdb") at gdb/extension.c:188 #22 0x0000000000544400 in source_script_from_stream (stream=0x113e540, file=0x7fffffffd91a "dp-bug.gdb", file_to_open=0x13bb0b0 "dp-bug.gdb") at gdb/cli/cli-cmds.c:692 #23 0x0000000000544557 in source_script_with_search (file=0x7fffffffd91a "dp-bug.gdb", from_tty=1, search_path=0) at gdb/cli/cli-cmds.c:750 #24 0x00000000005445cf in source_script (file=0x7fffffffd91a "dp-bug.gdb", from_tty=1) at gdb/cli/cli-cmds.c:759 #25 0x00000000007cf6d9 in catch_command_errors (command=0x5445aa <source_script(char const*, int)>, arg=0x7fffffffd91a "dp-bug.gdb", from_tty=1, do_bp_actions=false) at gdb/main.c:523 #26 0x00000000007cf85d in execute_cmdargs (cmdarg_vec=0x7fffffffd1b0, file_type=CMDARG_FILE, cmd_type=CMDARG_COMMAND, ret=0x7fffffffd18c) at gdb/main.c:615 #27 0x00000000007d0c8e in captured_main_1 (context=0x7fffffffd3f0) at gdb/main.c:1322 #28 0x00000000007d0eba in captured_main (data=0x7fffffffd3f0) at gdb/main.c:1343 #29 0x00000000007d0f25 in gdb_main (args=0x7fffffffd3f0) at gdb/main.c:1368 #30 0x00000000004186dd in main (argc=5, argv=0x7fffffffd508) at gdb/gdb.c:32 There are two frames for bpstat_do_actions_1(), one at frame #16 and the other at frame #0. The one at frame #16 is processing the actions for Breakpoint 2, which is a 'continue'. The one at frame #0 is attempting to process the dprintf breakpoint action. However, at this point, the value of 'executing_breakpoint_commands' is 1, forcing an early return, i.e. prior to executing the command(s) associated with the dprintf breakpoint. For the sake of comparison, this is what the stack looks like when hitting the dprintf breakpoint for the second time when issuing the 'run' command from the GDB prompt. Thread 1 "gdb" hit Breakpoint 3, bpstat_do_actions_1 (bsp=0x7fffffffccd8) at /ironwood1/sourceware-git/f34-master/bld/../../worktree-master/gdb/breakpoint.c:4431 4431 if (executing_breakpoint_commands) #0 bpstat_do_actions_1 (bsp=0x7fffffffccd8) at gdb/breakpoint.c:4431 #1 0x00000000004d8bc6 in dprintf_after_condition_true (bs=0x16b0290) at gdb/breakpoint.c:13048 #2 0x00000000004c5caa in bpstat_stop_status (aspace=0x116dbc0, bp_addr=0x40116e, thread=0x13f0e60, ws=0x7fffffffd138, stop_chain=0x16b0290) at gdb/breakpoint.c:5498 #3 0x0000000000768d98 in handle_signal_stop (ecs=0x7fffffffd110) at gdb/infrun.c:6172 #4 0x00000000007678d3 in handle_inferior_event (ecs=0x7fffffffd110) at gdb/infrun.c:5662 #5 0x0000000000763cd5 in fetch_inferior_event () at gdb/infrun.c:4060 #6 0x0000000000746d7d in inferior_event_handler (event_type=INF_REG_EVENT) at gdb/inf-loop.c:41 #7 0x00000000007a702f in handle_target_event (error=0, client_data=0x0) at gdb/linux-nat.c:4207 #8 0x0000000000b8cd6e in gdb_wait_for_event (block=block@entry=0) at gdbsupport/event-loop.cc:701 #9 0x0000000000b8d032 in gdb_wait_for_event (block=0) at gdbsupport/event-loop.cc:597 #10 gdb_do_one_event () at gdbsupport/event-loop.cc:212 #11 0x00000000007cf512 in start_event_loop () at gdb/main.c:421 #12 0x00000000007cf631 in captured_command_loop () at gdb/main.c:481 #13 0x00000000007d0ebf in captured_main (data=0x7fffffffd3f0) at gdb/main.c:1353 #14 0x00000000007d0f25 in gdb_main (args=0x7fffffffd3f0) at gdb/main.c:1368 #15 0x00000000004186dd in main (argc=5, argv=0x7fffffffd508) at gdb/gdb.c:32 This relatively short backtrace is due to the current UI's async field being set to 1. Yet another thing to be aware of regarding this problem is the difference in the way that commands associated to dprintf breakpoints versus regular breakpoints are handled. While they both use a command list associated with the breakpoint, regular breakpoints will place the commands to be run on the bpstat chain constructed in bp_stop_status(). These commands are run later on. For dprintf breakpoints, commands are run via the 'after_condition_true' function pointer directly from bpstat_stop_status(). (The 'commands' field in the bpstat is cleared in dprintf_after_condition_true(). This prevents the dprintf commands from being run again later on when other commands on the bpstat chain are processed.) Another thing that I noticed is that dprintf breakpoints are the only type of breakpoint which use 'after_condition_true'. This suggests that one possible way of fixing this problem, that of making dprintf breakpoints work more like regular breakpoints, probably won't work. (I must admit, however, that my understanding of this code isn't complete enough to say why. I'll trust that whoever implemented it had a good reason for doing it this way.) The comment referenced earlier regarding 'executing_breakpoint_commands' states that the reason for checking this variable is to avoid potential endless recursion when a 'source' command appears in bs->commands. We know that a dprintf command is constrained to either 1) execution of a GDB printf command, 2) an inferior function call of a printf-like function, or 3) execution of an agent-printf command. Therefore, infinite recursion due to a 'source' command cannot happen when executing commands upon hitting a dprintf breakpoint. I chose to fix this problem by having dprintf_after_condition_true() directly call execute_control_commands(). This means that it no longer attempts to go through bpstat_do_actions_1() avoiding the infinite recursion check for potential 'source' commands on the command chain. I think it simplifies this code a little bit too, a definite bonus. Summary: * breakpoint.c (dprintf_after_condition_true): Don't call bpstat_do_actions_1(). Call execute_control_commands() instead.
2021-11-09gdb::array_view slicing/container selftest - test std::array tooPedro Alves1-0/+5
Change-Id: I2141b0b8a09f6521a59908599eb5ba1a19b18dc6
2021-11-09gdb.debuginfod/fetch_src_and_symbols.exp: fix when GDB is built with ↵Simon Marchi1-1/+6
AddressSanitizer This test fails for me, showing: ERROR: tcl error sourcing /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp. ERROR: This GDB was configured as follows: configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-auto-load-dir=$debugdir:$datadir/auto-load --with-auto-load-safe-path=$debugdir:$datadir/auto-load ... and much more ... The problem is that TCL's exec throws an error as soon as the exec'ed process outputs on stderr. When GDB is built with ASan, it prints some warnings about pre-existing signal handlers: warning: Found custom handler for signal 7 (Bus error) preinstalled. warning: Found custom handler for signal 8 (Floating point exception) preinstalled. warning: Found custom handler for signal 11 (Segmentation fault) preinstalled. Pass --quiet to GDB to avoid these warnings. Change-Id: I3751d89b9b1df646da19149d7cb86775e2d3e80f
2021-11-09Correctly handle DW_LLE_start_endTom Tromey4-7/+30
When the code to handle DW_LLE_start_end was added (as part of some DWARF 5 work), it was written to add the base address. However, this seems incorrect -- the DWARF standard describes this as an address, not an offset from the base address. This patch changes a couple of spots in dwarf2/loc.c to fix this problem. It then changes decode_debug_loc_addresses to return DEBUG_LOC_OFFSET_PAIR instead, which preserves the previous semantics. This only showed up on the RISC-V target internally, due to the combination of DWARF 5 and a newer version of GCC. I've updated a couple of existing loclists test cases to demonstrate the bug.
2021-11-09Fix build on rhES5Tom Tromey3-0/+24
The rhES5 build failed due to an upstream import a while back. The bug here is that, while the 'personality' function exists, ADDR_NO_RANDOMIZE is only defined in <linux/personality.h>, not <sys/personality.h>. However, <linux/personality.h> does not declare the 'personality' function, and <sys/personality.h> and <linux/personality.h> cannot both be included. This patch restores one of the removed configure checks and updates the code to check it. We had this as a local patch at AdaCore, because it seemed like there was no interest upstream. However, now it turns out that this fixes PR build/28555, so I'm sending it now.
2021-11-08Improve gdb::array_view ctor from contiguous containersLancelot SIX3-4/+25
While reading the interface of gdb::array_view, I realized that the constructor that builds an array_view on top of a contiguous container (such as std::vector, std::array or even gdb::array_view) can be missused. Lets consider the following code sample: struct Parent { Parent (int a): a { a } {} int a; }; std::ostream &operator<< (std::ostream& os, const Parent & p) { os << "Parent {a=" << p.a << "}"; return os; } struct Child : public Parent { Child (int a, int b): Parent { a }, b { b } {} int b; }; std::ostream &operator<< (std::ostream& os, const Child & p) { os << "Child {a=" << p.a << ", b=" << p.b << "}"; return os; } template <typename T> void print (const gdb::array_view<const T> &p) { std::for_each (p.begin (), p.end (), [](const T &p) { std::cout << p << '\n'; }); } Then with the current interface nothinng prevents this usage of array_view to be done: const std::array<Child, 3> elts = { Child {1, 2}, Child {3, 4}, Child {5, 6} }; print_all<Parent> (elts); This compiles fine and produces the following output: Parent {a=1} Parent {a=2} Parent {a=3} which is obviously wrong. There is nowhere in memory a Parent-like object for which the A member is 2 and this call to print_all<Parent> shold not compile at all (calling print_all<Child> is however fine). This comes down to the fact that a Child* is convertible into a Parent*, and that an array view is constructed to a pointer to the first element and a size. The valid type pointed to that can be used with this constructor are restricted using SFINAE, which requires that a pointer to a member into the underlying container can be converted into a pointer the array_view's data type. This patch proposes to change the constraints on the gdb::array_view ctor which accepts a container now requires that the (decayed) type of the elements in the container match the (decayed) type of the array_view being constructed. Applying this change required minimum adjustment in GDB codebase, which are also included in this patch. Tested by rebuilding.
2021-11-08Add a const version of gdb_argv:as_array_viewLancelot SIX1-0/+10
This commits adds const versions for the GET and AS_ARRAX_VIEW methods of gdb_argv. Those methods will be required in the following patch of the series.
2021-11-08gdb: fix nulltr -> nullptr typoSimon Marchi1-1/+1
Change-Id: I04403bd85ec3fa75ea14130d68daba675a2a8aeb
2021-11-08gdb: tweak scoped_disable_commit_resumed uses when resuming all threads in ↵Simon Marchi2-3/+8
non-stop When doing "continue -a" in non-stop mode, each thread is individually resumed while the commit resumed state is enabled. This forces the target to commit each resumption immediately, instead of being able to batch things. The reason is that there is no scoped_disable_commit_resumed around the loop over threads in continue_1, when "non_stop && all_threads" is true. Since the proceed function is called once for each thread, the scoped_disable_commit_resumed in proceed therefore forces commit-resumed between each thread resumption. Add the necessary scoped_disable_commit_resumed in continue_1 to avoid that. I looked at the MI side of things, the function exec_continue, and found that it was correct. There is a similar iteration over threads, and there is a scoped_disable_commit_resumed at the function scope. This is not wrong, but a bit more than we need. The branches that just call continue_1 do not need it, as continue_1 takes care of disabling commit resumed. So, move the scoped_disable_commit_resumed to the inner scope where we iterate on threads and proceed them individually. Here's an example debugging a multi-threaded program attached by gdbserver (debug output trimmed for brevity): $ ./gdb -nx -q --data-directory=data-directory -ex "set non-stop" -ex "tar rem :1234" (gdb) set debug remote (gdb) set debug infrun (gdb) c -a Continuing. [infrun] proceed: enter [infrun] scoped_disable_commit_resumed: reason=proceeding [remote] Sending packet: $vCont;c:p14388.14388#90 [infrun] reset: reason=proceeding [infrun] maybe_set_commit_resumed_all_targets: enabling commit-resumed for target remote [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target remote [infrun] proceed: exit [infrun] proceed: enter [infrun] scoped_disable_commit_resumed: reason=proceeding [remote] Sending packet: $vCont;c:p14388.1438a#b9 [infrun] reset: reason=proceeding [infrun] maybe_set_commit_resumed_all_targets: enabling commit-resumed for target remote [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target remote [infrun] proceed: exit ... and so on for each thread ... Notice how we send one vCont;c for each thread. With the patch applied, we send a single vCont;c at the end: [infrun] scoped_disable_commit_resumed: reason=continue all threads in non-stop [infrun] proceed: enter [infrun] scoped_disable_commit_resumed: reason=proceeding [infrun] reset: reason=proceeding [infrun] proceed: exit [infrun] clear_proceed_status_thread: Thread 85790.85792 [infrun] proceed: enter [infrun] scoped_disable_commit_resumed: reason=proceeding [infrun] reset: reason=proceeding [infrun] proceed: exit ... proceeding threads individually ... [infrun] reset: reason=continue all threads in non-stop [infrun] maybe_set_commit_resumed_all_targets: enabling commit-resumed for target remote [infrun] maybe_call_commit_resumed_all_targets: calling commit_resumed for target remote [remote] Sending packet: $vCont;c#a8 Change-Id: I331dd2473c5aa5114f89854196fed2a8fdd122bb
2021-11-08gdb: make dwarf2_find_containing_comp_unit take a dwarf2_per_bfdSimon Marchi1-14/+16
While reading another patch, I saw that this function didn't need to take a dwarf2_per_objfile, but could take a dwarf2_per_bfd instead. It doesn't change the behavior, but doing this shows that this function is objfile-independent (can work with only the shared per-bfd data). Change-Id: I58f9c9cef6688902e95226480285da2d0005d77f
2021-11-08gdb: remove bpstat typedef, rename bpstats to bpstatSimon Marchi23-117/+115
I don't find that the bpstat typedef, which hides a pointer, is particularly useful. In fact, it confused me many times, and I just see it as something to remember that adds cognitive load. Also, with C++, we might want to be able to pass bpstats objects by const-reference, not necessarily by pointer. So, remove the bpstat typedef and rename struct bpstats to bpstat (since it represents one bpstat, it makes sense that it is singular). Change-Id: I52e763b6e54ee666a9e045785f686d37b4f5f849
2021-11-05Introduce make_unique_xstrndupTom Tromey2-5/+5
This adds a new make_unique_xstrndup function, which is the "n" analogue of make_unique_xstrdup. It also updates a couple existing places to use this function.
2021-11-05Avoid /proc/pid/mem races (PR 28065)Pedro Alves2-191/+147
PR 28065 (gdb.threads/access-mem-running-thread-exit.exp intermittent failure) shows that GDB can hit an unexpected scenario -- it can happen that the kernel manages to open a /proc/PID/task/LWP/mem file, but then reading from the file returns 0/EOF, even though the process hasn't exited or execed. "0" out of read/write is normally what you get when the address space of the process the file was open for is gone, because the process execed or exited. So when GDB gets the 0, it returns memory access failure. In the bad case in question, the process hasn't execed or exited, so GDB fails a memory access when the access should have worked. GDB has code in place to gracefully handle the case of opening the /proc/PID/task/LWP/mem just while the LWP is exiting -- most often the open fails with EACCES or ENOENT. When it happens, GDB just tries opening the file for a different thread of the process. The testcase is written such that it stresses GDB's logic of closing/reopening the /proc/PID/task/LWP/mem file, by constantly spawning short lived threads. However, there's a window where the kernel manages to find the thread, but the thread exits just after and clears its address space pointer. In this case, the kernel creates a file successfully, but the file ends up with no address space associated, so a subsequent read/write returns 0/EOF too, just like if the whole process had execed or exited. This is the case in question that GDB does not handle. Oleg Nesterov gave this suggestion as workaround for that race: gdb can open(/proc/pid/mem) and then read (say) /proc/pid/statm. If statm reports something non-zero, then open() was "successfull". I think that might work. However, I didn't try it, because I realized we have another nasty race that that wouldn't fix. The other race I realized is that because we close/reopen the /proc/PID/task/LWP/mem file when GDB switches to a different inferior, then it can happen that GDB reopens /proc/PID/task/LWP/mem just after a thread execs, and before GDB has seen the corresponding exec event. I.e., we can open a /proc/PID/task/LWP/mem file accessing the post-exec address space thinking we're accessing the pre-exec address space. A few months back, Simon, Oleg and I discussed a similar race: [Bug gdb/26754] Race condition when resuming threads and one does an exec https://sourceware.org/bugzilla/show_bug.cgi?id=26754 The solution back then was to make the kernel fail any ptrace operation until the exec event is consumed, with this kernel commit: commit dbb5afad100a828c97e012c6106566d99f041db6 Author: Oleg Nesterov <oleg@redhat.com> AuthorDate: Wed May 12 15:33:08 2021 +0200 Commit: Linus Torvalds <torvalds@linux-foundation.org> CommitDate: Wed May 12 10:45:22 2021 -0700 ptrace: make ptrace() fail if the tracee changed its pid unexpectedly This however, only applies to ptrace, not to the /proc/pid/mem file opening case. Also, even if it did apply to the file open case, we would want to support current kernels until such a fix is more wide spread anyhow. So all in all, this commit gives up on the idea of only ever keeping one /proc/pid/mem file descriptor open. Instead, make GDB open a /proc/pid/mem per inferior, and keep it open until the inferior exits, is detached or execs. Make GDB open the file right after the inferior is created or is attached to or forks, at which point we know the inferior is stable and stopped and isn't thus going to exec, or have a thread exit, and so the file open won't fail (unless the whole process is SIGKILLed from outside GDB, at which point it doesn't matter whether we open the file). This way, we avoid both races described above, at the expense of using more file descriptors (one per inferior). Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28065 Change-Id: Iff943b95126d0f98a7973a07e989e4f020c29419
2021-11-05gdb/testsuite: use gdb_get_line_numberAndrew Burgess2-18/+4
Replaces a hard coded line number with a use of gdb_get_line_number. I suspect that the line number has, over time, come adrift from where it was supposed to be stopping. When the test was first added, line 770 pointed at the final 'return 0' in function main. Over time, as things have been added, line 770 now points at some random location in the middle of main. So, I've marked the 'return 0' with a comment, and now the test will always stop there. I also removed an old comment from 1997 talking about how these tests will only pass with the HP compiler, followed by an additional comment from 2000 saying that the tests now pass with GCC. I get the same results before and after this change.
2021-11-04gdb: introduce "set index-cache enabled", deprecate "set index-cache on/off"Simon Marchi5-27/+71
The "set index-cache" command is used at the same time as a prefix command (prefix for "set index-cache directory", for example), and a boolean setting for turning the index-cache on and off. Even though I did introduce that, I now don't think it's a good idea to do something non-standard like this. First, there's no dedicated CLI command to show whether the index-cache is enabled, so it has to be custom output in the "show index-cache handler". Also, it means there's no good way a MI frontend can find out if the index-cache is enabled. "-gdb-show index-cache" doesn't show it in the MI output record: (gdb) interpreter-exec mi "-gdb-show index-cache" ~"\n" ~"The index cache is currently disabled.\n" ^done,showlist={option={name="directory",value="/home/simark/.cache/gdb"}} Fix this by introducing "set/show index-cache enabled on/off", regular boolean setting commands. Keep commands "set index-cache on" and "set index-cache off" as deprecated aliases of "set index-cache enabled", with respectively the default arguments "on" and "off". Update tests using "set index-cache on/off" to use the new command. Update the regexps in gdb.base/maint.exp to figure out whether the index-cache is enabled or not. Update the doc to mention the new commands. Change-Id: I7d5aaaf7fd22bf47bd03e0023ef4fbb4023b37b3
2021-11-04gdb: pass/return setting setter/getter scalar values by valueSimon Marchi3-61/+81
The getter and setter in struct setting always receive and return values by const reference. This is not necessary for scalar values (like bool and int), but more importantly it makes it a bit annoying to write a getter, you have to use a scratch static variable or something similar that you can refer to: const bool & my_getter () { static bool value; value = function_returning_bool (); return value; } Change the getter and setter function signatures to receive and return value by value instead of by reference, when the underlying data type is scalar. This means that string-based settings will still use references, but all others will be by value. The getter above would then be re-written as: bool my_getter () { return function_returning_bool (); } This is useful for a patch later in this series that defines a boolean setting with a getter and a setter. Change-Id: Ieca3a2419fcdb75a6f75948b2c920b548a0af0fd
2021-11-04gdb: remove command_class enum class_deprecatedSimon Marchi2-6/+1
The class_deprecated enumerator isn't assigned anywhere, so remove it. Commands that are deprecated have cmd_list_element::cmd_deprecated set instead. Change-Id: Ib35e540915c52aa65f13bfe9b8e4e22e6007903c
2021-11-04gdb: remove unnecessary cmd_list_element::aliases nullptr checksSimon Marchi1-17/+11
Remove two unnecessary nullptr checks. If aliases is nullptr, then the for loops will simply be skipped. Change-Id: I9132063bb17798391f8d019af305383fa8e0229f
2021-11-03gdb: fix gnu-nat buildSimon Marchi1-3/+3
When building gnu-nat.c, we get: CXX gnu-nat.o gnu-nat.c: In member function 'virtual void gnu_nat_target::create_inferior(const char*, const string&, char**, int)': gnu-nat.c:2117:13: error: 'struct inf' has no member named 'target_is_pushed' 2117 | if (!inf->target_is_pushed (this)) | ^~~~~~~~~~~~~~~~ gnu-nat.c:2118:10: error: 'struct inf' has no member named 'push_target' 2118 | inf->push_target (this); | ^~~~~~~~~~~ This is because of a confusion between the generic `struct inferior` variable and the gnu-nat-specific `struct inf` variable. Fix by referring to `inferior`, not `inf`. Adjust the comment on top of `struct inf` to clarify the purpose of that type. Co-Authored-By: Andrea Monaco <andrea.monaco@autistici.org> Change-Id: I2fe2f7f6ef61a38d79860fd262b08835c963fc77
2021-11-03gdb/testsuite: set ASAN_OPTIONS=detect_leaks=0 while running testsSimon Marchi1-0/+7
We see some additional failures when running the testsuite against a GDB compiled with ASan, compared to a GDB compiled without ASan. Some of them are caused by the memory leak report shown by the GDB process when it exits, and the fact that it makes it exit with a non-zero exit code. I generally try to remember to set ASAN_OPTIONS=detect_leaks=0 in my environment when running the tests, but I don't always do it. I think it would be nice if the testsuite did it. I don't see any use to have leak detection when running the tests. That is, unless we ever have a test that ensures GDB doesn't leak memory, which isn't going to happen any time soon. Here are some tests I found that were affected by this: gdb.base/batch-exit-status.exp gdb.base/many-headers.exp gdb.base/quit.exp gdb.base/with-mf.exp gdb.dwarf2/gdb-add-index.exp gdb.dwarf2/gdb-add-index-symlink.exp gdb.dwarf2/imported-unit-runto-main.exp Change-Id: I784c7df8a13979eb96587f735c1d33ba2cc6e0ca
2021-11-03[AArch64] Make gdbserver register set selection dynamicLuis Machado1-0/+9
The current register set selection mechanism for AArch64 is static, based on a pre-populated array of register sets. This means that we might potentially probe register sets that are not available. This is OK if the kernel errors out during ptrace, but probing the tag_ctl register, for example, does not result in a ptrace error if the kernel supports the tagged address ABI but not MTE (PR 28355). Making the register set selection dynamic, based on feature checks, solves this and simplifies the code a bit. It allows us to list all of the register sets only once, and pick and choose based on HWCAP/HWCAP2 or other properties. I plan to backport this fix to GDB 11 as well. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28355
2021-11-02[gdb/tdep, rs6000] Don't skip system call in skip_prologueTom de Vries1-0/+6
I ran into a case where a breakpoint on _exit never triggered, because it was set past the end of the _exit prologue, past the end of the exit_group system call (which does not return). More concretely, the breakpoint was set at the last insn show here: ... Dump of assembler code for function _exit: 0x00007ffff7e42ea0 <+0>: 12 00 4c 3c addis r2,r12,18 0x00007ffff7e42ea4 <+4>: 60 43 42 38 addi r2,r2,17248 0x00007ffff7e42ea8 <+8>: 00 00 00 60 nop 0x00007ffff7e42eac <+12>: f8 ff e1 fb std r31,-8(r1) 0x00007ffff7e42eb0 <+16>: 78 1b 7f 7c mr r31,r3 0x00007ffff7e42eb4 <+20>: f0 ff c1 fb std r30,-16(r1) 0x00007ffff7e42eb8 <+24>: ea 00 00 38 li r0,234 0x00007ffff7e42ebc <+28>: a0 8b 22 e9 ld r9,-29792(r2) 0x00007ffff7e42ec0 <+32>: 78 fb e3 7f mr r3,r31 0x00007ffff7e42ec4 <+36>: 14 6a c9 7f add r30,r9,r13 0x00007ffff7e42ec8 <+40>: 02 00 00 44 sc 0x00007ffff7e42ecc <+44>: 26 00 00 7c mfcr r0 0x00007ffff7e42ed0 <+48>: 00 10 09 74 andis. r9,r0,4096 ... Fix this by treating system calls the same as branches in skip_prologue: by default, don't skip, such that the breakpoint is set at 0x00007ffff7e42eb8 instead. Tested on ppc64le-linux, on a power 8 machine. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28527
2021-11-02[gdb/testsuite] Handle SIGILL in two gdb.arch powerpc test-casesTom de Vries2-2/+26
On powerpc64le-linux, with test-case gdb.arch/powerpc-addpcis.exp I run into SIGILL: ... (gdb) PASS: gdb.arch/powerpc-addpcis.exp: get hexadecimal valueof "$r3" stepi^M ^M Program terminated with signal SIGILL, Illegal instruction.^M The program no longer exists.^M (gdb) PASS: gdb.arch/powerpc-addpcis.exp: set r4 ... because it's a power9 insn, and I'm running on a power8 machine. Fix this by handling the SIGILL. Likewise in gdb.arch/powerpc-lnia.exp. Tested on powerpc64le-linux.
2021-11-02gdb/sim: update my email addressAndrew Burgess1-3/+3
gdb: * MAINTAINERS (Global Maintainers): Update my address. (Responsible Maintainers): Likewise. (Write After Approval): Likewise. sim: * MAINTAINERS (Global Maintainers): Update my address.
2021-11-02[gdb/testsuite] Fix stepi test-cases with unix/-m32/-fPIE/-pieTom de Vries5-4/+31
When running test-case gdb.base/step-indirect-call-thunk.exp with target board unix/-m32/-fPIE/-pie, I run into: ... (gdb) stepi^M 0x5655552e 22 { /* inc.1 */^M (gdb) stepi^M 0x56555530 22 { /* inc.1 */^M (gdb) stepi^M 0x565555f7 in __x86.get_pc_thunk.ax ()^M (gdb) FAIL: gdb.base/step-indirect-call-thunk.exp: stepi into return thunk ... In contrast, with unix/-m32 we have instead: ... (gdb) stepi^M 0x08048407 22 { /* inc.1 */^M (gdb) stepi^M 23 return x + 1; /* inc.2 */^M (gdb) stepi^M 0x0804840c 23 return x + 1; /* inc.2 */^M (gdb) stepi^M 24 } /* inc.3 */^M (gdb) stepi^M 0x08048410 24 } /* inc.3 */^M (gdb) stepi^M 0x0804848f in __x86_return_thunk ()^M (gdb) PASS: gdb.base/step-indirect-call-thunk.exp: stepi into return thunk ... The test-case doesn't expect to run into __x86.get_pc_thunk.ax, which is a PIC helper function for x86_64-linux. Fix this by insn-stepping through it. Likewise in a few other test-cases. Tested on x86_64-linux.
2021-11-01[gdb/doc]: Updated manpages to be consistent with helpBruno Larsen1-36/+111
Updated manpages to be consistent with help information provided by the binary. The main changes are: * Making all long-form options have '--', instead of a single '-'; * added most of the missing options to the manpage; * removed the information about using '+' instead of '-', since it doesn't seem to be supported anymore. This also fixes 2 upstream bugs: * https://sourceware.org/bugzilla/show_bug.cgi?id=23965; by adding --args to the manpage * https://sourceware.org/bugzilla/show_bug.cgi?id=10619; by adding the double dashes
2021-10-31Fix latent bug in DWARF test caseTom Tromey1-2/+2
On my branch that replaces the DWARF psymtab reader, dw2-stack-boundary.exp started failing. However, when I look at the output in gdb.log, it is correct: file /home/tromey/gdb/build/gdb/testsuite/outputs/gdb.dwarf2/dw2-stack-boundary/dw2-stack-boundary Reading symbols from /home/tromey/gdb/build/gdb/testsuite/outputs/gdb.dwarf2/dw2-stack-boundary/dw2-stack-boundary... During symbol reading: location description stack overflow During symbol reading: location description stack underflow What happens to cause the failure is that the two branches in gdb_test_multiple appear in this order: -re "\r\nDuring symbol reading: location description stack underflow" { [...] -re "\r\nDuring symbol reading: location description stack overflow" { The first one will match the above, without causing the second one to ever match -- leading to a spurious failure. Anchoring the regexps seems to fix the problem, and works for the current gdb as well.
2021-10-31Fix unittest.exp failure due to 'set debuginfod' additionTom Tromey1-2/+2
The 'set debuginfod' change caused a regression in unittest.exp: Running selftest help_doc_invariants. help doc broken invariant: command 'info set debuginfod' help doc first line is not terminated with a '.' character help doc broken invariant: command 'set debuginfod' help doc first line is not terminated with a '.' character help doc broken invariant: command 'show debuginfod' help doc first line is not terminated with a '.' character Self test failed: self-test failed at ../../binutils-gdb/gdb/unittests/command-def-selftests.c:100 This patch fixes the problem. I'm checking it in.
2021-10-29gdb: fix gdb.gdb/unittest.exp with C++17 compilerSimon Marchi1-6/+6
On a machine with gcc 11, I get: FAIL: gdb.gdb/unittest.exp: test_completion: tab complete "maintenance selftest string_v" (second tab) (timeout) FAIL: gdb.gdb/unittest.exp: test_completion: tab complete "maintenance selftest string_vie" (timeout) That's because when compiling with C++ >= 17, we use the standard version of string_view, and don't have a selftest for it. So the list of selftests shown by the tab completion when completing "string_v" differs. Change the test to use the copy_* tests instead. Change-Id: I85f6aa44ee5fc9652b9bd4451e0506b89773526b
2021-10-29gdb.texinfo: Expand documentation for debuginfodAaron Merey1-7/+90
Add section describing GDB's usage of debuginfod. Refer to this new section in the description of the '--with-debuginfod' configure option. Mention debuginfod in the 'Separate Debug Files' section.
2021-10-29gdb: add set/show commands for managing debuginfodAaron Merey2-11/+290
Add 'set debuginfod' command. Accepts 'on', 'off' or 'ask' as an argument. 'on' enables debuginfod for the current session. 'off' disables debuginfod for the current session. 'ask' will prompt the user to either enable or disable debuginfod when the next query is about to be performed: This GDB supports auto-downloading debuginfo from the following URLs: <URL1> <URL2> ... Enable debuginfod for this session? (y or [n]) y Debuginfod has been enabled. To make this setting permanent, add 'set debuginfod on' to .gdbinit. For interactive sessions, 'ask' is the default. For non-interactive sessions, 'off' is the default. Add 'show debuginfod status' command. Displays whether debuginfod is set to 'on', 'off' or 'ask'. Add 'set/show debuginfod urls' commands. Accepts a string of space-separated debuginfod server URLs to be queried. The default value is copied from the DEBUGINFOD_URLS environment variable. Finally add 'set/show debuginfod verbose' commands to control whether debuginfod-related output is displayed. Verbose output is enabled by default. (gdb) run Starting program: /bin/sleep 5 Download failed: No route to host. Continuing without debug info for /lib64/libc.so.6. If GDB is not built with debuginfod then these commands will just display Support for debuginfod is not compiled into GDB.
2021-10-29gdb: remove TYPE_FIELD_DWARF_BLOCKSimon Marchi3-4/+3
Remove TYPE_FIELD_DWARF_BLOCK, replace with type::field + field::loc_dwarf_block. Change-Id: I10af9410bb5f46d342b8358a7956998c7e804b64
2021-10-29gdb: remove TYPE_FIELD_STATIC_PHYSADDRSimon Marchi5-5/+4
Remove TYPE_FIELD_STATIC_PHYSADDR replace with type::field + field::loc_physaddr. Change-Id: Ica9bc4a48f34750ec82ec86c298d3ecece81bcbd
2021-10-29gdb: remove TYPE_FIELD_STATIC_PHYSNAMESimon Marchi5-5/+4
Remove TYPE_FIELD_STATIC_PHYSNAME, replace with type::field + field::loc_physname. Change-Id: Ie35d446b67dd1d02f39998b406001bdb7e6d5abb
2021-10-29gdb: remove TYPE_FIELD_ENUMVALSimon Marchi15-39/+38
Remove TYPE_FIELD_ENUMVAL, replace with type::field + field::loc_enumval. Change-Id: I2ada73e4635aad3363ce2eb22c1dc52698ee2072
2021-10-29gdb: remove TYPE_FIELD_BITPOSSimon Marchi30-93/+87
Remove TYPE_FIELD_BITPOS, replace its uses with type::field + field::loc_bitpos. Change-Id: Iccd8d5a77e5352843a837babaa6bd284162e0320
2021-10-29gdb: remove TYPE_FIELD_LOC_KINDSimon Marchi10-18/+18
Remove TYPE_FIELD_LOC_KIND, replace its uses with type::field + field::loc_kind. Change-Id: Ib124a26365df82ac1d23df7962d954192913bd90
2021-10-29gdb: remove FIELD_DWARF_BLOCK macroSimon Marchi3-5/+4
Remove FIELD_DWARF_BLOCK, replace its uses with field::loc_dwarf_block. Change-Id: I66b7d6a960cb5e341e61e21bd3cc9a6ac26de6a8
2021-10-29gdb: remove FIELD_STATIC_PHYSADDR macroSimon Marchi3-5/+3
Remove FIELD_LOC_KIND_PHYSADDR, replace its uses with field::loc_physaddr. Change-Id: Ifd8b2bdaad75f42bfb1404ef8c396ffe7e10ac55
2021-10-29gdb: remove FIELD_STATIC_PHYSNAME macroSimon Marchi3-5/+4
Remove FIELD_STATIC_PHYSNAME, replace its uses with field::loc_physname. Change-Id: Iaa8952410403b4eb5bbd68411feea27e2405d657