Browse code

modules: readme files regenerated - debugger ... [skip ci]

Kamailio Dev authored on 29/07/2021 11:46:17
Showing 1 changed files
... ...
@@ -26,22 +26,23 @@ Daniel-Constantin Mierla
26 26
         3. Parameters
27 27
 
28 28
               3.1. cfgtrace (int)
29
-              3.2. breakpoint (int)
30
-              3.3. log_level (int)
31
-              3.4. log_level_name (str)
32
-              3.5. log_facility (str)
33
-              3.6. log_prefix (str)
34
-              3.7. step_usleep (int)
35
-              3.8. step_loops (int)
36
-              3.9. mod_hash_size (int)
37
-              3.10. mod_level_mode (int)
38
-              3.11. mod_level (str)
39
-              3.12. mod_facility_mode (int)
40
-              3.13. mod_facility (str)
41
-              3.14. log_assign (int)
42
-              3.15. cfgpkgcheck (int)
43
-              3.16. reset_msgid (int)
44
-              3.17. cfgtest (int)
29
+              3.2. cfgtrace_format (int)
30
+              3.3. breakpoint (int)
31
+              3.4. log_level (int)
32
+              3.5. log_level_name (str)
33
+              3.6. log_facility (str)
34
+              3.7. log_prefix (str)
35
+              3.8. step_usleep (int)
36
+              3.9. step_loops (int)
37
+              3.10. mod_hash_size (int)
38
+              3.11. mod_level_mode (int)
39
+              3.12. mod_level (str)
40
+              3.13. mod_facility_mode (int)
41
+              3.14. mod_facility (str)
42
+              3.15. log_assign (int)
43
+              3.16. cfgpkgcheck (int)
44
+              3.17. reset_msgid (int)
45
+              3.18. cfgtest (int)
45 46
 
46 47
         4. Functions
47 48
 
... ...
@@ -66,25 +67,26 @@ Daniel-Constantin Mierla
66 67
    List of Examples
67 68
 
68 69
    1.1. Set cfgtrace parameter
69
-   1.2. Set breakpoint parameter
70
-   1.3. Set log_level parameter
71
-   1.4. Set log_level_name parameter
72
-   1.5. Set log_facility parameter
73
-   1.6. Set log_prefix parameter
74
-   1.7. Set step_usleep parameter
75
-   1.8. Set step_loops parameter
76
-   1.9. Set mod_hash_size parameter
77
-   1.10. Set mod_level_mode parameter
78
-   1.11. Set mod_level parameter
79
-   1.12. Set mod_facility_mode parameter
80
-   1.13. Set mod_facility parameter
81
-   1.14. Set log_assign parameter
82
-   1.15. Set cfgpkgcheck parameter
83
-   1.16. Set reset_msgid parameter
84
-   1.17. Set cfgtest parameter
85
-   1.18. dbg_breakpoint usage
86
-   1.19. dbg_pv_dump usage
87
-   1.20. dbg_sip_msg usage
70
+   1.2. Set cfgtrace_format parameter
71
+   1.3. Set breakpoint parameter
72
+   1.4. Set log_level parameter
73
+   1.5. Set log_level_name parameter
74
+   1.6. Set log_facility parameter
75
+   1.7. Set log_prefix parameter
76
+   1.8. Set step_usleep parameter
77
+   1.9. Set step_loops parameter
78
+   1.10. Set mod_hash_size parameter
79
+   1.11. Set mod_level_mode parameter
80
+   1.12. Set mod_level parameter
81
+   1.13. Set mod_facility_mode parameter
82
+   1.14. Set mod_facility parameter
83
+   1.15. Set log_assign parameter
84
+   1.16. Set cfgpkgcheck parameter
85
+   1.17. Set reset_msgid parameter
86
+   1.18. Set cfgtest parameter
87
+   1.19. dbg_breakpoint usage
88
+   1.20. dbg_pv_dump usage
89
+   1.21. dbg_sip_msg usage
88 90
 
89 91
 Chapter 1. Admin Guide
90 92
 
... ...
@@ -99,22 +101,23 @@ Chapter 1. Admin Guide
99 101
    3. Parameters
100 102
 
101 103
         3.1. cfgtrace (int)
