Bug 30475 - Implement StackFrameFormat
Summary: Implement StackFrameFormat
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: dap (show other bugs)
Version: HEAD
: P2 enhancement
Target Milestone: 14.1
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-19 15:28 UTC by Tom Tromey
Modified: 2023-11-17 14:20 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2023-05-19 15:28:09 UTC
DAP lets the client request some stack frame formatting
via the StackFrameFormat type and the supportsValueFormattingOptions
capability.  This isn't implemented in gdb, but should be.
Comment 1 Tom Tromey 2023-10-06 19:52:57 UTC
I have a patch, but still haven't written the test.
Comment 3 Sourceware Commits 2023-11-17 14:15:58 UTC
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1920148904fe5ca0035c1addf2376f9ab13ffd3d

commit 1920148904fe5ca0035c1addf2376f9ab13ffd3d
Author: Tom Tromey <tromey@adacore.com>
Date:   Fri Oct 6 13:40:39 2023 -0600

    Handle StackFrameFormat in DAP
    
    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
Comment 4 Sourceware Commits 2023-11-17 14:19:35 UTC
The gdb-14-branch branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=45b2be661868f7e2b3628285362e699cb6e09266

commit 45b2be661868f7e2b3628285362e699cb6e09266
Author: Tom Tromey <tromey@adacore.com>
Date:   Fri Oct 6 13:40:39 2023 -0600

    Handle StackFrameFormat in DAP
    
    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)
Comment 5 Tom Tromey 2023-11-17 14:20:02 UTC
Fixed.