← Back to team overview

rohc team mailing list archive

Re: [Question #234313]: How to debug the rohc library~


Question #234313 on rohc changed:

    Status: Open => Answered

Didier Barvaux proposed the following answer:

>  Now I run simple_rohc_program example to follow the process
> of rohc compressor , the print information is display the
> "c_generic_create"function called , but I can't to find where
> calling this function, please give me some help?

The c_generic_create() function is defined in src/comp/c_generic.c. It
is called by the IP, UDP, UDP-Lite, ESP, and RTP profiles to create the
"generic" part of the compression context. Here "generic" means that it
is shared by all IP-based profiles. See the c_ip.c, c_udp.c (and so on)

> I want to use "gcc" to debug it single step or set breakpoint ,
> how to do it ?

You probably means "gdb", not "gcc". Simply start your program with gdb
or attach to your program once started as usual. Ensure that the ROHC
library was built with the -g (ie. make CFLAGS="-g") to see symbol names
within gdb. More explanations about gdb is out of scope of this mailing
list. See http://sourceware.org/gdb/current/onlinedocs/gdb/

> if I write my self test program , how to set verbose to display
> the "stderr" or not ?

Use the rohc_comp_set_traces_cb() function for compressor traces:

Use the rohc_decomp_set_traces_cb() function for decompressor traces:

> how to set rohc mode ?

You cannot set it directly. It is controlled by the rohc_alloc_decompressor() function that creates a decompressor. If you specify a local compressor, then O-mode will be used and feedback will be transmitted to the compressor on the other side through the local compressor you specified. If you specify NULL, U-mode will be used.
See http://rohc-lib.org/doc/rohc-doc-1.6.0/group__rohc__decomp.html#ga5848bedb63470ce0675033796f6de95a

>  I go to https://bugs.launchpad.net/rohc/, I want to ask all bugs
> are resloved or not .
> for example :"Wrong W-LSB decoding if interpretation interval
> straddles the field boundaries" is resloved and all changes in
> revision 777 ?

Bugs shall be resolved in all active branches. Currently there are 3 actives branches:
 - "1.5.x" for fixing bugs in stable releases 1.5.0, 1.5.1, 1.5.2...
 - "1.6.x" for fixing bugs in stable releases 1.6.0, 1.6.1...
 - "main" or "trunk" for new features (and bug fixes of course) and
     next major release 1.7.0.

So, there is not one single status for a bug, but three. In case of bug #1209260 entitled ""Wrong W-LSB decoding if interpretation interval straddles the field boundaries", the bug is:
 - fixed in the 1.5.x branch and shipped in release 1.5.3,
 - fixed in the 1.6.x branch and shipped in release 1.6.1,
 - fixed in the main branch and not shipped in any release yet (because 1.7.0 is not released yet).

So, if you got 1.5.3 or 1.6.1, you're safe. If you got main with a
revision >= 777, you're safe too.

> another: is the extension header of IPv6 compressed in rohc library?

Yes, it is.

> last: I want to know the diffrence of :
>   ~didier-barvaux/rohc/main/revision/777,
>   1.5.x( ~didier-arvaux/rohc/1.5.x/revision/583) and
>   1.6.x.(~didier-barvaux/rohc/1.6.x/revision/763)

Same correction for the same bug on different branches.


You received this question notification because you are a member of ROHC
Team, which is an answer contact for rohc.