102
-        3.2. breakpoint (int)
103
-        3.3. log_level (int)
104
-        3.4. log_level_name (str)
105
-        3.5. log_facility (str)
106
-        3.6. log_prefix (str)
107
-        3.7. step_usleep (int)
108
-        3.8. step_loops (int)
109
-        3.9. mod_hash_size (int)
110
-        3.10. mod_level_mode (int)
111
-        3.11. mod_level (str)
112
-        3.12. mod_facility_mode (int)
113
-        3.13. mod_facility (str)
114
-        3.14. log_assign (int)
115
-        3.15. cfgpkgcheck (int)
116
-        3.16. reset_msgid (int)
117
-        3.17. cfgtest (int)
104
+        3.2. cfgtrace_format (int)
105
+        3.3. breakpoint (int)
106
+        3.4. log_level (int)
107
+        3.5. log_level_name (str)
108
+        3.6. log_facility (str)
109
+        3.7. log_prefix (str)
110
+        3.8. step_usleep (int)
111
+        3.9. step_loops (int)
112
+        3.10. mod_hash_size (int)
113
+        3.11. mod_level_mode (int)
114
+        3.12. mod_level (str)
115
+        3.13. mod_facility_mode (int)
116
+        3.14. mod_facility (str)
117
+        3.15. log_assign (int)
118
+        3.16. cfgpkgcheck (int)
119
+        3.17. reset_msgid (int)
120
+        3.18. cfgtest (int)
118 121
 
119 122
    4. Functions
120 123
 
... ...
@@ -184,22 +187,23 @@ Chapter 1. Admin Guide
184 187
 3. Parameters
185 188
 
186 189
    3.1. cfgtrace (int)
187
-   3.2. breakpoint (int)
188
-   3.3. log_level (int)
189
-   3.4. log_level_name (str)
190
-   3.5. log_facility (str)
191
-   3.6. log_prefix (str)
192
-   3.7. step_usleep (int)
193
-   3.8. step_loops (int)
194
-   3.9. mod_hash_size (int)
195
-   3.10. mod_level_mode (int)
196
-   3.11. mod_level (str)
197
-   3.12. mod_facility_mode (int)
198
-   3.13. mod_facility (str)
199
-   3.14. log_assign (int)
200
-   3.15. cfgpkgcheck (int)
201
-   3.16. reset_msgid (int)
202
-   3.17. cfgtest (int)
190
+   3.2. cfgtrace_format (int)
191
+   3.3. breakpoint (int)
192
+   3.4. log_level (int)
193
+   3.5. log_level_name (str)
194
+   3.6. log_facility (str)
195
+   3.7. log_prefix (str)
196
+   3.8. step_usleep (int)
197
+   3.9. step_loops (int)
198
+   3.10. mod_hash_size (int)
199
+   3.11. mod_level_mode (int)
200
+   3.12. mod_level (str)
201
+   3.13. mod_facility_mode (int)
202
+   3.14. mod_facility (str)
203
+   3.15. log_assign (int)
204
+   3.16. cfgpkgcheck (int)
205
+   3.17. reset_msgid (int)
206
+   3.18. cfgtest (int)
203 207
 
204 208
 3.1. cfgtrace (int)
205 209
 
... ...
@@ -214,41 +218,55 @@ Chapter 1. Admin Guide
214 218
 modparam("debugger", "cfgtrace", 1)
215 219
 ...
216 220
 
217
-3.2. breakpoint (int)
221
+3.2. cfgtrace_format (int)
222
+
223
+   Control what is printer in the cfgtrace log message. If it is set to 1,
224
+   then the configuration file path is not printed, making the log
225
+   messages shorter when not including other configuration files in the
226
+   main one.
227
+
228
+   Default value is “0”.
229
+
230
+   Example 1.2. Set cfgtrace_format parameter
231
+...
232
+modparam("debugger", "cfgtrace_format", 1)
233
+...
234
+
235
+3.3. breakpoint (int)
218 236
 
219 237
    Control whether every line (global) breakpoint is enabled or disabled
220 238
    at startup.
221 239
 
222 240
    Default value is “0” (disabled).
223 241
 
224
-   Example 1.2. Set breakpoint parameter
242
+   Example 1.3. Set breakpoint parameter
225 243
 ...
226 244
 modparam("debugger", "breakpoint", 1)
227 245
 ...
228 246
 
229
-3.3. log_level (int)
247
+3.4. log_level (int)
230 248
 
231 249
    What log level is to be used to print module-specific messages.
232 250
 
233 251
    Default value is “-1” (L_ERR).
234 252
 
235
-   Example 1.3. Set log_level parameter
253
+   Example 1.4. Set log_level parameter
236 254
 ...
237 255
 modparam("debugger", "log_level", 1)
238 256
 ...
239 257
 
240
-3.4. log_level_name (str)
258
+3.5. log_level_name (str)
241 259
 
242 260
    What log level name is to be used to print cfg trace messages.
243 261
 
244 262
    Default value is “NULL” (use default log names).
245 263
 
246
-   Example 1.4. Set log_level_name parameter
264
+   Example 1.5. Set log_level_name parameter
247 265
 ...
248 266
 modparam("debugger", "log_level_name", "exec")
249 267
 ...
250 268
 
251
-3.5. log_facility (str)
269
+3.6. log_facility (str)
252 270
 
253 271
    Which log facility is to be used to print module-specific messages. By
254 272
    using this setting, you can configure syslog to send debug messages to
