mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
Fix a latent bug in DAP request decorator
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.
This commit is contained in:
parent
070e93a8b8
commit
5c7cdc95aa
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user