On Thu, 25 Mar 2010, Jan Engelhardt wrote:

> Hi,
> 
> 
> On Thursday 2010-03-25 02:00, Jan Engelhardt wrote:
> >
> >I have a trivial issue trying to get started on spatch.
> >For a start, the manpage states:
> >
> >EXAMPLES
> >     [...]
> >
> >         ./spatch -sp_file foo.cocci foo.c -o /tmp/newfoo.c
> >
> >However, spatch (from cocc 0.2.2) does not seem to know any options. It 
> >does not support -h/--help either, so I can't tell if it's just the 
> >manpage being outdated.
> >
> >$ spatch -sp_file pfamily.smpl x.c -o new.c
> >Unknown option -sp_file.
> 
> 
> I guess I already figured it out:
> 
> 02:08 borg:../coccinelle-0.2.2/x > ./spatch -sp_file parfamily x.c
> init_defs_builtins: /usr/share/coccinelle/standard.h
> HANDLING: x.c
> No matches found for ->family .family
> Skipping:x.c
> 02:08 borg:../coccinelle-0.2.2/x > strip -s spatch
> 02:08 borg:../coccinelle-0.2.2/x > ./spatch -sp_file parfamily x.c
> Unknown option -sp_file.
> 
> 
> But why spatch relies on a symbol table is a bit beyond me.
> 
> Since many distros run strip just before packaging .rpm or similar, 
> there must be a way for spatch to work without the debugging symbol 
> table. (The ELF table is still available, readable with for example 
> `readelf -s spatch`.)

This seems quite mysterious.  Thanks for reporting it.

Where did you get your version of spatch? Ie, did you compile it yourself, 
take our binary, or take a binary from somewhere else?

Coccinelle is implemented in OCaml, which is enough of a high level 
language that one doesn't really know how it is managing strings.  When we 
compile it for ourselves, we use the -g option.  If that is used in 
compiling the released versions as well, perhaps that is the problem.  
Otherwise, perhaps we will have to ask the OCaml mailing list.

Thanks again for the report.  We will try to find a solution.

julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to