Mercurial > hg > freeDiameter
diff freeDiameter/main.c @ 174:2b2f78036749
Added simple command-line switch to turn on full debug for specific function or file
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Wed, 03 Feb 2010 15:58:56 +0900 |
parents | dee0a871abcd |
children | ff9ade352076 |
line wrap: on
line diff
--- a/freeDiameter/main.c Wed Feb 03 11:43:22 2010 +0900 +++ b/freeDiameter/main.c Wed Feb 03 15:58:56 2010 +0900 @@ -191,6 +191,8 @@ { "debug", no_argument, NULL, 'd' }, { "quiet", no_argument, NULL, 'q' }, { "dbglocale", optional_argument, NULL, 'l' }, + { "dbg_func", required_argument, NULL, 'f' }, + { "dbg_file", required_argument, NULL, 'F' }, { NULL, 0, NULL, 0 } }; @@ -230,6 +232,14 @@ fd_g_debug_lvl++; break; + case 'f': /* Full debug for the function with this name. */ + fd_debug_one_function = optarg; + break; + + case 'F': /* Full debug for the file with this name. */ + fd_debug_one_file = optarg; + break; + case 'q': /* Decrease verbosity then remove debug messages. */ fd_g_debug_lvl--; break;