... ...
@@ -256,35 +274,35 @@ modparam("debugger", "log_level_name", "exec")
256 274
 
257 275
    Default value is “NULL” (default from core).
258 276
 
259
-   Example 1.5. Set log_facility parameter
277
+   Example 1.6. Set log_facility parameter
260 278
 ...
261 279
 modparam("debugger", "log_facility", "LOG_DAEMON")
262 280
 ...
263 281
 
264
-3.6. log_prefix (str)
282
+3.7. log_prefix (str)
265 283
 
266 284
    String to print before any module-specific messages.
267 285
 
268 286
    Default value is “*** cfgtrace:”.
269 287
 
270
-   Example 1.6. Set log_prefix parameter
288
+   Example 1.7. Set log_prefix parameter
271 289
 ...
272 290
 modparam("debugger", "log_prefix", "from-debugger-with-love:")
273 291
 ...
274 292
 
275
-3.7. step_usleep (int)
293
+3.8. step_usleep (int)
276 294
 
277 295
    Microseconds to sleep before checking for new commands when waiting at
278 296
    a breakpoint.
279 297
 
280 298
    Default value is “100000” (that is 0.1 sec).
281 299
 
282
-   Example 1.7. Set step_usleep parameter
300
+   Example 1.8. Set step_usleep parameter
283 301
 ...
284 302
 modparam("debugger", "step_usleep", 500000)
285 303
 ...
286 304
 
287
-3.8. step_loops (int)
305
+3.9. step_loops (int)
288 306
 
289 307
    How many sleeps of 'step_usleep' the RPC process performs when waiting
290 308
    for a reply from a worker process before responding to RPC. This avoids
... ...
@@ -293,12 +311,12 @@ modparam("debugger", "step_usleep", 500000)
293 311
 
294 312
    Default value is “200”.
295 313
 
296
-   Example 1.8. Set step_loops parameter
314
+   Example 1.9. Set step_loops parameter
297 315
 ...
298 316
 modparam("debugger", "step_loops", 100)
299 317
 ...
300 318
 
301
-3.9. mod_hash_size (int)
319
+3.10. mod_hash_size (int)
302 320
 
303 321
    Used to compute power of two as size of internal hash table to store
