mirror of
https://github.com/zeek/zeek.git
synced 2025-10-01 22:28:20 +00:00
Compare commits
2 commits
54c26f768f
...
7c10b8639e
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7c10b8639e | ||
![]() |
8ea7e0041b |
4 changed files with 10 additions and 7 deletions
|
@ -25,7 +25,6 @@
|
|||
#include "zeek/IntrusivePtr.h"
|
||||
#include "zeek/PolicyFile.h"
|
||||
#include "zeek/Reporter.h"
|
||||
#include "zeek/RunState.h"
|
||||
#include "zeek/Scope.h"
|
||||
#include "zeek/Stmt.h"
|
||||
#include "zeek/Val.h"
|
||||
|
|
|
@ -339,7 +339,8 @@ ValPtr ScriptFunc::Invoke(zeek::Args* args, Frame* parent) const {
|
|||
f->SetTriggerAssoc(parent->GetTriggerAssoc());
|
||||
}
|
||||
|
||||
g_frame_stack.push_back(f.get()); // used for backtracing
|
||||
if ( ! g_policy_debug )
|
||||
g_frame_stack.push_back(f.get()); // used for backtracing
|
||||
const CallExpr* call_expr = parent ? parent->GetCall() : nullptr;
|
||||
call_stack.emplace_back(CallInfo{call_expr, this, *args});
|
||||
|
||||
|
@ -391,7 +392,8 @@ ValPtr ScriptFunc::Invoke(zeek::Args* args, Frame* parent) const {
|
|||
catch ( InterpreterException& e ) {
|
||||
// Already reported, but now determine whether to unwind further.
|
||||
if ( Flavor() == FUNC_FLAVOR_FUNCTION ) {
|
||||
g_frame_stack.pop_back();
|
||||
if ( ! g_policy_debug )
|
||||
g_frame_stack.pop_back();
|
||||
call_stack.pop_back();
|
||||
// Result not set b/c exception was thrown
|
||||
throw;
|
||||
|
@ -448,7 +450,8 @@ ValPtr ScriptFunc::Invoke(zeek::Args* args, Frame* parent) const {
|
|||
g_trace_state.LogTrace("Function return: %s\n", d.Description());
|
||||
}
|
||||
|
||||
g_frame_stack.pop_back();
|
||||
if ( ! g_policy_debug )
|
||||
g_frame_stack.pop_back();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "zeek/Frame.h"
|
||||
#include "zeek/IntrusivePtr.h"
|
||||
#include "zeek/Reporter.h"
|
||||
#include "zeek/RunState.h"
|
||||
#include "zeek/Scope.h"
|
||||
#include "zeek/Traverse.h"
|
||||
#include "zeek/Trigger.h"
|
||||
|
|
|
@ -1105,7 +1105,8 @@ SetupResult setup(int argc, char** argv, Options* zopts) {
|
|||
auto [body, scope] = get_global_stmts();
|
||||
StmtFlowType flow;
|
||||
Frame f(scope->Length(), nullptr, nullptr);
|
||||
g_frame_stack.push_back(&f);
|
||||
if ( ! g_policy_debug )
|
||||
g_frame_stack.push_back(&f);
|
||||
|
||||
try {
|
||||
body->Exec(&f, flow);
|
||||
|
@ -1113,7 +1114,8 @@ SetupResult setup(int argc, char** argv, Options* zopts) {
|
|||
reporter->FatalError("failed to execute script statements at top-level scope");
|
||||
}
|
||||
|
||||
g_frame_stack.pop_back();
|
||||
if ( ! g_policy_debug )
|
||||
g_frame_stack.pop_back();
|
||||
}
|
||||
|
||||
clear_script_analysis();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue