mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Lift backtrace() code into Func.{h,cc}
This is to be re-used by the assertion facility.
This commit is contained in:
parent
857c15a293
commit
e8811a55ef
3 changed files with 77 additions and 43 deletions
19
src/Func.h
19
src/Func.h
|
@ -364,6 +364,25 @@ private:
|
|||
|
||||
extern std::vector<CallInfo> call_stack;
|
||||
|
||||
/**
|
||||
* Create a single BacktraceElement record val.
|
||||
*
|
||||
* @param name the name of the function.
|
||||
* @param args call argument vector created by MakeCallArgumentVector().
|
||||
* @param loc optional location information of the caller.
|
||||
*
|
||||
* @return record value representing a BacktraceElement.
|
||||
*/
|
||||
zeek::RecordValPtr make_backtrace_element(std::string_view name, const VectorValPtr args,
|
||||
const zeek::detail::Location* loc);
|
||||
|
||||
/**
|
||||
* Create a Zeek script Backtrace of the current script call_stack.
|
||||
*
|
||||
* @return VectorValPtr containing BacktraceElement entries.
|
||||
*/
|
||||
zeek::VectorValPtr get_current_script_backtrace();
|
||||
|
||||
// This is set to true after the built-in functions have been initialized.
|
||||
extern bool did_builtin_init;
|
||||
extern std::vector<void (*)()> bif_initializers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue