Merge branch 'topic/corelight/script-debug-output' of https://github.com/corelight/bro

* 'topic/corelight/script-debug-output' of https://github.com/corelight/bro:
  Add -B scripts flag to allow debug output of script load order.
This commit is contained in:
Jon Siwek 2017-10-03 12:00:29 -05:00
commit 76764fb135
5 changed files with 13 additions and 2 deletions

View file

@ -1,4 +1,11 @@
2.5-321 | 2017-10-03 12:00:29 -0500
* Add "-B scripts" flag to allow debug output of script load order.
(Corelight)
* Fix segmentation fault on eval condition with no return value. (Corelight)
2.5-317 | 2017-09-29 09:54:50 -0400
* BIT-1853 - Fix an issue with broctl triggering reporter error in the

View file

@ -1 +1 @@
2.5-317
2.5-321

View file

@ -19,7 +19,8 @@ DebugLogger::Stream DebugLogger::streams[NUM_DBGS] = {
{ "logging", 0, false }, {"input", 0, false },
{ "threading", 0, false }, { "file_analysis", 0, false },
{ "plugins", 0, false }, { "broxygen", 0, false },
{ "pktio", 0, false }, { "broker", 0, false }
{ "pktio", 0, false }, { "broker", 0, false },
{ "scripts", 0, false}
};
DebugLogger::DebugLogger()

View file

@ -33,6 +33,7 @@ enum DebugStream {
DBG_BROXYGEN, // Broxygen
DBG_PKTIO, // Packet sources and dumpers.
DBG_BROKER, // Broker communication
DBG_SCRIPTS, // Script initialization
NUM_DBGS // Has to be last
};

View file

@ -636,6 +636,8 @@ static int load_files(const char* orig_file)
broxygen_mgr->Script(file_path);
DBG_LOG(DBG_SCRIPTS, "Loading %s", file_path.c_str());
// "orig_file", could be an alias for yytext, which is ephemeral
// and will be zapped after the yy_switch_to_buffer() below.
yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE));