Added output trace patch. Just for testing.

ngcp3.0
Victor Seva 13 years ago
parent f15fb08d16
commit c3278bfc0d

@ -16,6 +16,7 @@ upstream/debug/modules-lcr-use-pv_cache_get.patch
upstream/debug/0001-core-added-function-to-get-the-pv-cache-table.patch
upstream/debug/0001-core-define-PVT_XAVP-as-type-for-xavp-pseudo-variabl.patch
upstream/debug/0002-pv-xavp-name-is-marked-as-PVT_XAVP-type.patch
upstream/debug/0001-modules-debugger-trace-msg-out.patch
upstream/debug/modules-debugger-add-dbg_pv_dump-config-function.patch
no_lib64_on_64_bits.patch
no_INSTALL_file.patch

@ -0,0 +1,78 @@
From 691e007e535e384e3dc27f98c81cf247be14ba15 Mon Sep 17 00:00:00 2001
From: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue, 25 Jun 2013 14:09:06 +0200
Subject: [PATCH] modules/debugger: trace msg out
---
modules/debugger/debugger_api.c | 16 ++++++++++++++++
modules/debugger/debugger_api.h | 2 ++
modules/debugger/debugger_mod.c | 3 +++
3 files changed, 21 insertions(+)
--- a/modules/debugger/debugger_api.c
+++ b/modules/debugger/debugger_api.c
@@ -173,6 +173,8 @@
*/
int _dbg_step_loops = 200;
+int _dbg_outtrace = 0;
+
/**
*
*/
@@ -415,6 +417,20 @@
return 0;
}
+int dbg_cfg_dump(void *data)
+{
+ str *buf = (str *) data;
+ if(buf==NULL) return 0;
+ LM_DBG("msg out:{%.*s}\n", buf->len, buf->s);
+ return 0;
+}
+
+void dbg_enable_outtrace(void)
+{
+ if(_dbg_outtrace==1)
+ sr_event_register_cb(SREV_NET_DATA_OUT, dbg_cfg_dump);
+}
+
/**
*
*/
--- a/modules/debugger/debugger_api.h
+++ b/modules/debugger/debugger_api.h
@@ -37,5 +37,6 @@
int dbg_set_mod_debug_level(char *mname, int mnlen, int *mlevel);
void dbg_enable_mod_levels(void);
+void dbg_enable_outtrace(void);
#endif
--- a/modules/debugger/debugger_mod.c
+++ b/modules/debugger/debugger_mod.c
@@ -54,6 +54,7 @@
extern char *_dbg_cfgtrace_prefix;
extern int _dbg_step_usleep;
extern int _dbg_step_loops;
+extern int _dbg_outtrace;
static char * _dbg_cfgtrace_facility_str = 0;
@@ -74,6 +75,7 @@
{"log_prefix", STR_PARAM, &_dbg_cfgtrace_prefix},
{"step_usleep", INT_PARAM, &_dbg_step_usleep},
{"step_loops", INT_PARAM, &_dbg_step_loops},
+ {"trace_out_msg", INT_PARAM, &_dbg_outtrace},
{"mod_hash_size", INT_PARAM, &_dbg_mod_hash_size},
{"mod_level_mode", INT_PARAM, &_dbg_mod_level},
{"mod_level", STR_PARAM|USE_FUNC_PARAM, (void*)dbg_mod_level_param},
@@ -137,6 +139,7 @@
LM_DBG("rank is (%d)\n", rank);
if (rank==PROC_INIT) {
dbg_enable_mod_levels();
+ dbg_enable_outtrace();
return dbg_init_pid_list();
}
return dbg_init_mypid();

@ -194,7 +194,7 @@ It dumps the content of pv_cache on json format.
#include "debugger_act.h"
#include "debugger_api.h"
@@ -1078,3 +1081,378 @@
@@ -1094,3 +1097,378 @@
return;
set_module_debug_level_cb(dbg_get_mod_debug_level);
}
@ -576,10 +576,11 @@ It dumps the content of pv_cache on json format.
\ No newline at end of file
--- a/modules/debugger/debugger_api.h
+++ b/modules/debugger/debugger_api.h
@@ -37,5 +37,12 @@
int dbg_set_mod_debug_level(char *mname, int mnlen, int *mlevel);
@@ -38,5 +38,13 @@
void dbg_enable_mod_levels(void);
void dbg_enable_outtrace(void);
+
+#define DBG_DP_NULL 1
+#define DBG_DP_AVP 2
+#define DBG_DP_SCRIPTVAR 4
@ -601,7 +602,7 @@ It dumps the content of pv_cache on json format.
/* parameters */
extern int _dbg_cfgtrace;
extern int _dbg_breakpoint;
@@ -63,6 +66,12 @@
@@ -64,6 +67,12 @@
static cmd_export_t cmds[]={
{"dbg_breakpoint", (cmd_function)w_dbg_breakpoint, 1,
fixup_dbg_breakpoint, 0, ANY_ROUTE},
@ -614,7 +615,7 @@ It dumps the content of pv_cache on json format.
{0, 0, 0, 0, 0, 0}
};
@@ -157,6 +166,64 @@
@@ -160,6 +169,64 @@
return 1;
}

Loading…
Cancel
Save