mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-26 07:19:16 +08:00
Handle DAP evaluate request without a frame ID
DAP specifies that if an evaluate request does not have a frameID parameter, then the expression is evaluated in the global scope.
This commit is contained in:
@ -30,10 +30,12 @@ class EvaluateResult(VariableReference):
|
||||
# Helper function to evaluate an expression in a certain frame.
|
||||
@in_gdb_thread
|
||||
def _evaluate(expr, frame_id):
|
||||
global_context = True
|
||||
if frame_id is not None:
|
||||
frame = frame_for_id(frame_id)
|
||||
frame.select()
|
||||
val = gdb.parse_and_eval(expr)
|
||||
global_context = False
|
||||
val = gdb.parse_and_eval(expr, global_context=global_context)
|
||||
ref = EvaluateResult(val)
|
||||
return ref.to_object()
|
||||
|
||||
|
Reference in New Issue
Block a user