[sr-dev] About new debugger module

marius zbihlei marius.zbihlei at 1and1.ro
Thu Feb 11 17:42:48 CET 2010


Daniel-Constantin Mierla wrote:
> 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
>
Hello Daniel,

I have attacked a patch that enables print_action like printing of  
module functions, core function and statements . It is usefull  if the 
action line is no longer that 512 characters(it truncates at 512 .. 
still to test)

The module export is printed like this (call to t_relay)
cfgtrace: c=[/home/marius/dev/sip-router/test/unit/30.cfg] l=30 a=25 
descr=external_module_call(t_relay)(f_ptr<0xb7ee815c>, 0);

I also liked the file read solution but strangely for some action the 
file is NULL (*** cfgtrace: c=[(null)] l=0 a=13 
descr=seturi("sip:49721123456787 at 127.0.0.1:8000");  )

BTW it is normal for a line like xlog(...) to appear as an action:
cfgtrace: c=[/home/marius/dev/sip-router/test/unit/30.cfg] l=30 a=17 
descr=if (type<22>external_module_call(xlog)(f_ptr<0xb8062898>, 2, 
type<10>); drop(1, 1); } else {};
?

The patch is a little on the long side, and a bit intrusive to my liking 
, it you have other suggestion please let me now.

Cheers
Marius

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: debugger_patch
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20100211/64a69e02/attachment-0001.txt>


More information about the sr-dev mailing list