coccigrep icon indicating copy to clipboard operation
coccigrep copied to clipboard

Only outputs if -p >= 2

Open Synray opened this issue 6 years ago • 1 comments

Same issue as #14 In the radare2 source tree, from folder radare2/libr/core, coccigrep will only output results if I set -p 2 or higher. It seems to only work reliably with -p 3 or higher. This outputs nothing:

coccigrep -t 'RDisasmState' -a 'show_reloff' *c

While this works:

coccigrep -t 'RDisasmState' -a 'show_reloff' *c -p 3

output:

disasm.c:654 (RDisasmState *ds):                ds->show_reloff = r_config_get_i (core->config, "asm.reloff");
disasm.c:2289 (RDisasmState *ds):                       if (ds->show_reloff) {

Likewise this this doesn't work:

coccigrep -t 'RDisasmState' -a 'show_reloff' *c -p 1

Synray avatar Jun 01 '18 18:06 Synray

I'm using the latest git from coccigrep and I got result with coccigrep -t 'RDisasmState' -a 'show_reloff' *c -p 1

Coccinelle version is 1.0.4.deb-3+b4

regit avatar Jun 07 '18 12:06 regit