304 322
    levels per module (e.g., if its set to 4, internal hash table has 16
... ...
@@ -309,12 +327,12 @@ modparam("debugger", "step_loops", 100)
309 327
 
310 328
    Default value is “0” - feature disabled.
311 329
 
312
-   Example 1.9. Set mod_hash_size parameter
330
+   Example 1.10. Set mod_hash_size parameter
313 331
 ...
314 332
 modparam("debugger", "mod_hash_size", 5)
315 333
 ...
316 334
 
317
-3.10. mod_level_mode (int)
335
+3.11. mod_level_mode (int)
318 336
 
319 337
    Enable or disable per module log level (0 - disabled, 1 - enabled).
320 338
    This parameter is tunable via the Kamailio config framework. To use per
... ...
@@ -322,25 +340,25 @@ modparam("debugger", "mod_hash_size", 5)
322 340
 
323 341
    Default value is “0”.
324 342
 
325
-   Example 1.10. Set mod_level_mode parameter
343
+   Example 1.11. Set mod_level_mode parameter
326 344
 ...
327 345
 modparam("debugger", "mod_level_mode", 1)
328 346
 ...
329 347
 
330
-3.11. mod_level (str)
348
+3.12. mod_level (str)
331 349
 
332 350
    Specify module log level - the value must be in the format:
333 351
    modulename=level. The parameter can be set many times. For core log
334 352
    level, use module name 'core'. You also must enable mod_level_mode and
335 353
    mod_hash_size.
336 354
 
337
-   Example 1.11. Set mod_level parameter
355
+   Example 1.12. Set mod_level parameter
338 356
 ...
339 357
 modparam("debugger", "mod_level", "core=3")
340 358
 modparam("debugger", "mod_level", "tm=3")
341 359
 ...
342 360
 
343
-3.12. mod_facility_mode (int)
361
+3.13. mod_facility_mode (int)
344 362
 
345 363
    Enable or disable per module log facility (0 - disabled, 1 - enabled).
346 364
    This parameter is tunable via the Kamailio config framework. To use per
... ...
@@ -348,12 +366,12 @@ modparam("debugger", "mod_level", "tm=3")
348 366
 
349 367
    Default value is “0”.
350 368
 
351
-   Example 1.12. Set mod_facility_mode parameter
369
+   Example 1.13. Set mod_facility_mode parameter
352 370
 ...
353 371
 modparam("debugger", "mod_facility_mode", 1)
354 372
 ...
355 373
 
356
-3.13. mod_facility (str)
374
+3.14. mod_facility (str)
357 375
 
358 376
    Specify module log facility - the value must be in the format:
359 377
    modulename=facility. The parameter can be set many times. For core log
... ...
@@ -364,56 +382,56 @@ modparam("debugger", "mod_facility_mode", 1)
364 382
    (http://linux.die.net/man/3/syslog). The most used facilities are
365 383
    LOG_LOCAL[0-7].
366 384
 
367
-   Example 1.13. Set mod_facility parameter
385
+   Example 1.14. Set mod_facility parameter
368 386
 ...
369 387
 modparam("debugger", "mod_facility", "core=LOG_LOCAL0")
370 388
 modparam("debugger", "mod_facility", "debugger=LOG_LOCAL1")
371 389
 ...
372 390
 
373
-3.14. log_assign (int)
391
+3.15. log_assign (int)
374 392
 
375 393
    Enable or disable log assign actions on config (0 - disabled, 1 -
376 394
    enabled).
377 395
 
378 396
    Default value is “0”.
379 397
 
380
-   Example 1.14. Set log_assign parameter
398
+   Example 1.15. Set log_assign parameter
381 399
 ...
382 400
 modparam("debugger", "log_assign", 1)
383 401
 ...
384 402
 
385
-3.15. cfgpkgcheck (int)
403
+3.16. cfgpkgcheck (int)
386 404
 
387 405
    If set, before each config action is done pkg memory check, useful to
388 406
    detect buffer overflows.
389 407
 
390 408
    Default value is “0” (disabled).
391 409
 
392
-   Example 1.15. Set cfgpkgcheck parameter
410
+   Example 1.16. Set cfgpkgcheck parameter
393 411
 ...
394 412
 modparam("debugger", "cfgpkgcheck", 1)
395 413
 ...
396 414
 
397
-3.16. reset_msgid (int)
415
+3.17. reset_msgid (int)
398 416
 
399 417
    Used to enable or disable the ability to reset the msgid ($mi) through
400 418
    the dbg.reset_msgid RPC command. (0 - disabled, 1 - enabled).
401 419
 
402 420
    Default value is “0” - feature disabled.
403 421
 
404
-   Example 1.16. Set reset_msgid parameter
422
+   Example 1.17. Set reset_msgid parameter
405 423
 ...
406 424
 modparam("debugger", "reset_msgid", 1)
407 425
 ...
408 426
 
409
-3.17. cfgtest (int)
427
+3.18. cfgtest (int)
410 428
 
411 429
    Control whether the cfgt module is enabled or disabled at startup.
412 430
    Module cfgt needs to be loaded before.
413 431
 
414 432
    Default value is “0” (disabled).
415 433
 
416
-   Example 1.17. Set cfgtest parameter
434
+   Example 1.18. Set cfgtest parameter
417 435
 ...
418 436
 loadmodule "cfgt.so"
419 437
 modparam("debugger", "cfgtest", 1)
... ...
@@ -434,7 +452,7 @@ modparam("debugger", "cfgtest", 1)
434 452
    Note that this version of the module does not export this anchors to
435 453
    RPC for interactive debugging (temporarily disabled).
436 454
 
437
-   Example 1.18. dbg_breakpoint usage
455
+   Example 1.19. dbg_breakpoint usage
438 456
 ...
439 457
 if($si=="10.0.0.10")
440 458
         dbg_breakpoint("1");
... ...
@@ -462,7 +480,7 @@ if($si=="10.0.0.10")
462 480
      * L_INFO - log level 2
463 481
      * L_DBG - log level 3
464 482
 
465
-   Example 1.19. dbg_pv_dump usage
483
+   Example 1.20. dbg_pv_dump usage
466 484
 ...
467 485
 $var(temp) = 1;
468 486
 $avp(s:more_avp) = 2;
... ...
@@ -505,7 +523,7 @@ x":0,"$var(empty)":0}
505 523
    force the lump application using msg_apply_changes() function from
506 524
    textopsx module.
507 525
 
508
-   Example 1.20. dbg_sip_msg usage
526
+   Example 1.21. dbg_sip_msg usage
509 527
 ...
510 528
     dbg_sip_msg();
511 529
     dbg_sip_msg("L_ERR");
Browse code

modules: readme files regenerated - acc ... [skip ci]

Kamailio Dev authored on 28/02/2018 17:03:37 • The Root committed on 28/02/2018 19:11:36
Showing 1 changed files
... ...
@@ -304,7 +304,7 @@ modparam("debugger", "step_loops", 100)
304 304
    levels per module (e.g., if its set to 4, internal hash table has 16
305 305
    slots). One must set it's value grater than 0 such that memory to be
306 306
    allocated to save the module specific debug levels or facility
307
-   configured by mod_level or mod_facility. This parameter is accesible
307
+   configured by mod_level or mod_facility. This parameter is accessible
308 308
    readonly via the Kamailio config framework.
309 309
 
310 310
    Default value is “0” - feature disabled.
... ...
@@ -634,7 +634,7 @@ P-Hint: My hint
634 634
    Resets the message sequence ($mi). Internally there is no real change.
635 635
    This can be useful for unit test cases in order to be able to replicate
636 636
    exactly the same kamailio output. You need to set the debugger
637
-   parameter reset_msgid to 1 to activate this functionallity.
637
+   parameter reset_msgid to 1 to activate this functionality.
638 638
 
639 639
    Name: dbg.reset_msgid
640 640
 
... ...
@@ -701,7 +701,7 @@ P-Hint: My hint
701 701
    A process blocked at a breakpoint is waiting for a command. Use 'dbg.bp
702 702
    next pid' to execute the current action and stop at the next one.
703 703
    'dbg.bp eval pid PV' can be used to retrieve the value of PV. Once you
704
-   are done and want to continue the execution of the config wihtout
704
+   are done and want to continue the execution of the config without
705 705
    interaction use 'dbg.bp move pid'.
706 706
 
707 707
    Example of a session:
Browse code

modules: readme files regenerated - debugger ...

Kamailio Dev authored on 02/01/2017 08:16:30
Showing 1 changed files
... ...
@@ -49,26 +49,19 @@ Daniel-Constantin Mierla
49 49
               4.2. dbg_pv_dump([mask] [, level])
50 50
               4.3. dbg_sip_msg([log_level], [facility])
51 51
 
52
-        5. Exported MI Functions
52
+        5. RPC Commands
53 53
 
54
-              5.1. set_dbg_mod_level mod_name level
55
-              5.2. set_dbg_mod_facility mod_name facility
56
-              5.3. get_dbg_mod_level mod_name
57
-              5.4. get_dbg_mod_facility mod_name
54
+              5.1. dbg.ls
55
+              5.2. dbg.trace
56
+              5.3. dbg.bp
57
+              5.4. dbg.mod_level
58
+              5.5. dbg.reset_msgid
59
+              5.6. dbg.set_mod_level
60
+              5.7. dbg.set_mod_facility
61
+              5.8. dbg.get_mod_level
62
+              5.9. dbg.get_mod_facility
58 63
 
59
-        6. Exported RPC Functions
60
-
61
-              6.1. dbg.ls
62
-              6.2. dbg.trace
63
-              6.3. dbg.bp
64
-              6.4. dbg.mod_level
65
-              6.5. dbg.reset_msgid
66
-              6.6. dbg.set_mod_level
67
-              6.7. dbg.set_mod_facility
68
-              6.8. dbg.get_mod_level
69
-              6.9. dbg.get_mod_facility
70
-
71
-        7. Usage
64
+        6. Usage
72 65
 
73 66
    List of Examples
74 67
 
... ...
@@ -92,10 +85,6 @@ Daniel-Constantin Mierla
92 85
    1.18. dbg_breakpoint usage
93 86
    1.19. dbg_pv_dump usage
94 87
    1.20. dbg_sip_msg usage
95
-   1.21. set_dbg_mod_level usage
96
-   1.22. set_dbg_mod_facility usage
97
-   1.23. get_dbg_mod_level usage
98
-   1.24. get_dbg_mod_facility usage
99 88
 
100 89
 Chapter 1. Admin Guide
101 90
 
... ...
@@ -133,26 +122,19 @@ Chapter 1. Admin Guide
133 122
         4.2. dbg_pv_dump([mask] [, level])
134 123
         4.3. dbg_sip_msg([log_level], [facility])
135 124
 
136
-   5. Exported MI Functions
137
-
138
-        5.1. set_dbg_mod_level mod_name level
139
-        5.2. set_dbg_mod_facility mod_name facility
140
-        5.3. get_dbg_mod_level mod_name
141
-        5.4. get_dbg_mod_facility mod_name
142
-
143
-   6. Exported RPC Functions
125
+   5. RPC Commands
144 126
 
145
-        6.1. dbg.ls
146
-        6.2. dbg.trace
147
-        6.3. dbg.bp
148
-        6.4. dbg.mod_level
149
-        6.5. dbg.reset_msgid
150
-        6.6. dbg.set_mod_level
151
-        6.7. dbg.set_mod_facility
152
-        6.8. dbg.get_mod_level
153
-        6.9. dbg.get_mod_facility
127
+        5.1. dbg.ls
128
+        5.2. dbg.trace
129
+        5.3. dbg.bp
130
+        5.4. dbg.mod_level
131
+        5.5. dbg.reset_msgid
132
+        5.6. dbg.set_mod_level
133
+        5.7. dbg.set_mod_facility
134
+        5.8. dbg.get_mod_level
135
+        5.9. dbg.get_mod_facility
154 136
 
155
-   7. Usage
137
+   6. Usage
156 138
 
157 139
 1. Overview
158 140
 
... ...
@@ -552,71 +534,19 @@ P-Hint: My hint
552 534
 ------------------------------- SIP body diffs --------------------------------
553 535
 -------------------------- END OF SIP message debug ---------------------------
554 536
 
555
-5. Exported MI Functions
556
-
557
-   5.1. set_dbg_mod_level mod_name level
558
-   5.2. set_dbg_mod_facility mod_name facility
559
-   5.3. get_dbg_mod_level mod_name
560
-   5.4. get_dbg_mod_facility mod_name
561
-
562
-5.1. set_dbg_mod_level mod_name level
563
-
564
-   Set the module log level. If module does not exist in kamailio, the
565
-   entry in the level hashtable is still added for the bogus module.
566
-
567
-   Example 1.21. set_dbg_mod_level usage
568
-...
569
-$ kamctl fifo set_dbg_mod_level core 2
570
-$ kamctl fifo set_dbg_mod_level debugger 3
571
-...
572
-
573
-5.2. set_dbg_mod_facility mod_name facility
574
-
575
-   Set the mod_name log facility. If mod_name does not exist in kamailio,
576
-   the entry in the facility hashtable is still added for the bogus
577
-   mod_name.
578
-
579
-   Example 1.22. set_dbg_mod_facility usage
580
-...
581
-$ kamctl fifo set_dbg_mod_facility core LOG_LOCAL1
582
-$ kamctl fifo set_dbg_mod_facility debugger LOG_LOCAL0
583
-...
584
-
585
-5.3. get_dbg_mod_level mod_name
586
-
587
-   Get the mod_name log level. If mod_name does not exist in the level
588
-   hashtable, returns the config file value.
589
-
590
-   Example 1.23. get_dbg_mod_level usage
591
-...
592
-$ kamctl fifo get_dbg_mod_level core
593
-$ kamctl fifo get_dbg_mod_level debugger
594
-...
595
-
596
-5.4. get_dbg_mod_facility mod_name
597
-
598
-   Get the mod_name log facility. If mod_name does not exist in the
599
-   facility hashtable, returns the config file value.
600
-
601
-   Example 1.24. get_dbg_mod_facility usage
602
-...
603
-$ kamctl fifo get_dbg_mod_facility core
604
-$ kamctl fifo get_dbg_mod_facility debugger
605
-...
606
-
607
-6. Exported RPC Functions
537
+5. RPC Commands
608 538
 
609
-   6.1. dbg.ls
610
-   6.2. dbg.trace
611
-   6.3. dbg.bp
612
-   6.4. dbg.mod_level
613
-   6.5. dbg.reset_msgid
614
-   6.6. dbg.set_mod_level
615
-   6.7. dbg.set_mod_facility
616
-   6.8. dbg.get_mod_level
617
-   6.9. dbg.get_mod_facility
539
+   5.1. dbg.ls
540
+   5.2. dbg.trace
541
+   5.3. dbg.bp
542
+   5.4. dbg.mod_level
543
+   5.5. dbg.reset_msgid
544
+   5.6. dbg.set_mod_level
545
+   5.7. dbg.set_mod_facility
546
+   5.8. dbg.get_mod_level
547
+   5.9. dbg.get_mod_facility
618 548
 
619
-6.1.  dbg.ls
549
+5.1.  dbg.ls
620 550
 
621 551
    List Kamailio processes with info related to interactive debugging.
622 552
 
... ...
@@ -630,7 +560,7 @@ $ kamctl fifo get_dbg_mod_facility debugger
630 560
                 dbg.ls
631 561
                 dbg.ls 1234
632 562
 
633
-6.2.  dbg.trace
563
+5.2.  dbg.trace
634 564
 
635 565
    Control config script running trace.
636 566
 
... ...
@@ -647,7 +577,7 @@ $ kamctl fifo get_dbg_mod_facility debugger
647 577
                 dbg.trace off
648 578
                 dbg.trace on 1234
649 579
 
650
-6.3.  dbg.bp
580
+5.3.  dbg.bp
651 581
 
652 582
    Control breakpoints and config execution.
653 583
 
... ...
@@ -685,7 +615,7 @@ $ kamctl fifo get_dbg_mod_facility debugger
685 615
                 dbg.bp eval 1234 $fu
686 616
                 dbg.bp move 1234
687 617
 
688
-6.4.  dbg.mod_level
618
+5.4.  dbg.mod_level
689 619
 
690 620
    Specify module log level.
691 621
 
... ...
@@ -699,7 +629,7 @@ $ kamctl fifo get_dbg_mod_facility debugger
699 629
                 dbg.mod_level core 3
700 630
                 dbg.mod_level tm 3
701 631
 
702
-6.5.  dbg.reset_msgid
632
+5.5.  dbg.reset_msgid
703 633
 
704 634
    Resets the message sequence ($mi). Internally there is no real change.
705 635
    This can be useful for unit test cases in order to be able to replicate
... ...
@@ -711,7 +641,7 @@ $ kamctl fifo get_dbg_mod_facility debugger
711 641
    Examples of use with kamcmd:
712 642
                 dbg.reset_msgid
713 643
 
714
-6.6.  dbg.set_mod_level
644
+5.6.  dbg.set_mod_level
715 645
 
716 646
    Set the module log level. If module does not exist in kamailio, the
717 647
    entry in the level hashtable is still added for the bogus module.
... ...
@@ -721,7 +651,7 @@ $ kamctl fifo get_dbg_mod_facility debugger
721 651
    Examples of use with kamcmd:
722 652
                         dbg.set_mod_level core 1
723 653
 
724
-6.7.  dbg.set_mod_facility
654
+5.7.  dbg.set_mod_facility
725 655
 
726 656
    Set the module log facility. If module does not exist in kamailio, the
727 657
    entry in the facility hashtable is still added for the bogus module.
... ...
@@ -731,7 +661,7 @@ $ kamctl fifo get_dbg_mod_facility debugger
731 661
    Examples of use with kamcmd:
732 662
                         dbg.set_mod_facility core LOG_LOCAL1
733 663
 
734
-6.8.  dbg.get_mod_level
664
+5.8.  dbg.get_mod_level
735 665
 
736 666
    Get the module log level. If mod_name does not exist in the level
737 667
    hashtable, returns the config file value.
... ...
@@ -741,7 +671,7 @@ $ kamctl fifo get_dbg_mod_facility debugger
741 671
    Examples of use with kamcmd:
742 672
                         dbg.get_mod_level core
743 673
 
744
-6.9.  dbg.get_mod_facility
674
+5.9.  dbg.get_mod_facility
745 675
 
746 676
    Get the module log facility. If mod_name does not exist in the facility
747 677
    hashtable, returns the config file value.
... ...
@@ -751,7 +681,7 @@ $ kamctl fifo get_dbg_mod_facility debugger
751 681
    Examples of use with kamcmd:
752 682
                         dbg.get_mod_facility core
753 683
 
754
-7. Usage
684
+6. Usage
755 685
 
756 686
    A common usage is to investigate the execution path for a specific SIP
757 687
    message. Just enable cfg running trace, send the message and watch the
Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,875 @@
1
+debugger Module
2
+
3
+Daniel-Constantin Mierla
4
+
5
+   asipto.com
6
+
7
+Edited by
8
+
9
+Daniel-Constantin Mierla
10
+
11
+   <miconda@gmail.com>
12
+
13
+   Copyright © 2010 Daniel-Constantin Mierla (asipto.com)
14
+     __________________________________________________________________
15
+
16
+   Table of Contents
17
+
18
+   1. Admin Guide
19
+
20
+        1. Overview
21
+        2. Dependencies
22
+
23
+              2.1. Kamailio Modules
24
+              2.2. External Libraries or Applications
25
+
26
+        3. Parameters
27
+
28
+              3.1. cfgtrace (int)
29
+              3.2. breakpoint (int)
30
+              3.3. log_level (int)
31
+              3.4. log_level_name (str)
32
+              3.5. log_facility (str)
33
+              3.6. log_prefix (str)
34
+              3.7. step_usleep (int)
35
+              3.8. step_loops (int)
36
+              3.9. mod_hash_size (int)
37
+              3.10. mod_level_mode (int)
38
+              3.11. mod_level (str)
39
+              3.12. mod_facility_mode (int)
40
+              3.13. mod_facility (str)
41
+              3.14. log_assign (int)
42
+              3.15. cfgpkgcheck (int)
43
+              3.16. reset_msgid (int)
44
+              3.17. cfgtest (int)
45
+
46
+        4. Functions
47
+
48
+              4.1. dbg_breakpoint(mode)
49
+              4.2. dbg_pv_dump([mask] [, level])
50
+              4.3. dbg_sip_msg([log_level], [facility])
51
+
52
+        5. Exported MI Functions
53
+
54
+              5.1. set_dbg_mod_level mod_name level
55
+              5.2. set_dbg_mod_facility mod_name facility
56
+              5.3. get_dbg_mod_level mod_name
57
+              5.4. get_dbg_mod_facility mod_name
58
+
59
+        6. Exported RPC Functions
60
+
61
+              6.1. dbg.ls
62
+              6.2. dbg.trace
63
+              6.3. dbg.bp
64
+              6.4. dbg.mod_level
65
+              6.5. dbg.reset_msgid
66
+              6.6. dbg.set_mod_level
67
+              6.7. dbg.set_mod_facility
68
+              6.8. dbg.get_mod_level
69
+              6.9. dbg.get_mod_facility
70
+
71
+        7. Usage
72
+
73
+   List of Examples
74
+
75
+   1.1. Set cfgtrace parameter
76
+   1.2. Set breakpoint parameter
77
+   1.3. Set log_level parameter
78
+   1.4. Set log_level_name parameter
79
+   1.5. Set log_facility parameter
80
+   1.6. Set log_prefix parameter
81
+   1.7. Set step_usleep parameter
82
+   1.8. Set step_loops parameter
83
+   1.9. Set mod_hash_size parameter
84
+   1.10. Set mod_level_mode parameter
85
+   1.11. Set mod_level parameter
86
+   1.12. Set mod_facility_mode parameter
87
+   1.13. Set mod_facility parameter
88
+   1.14. Set log_assign parameter
89
+   1.15. Set cfgpkgcheck parameter
90
+   1.16. Set reset_msgid parameter
91
+   1.17. Set cfgtest parameter
92
+   1.18. dbg_breakpoint usage
93
+   1.19. dbg_pv_dump usage
94
+   1.20. dbg_sip_msg usage
95
+   1.21. set_dbg_mod_level usage
96
+   1.22. set_dbg_mod_facility usage
97
+   1.23. get_dbg_mod_level usage
98
+   1.24. get_dbg_mod_facility usage
99
+
100
+Chapter 1. Admin Guide
101
+
102
+   Table of Contents
103
+
104
+   1. Overview
105
+   2. Dependencies
106
+
107
+        2.1. Kamailio Modules
108
+        2.2. External Libraries or Applications
109
+
110
+   3. Parameters
111
+
112
+        3.1. cfgtrace (int)
113
+        3.2. breakpoint (int)
114
+        3.3. log_level (int)
115
+        3.4. log_level_name (str)
116
+        3.5. log_facility (str)
117
+        3.6. log_prefix (str)
118
+        3.7. step_usleep (int)
119
+        3.8. step_loops (int)
120
+        3.9. mod_hash_size (int)
121
+        3.10. mod_level_mode (int)
122
+        3.11. mod_level (str)
123
+        3.12. mod_facility_mode (int)
124
+        3.13. mod_facility (str)
125
+        3.14. log_assign (int)
126
+        3.15. cfgpkgcheck (int)
127
+        3.16. reset_msgid (int)
128
+        3.17. cfgtest (int)
129
+
130
+   4. Functions
131
+
132
+        4.1. dbg_breakpoint(mode)
133
+        4.2. dbg_pv_dump([mask] [, level])
134
+        4.3. dbg_sip_msg([log_level], [facility])
135
+
136
+   5. Exported MI Functions
137
+
138
+        5.1. set_dbg_mod_level mod_name level
139
+        5.2. set_dbg_mod_facility mod_name facility
140
+        5.3. get_dbg_mod_level mod_name
141
+        5.4. get_dbg_mod_facility mod_name
142
+
143
+   6. Exported RPC Functions
144
+
145
+        6.1. dbg.ls
146
+        6.2. dbg.trace
147
+        6.3. dbg.bp
148
+        6.4. dbg.mod_level
149
+        6.5. dbg.reset_msgid
150
+        6.6. dbg.set_mod_level
151
+        6.7. dbg.set_mod_facility
152
+        6.8. dbg.get_mod_level
153
+        6.9. dbg.get_mod_facility
154
+
155
+   7. Usage
156
+
157
+1. Overview
158
+
159
+   This module provides an interactive config file debugger. It can print
160
+   a trace of config script execution for a SIP message to log and set
161
+   breakpoints on every script action, allowing step-by-step execution of
162
+   the routing and response scripts. Moreover, this module allows setting
163
+   static and dynamic module specific debug settings.
164
+
165
+   Debugging can be done from local or remote host via RPC interface
166
+   (e.g., XMLRPC, kamcmd, siremis).
167
+
168
+   The framework to set breakpoints on specific actions and config lines
169
+   is not exported to RPC. Each action can be accompanied by an breakpoint
170
+   or you can use dbg_breakpoint() function to set a breakpoint at certain
171
+   line. Global breakpoints can be enabled/disabled at runtime. The script
172
+   running trace can also be enabled/disabled at runtime.
173
+
174
+   When the SIP router process is stopped at a breakpoint, you can
175
+   investigate the values of any pseudo-variables. Note that some of
176
+   pseudo-variables may produce memory leaks; a fix is planned in the
177
+   future (here fall pseudo-variables with dynamic name such as htable,
178
+   sqlops). References to SIP message, avps, headers, script and shared
179
+   variables are safe.
180
+
181
+2. Dependencies
182
+
183
+   2.1. Kamailio Modules
184
+   2.2. External Libraries or Applications
185
+
186
+2.1. Kamailio Modules
187
+
188
+   The following modules must be loaded before this module:
189
+     * none.
190
+
191
+   NOTE: Due to the debugger module child_init() function, one should load
192
+   the module first in the module sequence in order to initialize
193
+   _dbg_pid_list. Otherwise, another module (i.e. p_usrloc) forking a
194
+   process with rank != PROC_INIT will fail.
195