projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
070e93a
)
Fix a latent bug in DAP request decorator
author
Tom Tromey
<tromey@adacore.com>
Thu, 11 May 2023 20:25:07 +0000
(14:25 -0600)
committer
Tom Tromey
<tromey@adacore.com>
Mon, 12 Jun 2023 18:09:28 +0000
(12:09 -0600)
The 'request' decorator is intended to also ensure that the request
function runs in the DAP thread. However, the unwrapped function is
installed in the global request map, so the wrapped version is never
called. This patch fixes the bug.
gdb/python/lib/gdb/dap/server.py
patch
|
blob
|
history
diff --git
a/gdb/python/lib/gdb/dap/server.py
b/gdb/python/lib/gdb/dap/server.py
index f27fa9caa4f8e925d862724f5e9e9d2441f42fcc..8abe475b031c21b14f80dab54b3b4cff3ed65bad 100644
(file)
--- a/
gdb/python/lib/gdb/dap/server.py
+++ b/
gdb/python/lib/gdb/dap/server.py
@@
-164,9
+164,10
@@
def request(name):
def wrap(func):
global _commands
- _commands[name] = func
# All requests must run in the DAP thread.
- return in_dap_thread(func)
+ func = in_dap_thread(func)
+ _commands[name] = func
+ return func
return wrap