I try to find a light-weight tool to detect some line of C code then get information.
For example, I want to detect the code which performs Memory-mapped I/O in embedded software. This code often appears as the form below:
int *device = (int *)address; *device = value;
The information I want to get are: the line number of this code and the string "address" and "value" as they are variables' name.
I found that extending Flawfinder, RATS or Graudit, which use pattern matching technique, may be suitable for my purpose. So I want to ask:
- Are those tool still maintained?
- Is it possible and easy to extend those tools?
- Do you have any recommendation for me to solve this task?