Closed github-learning-lab[bot] closed 2 years ago
ntoh*
macrosThis query will look like the previous one, but with macros instead of functions.
7_macro_invocations.ql
ntoh*
macros.Ooops! The query you submitted in 054258848411ca6f62fd7dcc2b2dda92e00d30b6 didn't find the right results. Please take a look at the comment and try again.
To submit a new iteration of your query, you just have to push a new commit to the same branch (main
or the PR branch).
Congratulations, looks like the query you introduced in 4d70bef80d3fc20a1d2705737957468f5570582d finds the correct results!
If you created a pull request, merge it.
Let's continue to the next step.
Step 7: Relating two variables, continued
In step 5, you wrote a query that finds the definitions of macros named
ntohs
,ntohl
andntohll
in the codebase. Now, we want to find all the invocations of these macros in the codebase.This will be similar to what you did in step 6, where you created variables for functions and function calls, and restricted them to look for a particular function and its calls.
Note: A macro invocation is a place in the source code that calls a particular macro. This is comparable to how a function call is a place in the source code that calls a particular function.