Skip to contentSkip to conversation

preprocess(), external_declaration(), writing a "smart" editor

DISCUSSION Oleg Nesterov 2 participants 2 messages Feb 11, 2008 – Feb 17, 2008 Sparse checker

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines · Reza Roboubi

Consider an editor that can do search & replace for all instances of 'size', but only when 'size' is a member of 'struct list'. (Even if 'size' is being referenced from inside a macro.)

I've glanced at the source code. Can you help me find out if sparse is right for this?

You can look at dissect.c. There is no documentation, please read the changelog
in http://git.kernel.org/?p=devel/sparse/sparse.git;a=commit;h=c6e90aa8eb9c0b32a771428aff9f2aff2e9bbd9d

->r_member() reports the usage of struct's members, see also test-dissect.c

Oleg.

#1 lore raw
Quoted 1 line · Oleg Nesterov

->r_member() reports the usage of struct's members, see also test-dissect.c

Oleg, this is wonderful! Together with c2xml and some other tools it goes a long way to address my questions.

Thank you.

Reza.