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:

  1. Are those tool still maintained?
  2. Is it possible and easy to extend those tools?
  3. Do you have any recommendation for me to solve this task?

Many thanks,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.