Merge remote-tracking branch 'origin/topic/jsiwek/add-backtrace-bif'

(Added a Doxygen comment.)

* origin/topic/jsiwek/add-backtrace-bif:
  Add backtrace() and print_backtrace()
This commit is contained in:
Robin Sommer 2020-07-06 14:38:12 +00:00
commit 3d3d5e7eb4
13 changed files with 256 additions and 42 deletions

View file

@ -5,12 +5,17 @@
#include <vector>
#include "BroList.h"
ZEEK_FORWARD_DECLARE_NAMESPACED(Val, zeek);
namespace zeek {
class VectorVal;
class RecordType;
template <class T> class IntrusivePtr;
using Args = std::vector<zeek::IntrusivePtr<zeek::Val>>;
using ValPtr = IntrusivePtr<Val>;
using VectorValPtr = IntrusivePtr<VectorVal>;
using RecordTypePtr = IntrusivePtr<RecordType>;
using Args = std::vector<ValPtr>;
/**
* Converts a legacy-style argument list for use in modern Zeek function
@ -22,4 +27,14 @@ using Args = std::vector<zeek::IntrusivePtr<zeek::Val>>;
*/
Args val_list_to_args(const val_list& vl);
/**
* Creates a vector of "call_argument" meta data describing the arguments to
* function/event invocation.
*
* @param vals call arguments
* @param types function parameters
* @return vector of script-level type "call_argument_vector"
*/
VectorValPtr MakeCallArgumentVector(const Args& vals, const RecordTypePtr& types);
} // namespace zeek