[sr-dev] About new debugger module

Daniel-Constantin Mierla miconda at gmail.com
Tue Feb 9 18:48:39 CET 2010


Hello,

On 2/9/10 4:00 PM, marius zbihlei wrote:
> Hello (replying on myself)
>
> Sorry for the broken output
>
> Feb  9 16:46:03 marius ../../ser[32584]: ERROR: *** cfgtrace: 
> c=[(null)] l=0 a=13 descr=seturi("sip:49721123456785 at 127.0.0.1:10000");
>                      Feb  9 16:46:03 marius ../../ser[32584]: ERROR: 
> *** cfgtrace: c=[30.cfg] l=33 a=17 descr=if (type<22>) {} else {};
> Feb  9 16:46:03 marius ../../ser[32584]: ERROR: *** cfgtrace: 
> c=[30.cfg] l=30 a=25 descr= external_module_call(f_ptr<0xb7dfc13c>, 0);
>
> I will also check to see why the first line has no config file or line 
> info...

it is in my roadmap to make it more verbose, but if you can do it is 
better :-) (so I can say was in my roadmap).

The name of the action is in the structure if it is a module function, 
for the core functions and statements (if, while, ...) I was thinking on 
having a mapping table (type, name).

Another idea was to open the cfg, read the respective line and print it 
next. But would be quite i/o intesive...

When you have the patch ready, send it over. I will look over it and if 
ok I will tell you to commit.

Thanks,
Daniel


>
> Marius
>
> marius zbihlei wrote:
>> Hello
>>
>> I am working on a patch that increases the verbosity of the 
>> modules/debugger module . What I am doing is very simple, but in my 
>> opinion effective :
>> I am also printing the action being run, not just the type(in the new 
>> descr field)
>>
>> Feb  9 16:46:03 marius ../../ser[32588]: ERROR: *** cfgtrace: 
>> c=[../unit/30.cfg] l=26 a=17 descr=if (type<22>) {} else {}; Feb  9 
>> 16:46:03 marius ../../ser[32588]: ERROR: *** cfgtrace: 
>> c=[../unit/30.cfg] l=30 a=17 descr=if (type<22>) {} else {};   Feb  9 
>> 16:46:03 marius ../../ser[32588]: ERROR: *** cfgtrace: 
>> c=[../unit/30.cfg] l=26 a=28 descr= 
>> external_module_call(f_ptr<0xb7d4dbf8>, 5, type<10>);
>>
>> First off all the trace is not very informative because I don't have 
>> that of a good example but you get the point.
>>
>> I know it would be easy to read the cfg and get the line number, but 
>> what if you have multiple commands per line. And printing the action 
>> type for me is not really usefull (need to get back to header to 
>> check the action type).
>>
>> What do you think, it will be usefull as such?  The patch(still some 
>> lines to go) if fairly big but fullproof (the print_action() 
>> print_expression() in route_struct.c will output data in a static 
>> buffer instead of calling DBG()).
>>
>> Cheers
>>
>> Marius
>>
>>
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Daniel-Constantin Mierla
eLearning class for Kamailio 3.0.0
Starting Feb 8, 2010
* http://www.asipto.com/




More information about the sr-dev mailing list