Replies: 1 comment
|
There isn't yet, but I have been thinking of adding something like that. What remains to be seen is whether the cost of doing that would be prohibitive to most users. We already have a million functions indexed in the Linux kernel tree. The number of data structures touched could be an order of magnitude larger than that. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Thank you for making Semcode. The query program is super useful when working with the Linux kernel.
Is there a way to find where members of a C struct are referenced in a Semcode-indexed codebase?
For example, in the Linux kernel, there's the
struct rt_mutex_basetype, which looks like this:I want to find all places in the kernel where the rt_mutex_base
waitersmember is referenced.Using regular old grep, we can of course search for functions that use
rt_mutex_baseand then further filter the results for functions that contain.waitersor->waiters. However, this can be tedious if there's lots of results, and can return false positives too.For example, consider if there was some function like this:
This would get caught in the grep search, because it contains a reference to
struct rt_mutex_baseand->waiters. However, this isn't what we want, because it doesn't specifically referencestruct rt_mutex_base'swaitersmember.Is there some way Semcode can find all references to struct
rt_mutex_base::waitersspecifically?All reactions