Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Query syntax for database to print custom graphs #250

Open
egraether opened this issue Nov 30, 2016 · 5 comments
Open

Query syntax for database to print custom graphs #250

egraether opened this issue Nov 30, 2016 · 5 comments
Labels

Comments

@egraether
Copy link
Contributor

reported by mail

@jpenalbae
Copy link

jpenalbae commented Dec 4, 2016

For me JSON would be a nice way to make the queries.

I didn't take a look at what information you are storing into the database, so I cannot really tell you about the query syntax as I do not know which kind of parameters can be queried. But I can give you some examples of queries which I would be doing.

The caller, calee relationship queries:

  • Search for all callers of function X
  • Search for all functions called by function X
  • Search for possible codepaths between function A and function B

Search for definitions of variable type X

  • Search which functions define the type X or structure X
  • Search where the variable X is set and/or its usages
  • Being able to filter if the definition was a pointer, typedef, structure, array, etc... would also be cool.

Whenever a variable is being set, it would cool to be able to filter how it was set, for example if it was set by a malloc. That way I would be able to enumerate which functions dynamically allocate the type X

  • Search where the variable or structure X has been set by a call to malloc, kmalloc or whatever function... (this can be done by regexp as long as the assignment code portion is returned by the query)

Being able to stack the queries would be also cool. For example:

  • Search where the variable X is set and search if there is a possible code path coming from function Y or any function starting with sys_*

@egraether
Copy link
Contributor Author

+1 by mail

1 similar comment
@egraether
Copy link
Contributor Author

+1 by mail

@egraether
Copy link
Contributor Author

Most of the above suggestions will be possible with the new custom graph dialog arriving with 2019.3 (see #249). Rephrasing this request to "query syntax".

@egraether egraether changed the title Query database to print graphs based on custom scripts Query syntax for database to print custom graphs Aug 2, 2019
@jankap
Copy link

jankap commented Dec 16, 2019

I really like the way #249 was solved. However, only existing relations can be shown. What about explicit non-existing relations as asked in #830 . Can we help here somehow?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants