mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 15:18:20 +00:00
support for Frame's having call locations even if no associated CallExpr
This commit is contained in:
parent
143d306883
commit
6a0bee1108
2 changed files with 4 additions and 1 deletions
|
@ -619,7 +619,7 @@ void Frame::CaptureClosure(Frame* c, IDPList arg_outer_ids)
|
||||||
|
|
||||||
const detail::Location* Frame::GetCallLocation() const
|
const detail::Location* Frame::GetCallLocation() const
|
||||||
{
|
{
|
||||||
return call ? call->GetLocationInfo() : nullptr;
|
return call ? call->GetLocationInfo() : call_loc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Frame::SetTrigger(trigger::TriggerPtr arg_trigger)
|
void Frame::SetTrigger(trigger::TriggerPtr arg_trigger)
|
||||||
|
|
|
@ -262,6 +262,8 @@ public:
|
||||||
void SetCall(const CallExpr* arg_call) { call = arg_call; }
|
void SetCall(const CallExpr* arg_call) { call = arg_call; }
|
||||||
void ClearCall() { call = nullptr; }
|
void ClearCall() { call = nullptr; }
|
||||||
const CallExpr* GetCall() const { return call; }
|
const CallExpr* GetCall() const { return call; }
|
||||||
|
|
||||||
|
void SetCallLoc(const Location* loc) { call_loc = loc; }
|
||||||
const detail::Location* GetCallLocation() const;
|
const detail::Location* GetCallLocation() const;
|
||||||
|
|
||||||
void SetDelayed() { delayed = true; }
|
void SetDelayed() { delayed = true; }
|
||||||
|
@ -390,6 +392,7 @@ private:
|
||||||
|
|
||||||
trigger::TriggerPtr trigger;
|
trigger::TriggerPtr trigger;
|
||||||
const CallExpr* call;
|
const CallExpr* call;
|
||||||
|
const Location* call_loc = nullptr; // only needed if call is nil
|
||||||
|
|
||||||
std::unique_ptr<std::vector<ScriptFunc*>> functions_with_closure_frame_reference;
|
std::unique_ptr<std::vector<ScriptFunc*>> functions_with_closure_frame_reference;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue