aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/lib
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2025-12-03 11:20:53 -0700
committerTom Tromey <tromey@adacore.com>2026-01-09 08:37:27 -0700
commitd1d83ec7dbd9bbe53dac9b5f783f35522361a593 (patch)
tree60bc2fa61834f0b48cd272f64bfd77a72cb6dfed /gdb/python/lib
parent793593eb34eaf5b26eb4d6d79b31d26c418f3d7c (diff)
downloadfsf-binutils-gdb-d1d83ec7dbd9bbe53dac9b5f783f35522361a593.tar.gz
fsf-binutils-gdb-d1d83ec7dbd9bbe53dac9b5f783f35522361a593.tar.bz2
fsf-binutils-gdb-d1d83ec7dbd9bbe53dac9b5f783f35522361a593.zip
Show constants in DAP scopes output
This changes the DAP code so that constants will now be returned by a DAP scopes request. This is perhaps slightly strange with Ada enumerators, but on the other hand this is consistent with what the CLI does. Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Diffstat (limited to 'gdb/python/lib')
-rw-r--r--gdb/python/lib/gdb/FrameDecorator.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/python/lib/gdb/FrameDecorator.py b/gdb/python/lib/gdb/FrameDecorator.py
index 310b9e62027..f8e3276ff40 100644
--- a/gdb/python/lib/gdb/FrameDecorator.py
+++ b/gdb/python/lib/gdb/FrameDecorator.py
@@ -280,10 +280,11 @@ class FrameVars(object):
if sym.is_argument:
if not traversed_link:
continue
- elif not sym.is_variable:
+ elif not sym.is_variable and not sym.is_constant:
# We use an 'elif' here because is_variable
# returns False for arguments as well. Anyway,
- # don't include non-variables here.
+ # don't include non-variables here, but remember
+ # to treat local constants the same as variables.
continue
elif sym.is_artificial:
# Skip artificial symbols.