aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/lib
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2025-11-04 13:52:00 -0700
committerTom Tromey <tromey@adacore.com>2025-11-14 12:21:13 -0700
commit20c1b065aaa1854597abc8ef7a229e51bc9f2b2e (patch)
treee3a76519a3e53a1906a4a2397652ff0a6194ab65 /gdb/python/lib
parent24b60435102cad00a1120ae9547c3aea0c006ea4 (diff)
downloadbinutils-20c1b065aaa1854597abc8ef7a229e51bc9f2b2e.tar.gz
binutils-20c1b065aaa1854597abc8ef7a229e51bc9f2b2e.tar.bz2
binutils-20c1b065aaa1854597abc8ef7a229e51bc9f2b2e.zip
Rename variable in DAP breakpoint.py
This renames the variable 'breakpoint_map' in DAP's breakpoint.py, adding an underscore to make it clear that it is private to the module. Reviewed-By: Ciaran Woodward <ciaranwoodward@xmos.com>
Diffstat (limited to 'gdb/python/lib')
-rw-r--r--gdb/python/lib/gdb/dap/breakpoint.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/python/lib/gdb/dap/breakpoint.py b/gdb/python/lib/gdb/dap/breakpoint.py
index 3d1cfef4f5f..390a20946ce 100644
--- a/gdb/python/lib/gdb/dap/breakpoint.py
+++ b/gdb/python/lib/gdb/dap/breakpoint.py
@@ -95,7 +95,7 @@ gdb.events.breakpoint_deleted.connect(_bp_deleted)
# as a key, and the gdb.Breakpoint itself as a value. This is used to
# implement the clearing behavior specified by the protocol, while
# allowing for reuse when a breakpoint can be kept.
-breakpoint_map = {}
+_breakpoint_map = {}
@in_gdb_thread
@@ -149,11 +149,11 @@ def _remove_entries(table, *names):
@in_gdb_thread
def _set_breakpoints(kind, specs, creator):
# Try to reuse existing breakpoints if possible.
- if kind in breakpoint_map:
- saved_map = breakpoint_map[kind]
+ if kind in _breakpoint_map:
+ saved_map = _breakpoint_map[kind]
else:
saved_map = {}
- breakpoint_map[kind] = {}
+ _breakpoint_map[kind] = {}
result = []
with suppress_new_breakpoint_event():
for spec in specs:
@@ -184,7 +184,7 @@ def _set_breakpoints(kind, specs, creator):
)
# Reaching this spot means success.
- breakpoint_map[kind][keyspec] = bp
+ _breakpoint_map[kind][keyspec] = bp
result.append(_breakpoint_descriptor(bp))
# Exceptions other than gdb.error are possible here.
except Exception as e: