aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-11-19Automatic date update in version.inGDB Administrator1-1/+1
2023-11-18Automatic date update in version.inGDB Administrator1-1/+1
2023-11-17Ignore static members in NoOpStructPrinterTom Tromey3-2/+21
Hannes' patch to show local variables in the TUI pointed out that NoOpStructPrinter should ignore static members. This patch implements this. (cherry picked from commit 4a1b9a4badc8954221926b231b81392fa625653c)
2023-11-17Implement the notStopped DAP responseTom Tromey4-4/+59
DAP specifies that a request can fail with the "notStopped" message if the inferior is running but the request requires that it first be stopped. This patch implements this for gdb. Most requests are assumed to require a stopped inferior, and the exceptions are noted by a new 'request' parameter. You may notice that the implementation is a bit racy. I think this is inherent -- unless the client waits for a stop event before sending a request, the request may be processed at any time relative to a stop. https://sourceware.org/bugzilla/show_bug.cgi?id=31037 Reviewed-by: Kévin Le Gouguec <legouguec@adacore.com> (cherry picked from commit cfd00e8050a58aacc6489ec0379908be1a12be73)
2023-11-17Remove ExecutionInvokerTom Tromey4-31/+16
ExecutionInvoker is no longer really needed, due to the previous DAP refactoring. This patch removes it in favor of an ordinary function. One spot (the 'continue' request) could still have used it, but is more succinctly expressed as a lambda. Reviewed-by: Kévin Le Gouguec <legouguec@adacore.com> (cherry picked from commit 68caad9d0b06d0ac231ce083ff62410a5a1806c1)
2023-11-17Automatically run (most) DAP requests in gdb threadTom Tromey14-130/+116
Nearly every DAP request implementation forwards its work to the gdb thread, using send_gdb_with_response. This patch refactors the 'request' decorator to make this automatic, and to provide some parameters so that the unusual requests can express their needs as well. In a few spots this simplifies the code by removing an unnecessary helper function. This could be done in more places as well if we wanted. The main motivation for this patch is that I thought it would be helpful for cancellation. I am still working on that, but meanwhile the parameterization of 'request' makes it easy to handle the 'notStopped' response as well. Reviewed-by: Kévin Le Gouguec <legouguec@adacore.com> (cherry picked from commit c98921b258b55272c5b4066d96441e4e07626eb2)
2023-11-17Handle StackFrameFormat in DAPTom Tromey6-47/+453
DAP specifies a StackFrameFormat object that can be used to change how the "name" part of a stack frame is constructed. While this output can already be done in a nicer way (and also letting the client choose the formatting), nevertheless it is in the spec, so I figured I'd implement it. While implementing this, I discovered that the current code does not correctly preserve frame IDs across requests. I rewrote frame iteration to preserve this, and it turned out to be simpler to combine these patches. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30475 (cherry picked from commit 1920148904fe5ca0035c1addf2376f9ab13ffd3d)
2023-11-17Automatic date update in version.inGDB Administrator1-1/+1
2023-11-16Automatic date update in version.inGDB Administrator1-1/+1
2023-11-15Minor cleanups in ada-nested.expTom Tromey1-5/+9
This changes ada-nested.exp to fix a test name (the test expects three variables but is named "two"), and to iterate over all the variables that are found. It also adds a workaround to a problem Tom de Vries found with an older version of GNAT -- it emits a duplicate "x". (cherry picked from commit e1ccbfffb5e0121c084898ac63f042187621d4ec)
2023-11-15Automatic date update in version.inGDB Administrator1-1/+1
2023-11-14Update gdb.Symbol.is_variable documentationTom Tromey1-1/+3
Kévin found a bug in an earlier version of this series that was based on a misconception I had about Symbol.is_variable. This patch fixes the documentation to explain the method a bit better. Approved-By: Eli Zaretskii <eliz@gnu.org> (cherry picked from commit 5006ea556dad71c4c868cf5705e007e72e3b02b4)
2023-11-14Handle the static link in FrameDecoratorTom Tromey3-13/+174
A co-worker requested that the DAP scope for a nested function's frame also show the variables from outer frames. DAP doesn't directly support this notion, so this patch arranges to put these variables into the inner frames "Locals" scope. I chose to do this only for DAP. For CLI and MI, gdb currently does not do this, so this preserves the behavior. Note that an earlier patch (see commit 4a1311ba) removed some code that seemed to do something similar. However, that code did not actually work. (cherry picked from commit ebea770b19c09489fe5e2cb5c1fd568f0f21e17e)
2023-11-14Fix a bug in DAP scopes codeTom Tromey1-2/+6
While working on static links, I noticed that the DAP scopes code does not handle the scenario where a frame decorator returns None. This situation should be handled identically to a frame decorator returning an empty iterator. (cherry picked from commit e9dacb1d6caa5770d3e1722adc0ec74ff13a7a89)
2023-11-14Add gdb.Frame.static_link methodTom Tromey3-0/+39
This adds a new gdb.Frame.static_link method to the gdb Python layer. This can be used to find the static link frame for a given frame. Reviewed-By: Eli Zaretskii <eliz@gnu.org> (cherry picked from commit 4ead09a294adbb718d642874a554e78d931c2830)
2023-11-14Move follow_static_link to frame.cTom Tromey3-53/+53
This moves the follow_static_link function to frame.c and exports it for use elsewhere. The API is changed slightly to make it more generically useful. (cherry picked from commit 19b83d5c9bac1db207dce26859c6ca84135615b0)
2023-11-14Add block::function_blockTom Tromey2-0/+19
This adds the method block::function_block, to easily access a block's enclosing function block. (cherry picked from commit ba707cadae18a7cc8bb47a736d3d0438d44262a9)
2023-11-14Add two convenience methods to blockTom Tromey2-3/+17
This adds a couple of convenience methods, block::is_static_block and block::is_global_block. (cherry picked from commit edf1b9640bbc981c8a094d6ca29d444b1ed50a2c)
2023-11-14Automatic date update in version.inGDB Administrator1-1/+1
2023-11-13Automatic date update in version.inGDB Administrator1-1/+1
2023-11-12Automatic date update in version.inGDB Administrator1-1/+1
2023-11-11Automatic date update in version.inGDB Administrator1-1/+1
2023-11-10Automatic date update in version.inGDB Administrator1-1/+1
2023-11-09Automatic date update in version.inGDB Administrator1-1/+1
2023-11-08Automatic date update in version.inGDB Administrator1-1/+1
2023-11-07Automatic date update in version.inGDB Administrator1-1/+1
2023-11-06Automatic date update in version.inGDB Administrator1-1/+1
2023-11-05Automatic date update in version.inGDB Administrator1-1/+1
2023-11-04Automatic date update in version.inGDB Administrator1-1/+1
2023-11-03Automatic date update in version.inGDB Administrator1-1/+1
2023-11-02Automatic date update in version.inGDB Administrator1-1/+1
2023-11-01Automatic date update in version.inGDB Administrator1-1/+1
2023-10-31Implement DAP setVariable requestTom Tromey6-21/+311
This patch implements the DAP setVariable request. setVariable is a bit odd in that it specifies the variable to modify by passing in the variable's container and the name of the variable. This approach can't handle variable shadowing (there are a couple of open DAP bugs on this topic), so this patch renames duplicates to avoid the problem. (cherry picked from commit 87e3cc466e8ea352639beb6db40a36e339d608d1)
2023-10-31Automatic date update in version.inGDB Administrator1-1/+1
2023-10-30Automatic date update in version.inGDB Administrator1-1/+1
2023-10-29Automatic date update in version.inGDB Administrator1-1/+1
2023-10-28Automatic date update in version.inGDB Administrator1-1/+1
2023-10-27Automatic date update in version.inGDB Administrator1-1/+1
2023-10-26gdb/nat/aarch64-scalable-linux-ptrace.h: Don't include itselfThiago Jung Bauermann1-1/+0
GCC doesn't complain, but it's still wrong.
2023-10-26Automatic date update in version.inGDB Administrator1-1/+1
2023-10-25Automatic date update in version.inGDB Administrator1-1/+1
2023-10-24Automatic date update in version.inGDB Administrator1-1/+1
2023-10-23Automatic date update in version.inGDB Administrator1-1/+1
2023-10-22Automatic date update in version.inGDB Administrator1-1/+1
2023-10-21Automatic date update in version.inGDB Administrator1-1/+1
2023-10-20Automatic date update in version.inGDB Administrator1-1/+1
2023-10-19Automatic date update in version.inGDB Administrator1-1/+1
2023-10-18Automatic date update in version.inGDB Administrator1-1/+1
2023-10-17Automatic date update in version.inGDB Administrator1-1/+1
2023-10-16Have DAP handle non-Value results from 'children'Tom Tromey3-2/+166
A pretty-printer's 'children' method may return values other than a gdb.Value -- it may return any value that can be converted to a gdb.Value. I noticed that this case did not work for DAP. This patch fixes the problem.