Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate cparser for improving codegen #3

Open
woodruffw opened this issue Apr 2, 2019 · 3 comments
Open

Investigate cparser for improving codegen #3

woodruffw opened this issue Apr 2, 2019 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed platform:linux

Comments

@woodruffw
Copy link
Member

Right now, the codegen specs (e.g. read.yml) include hardcoded proto and parm fields that correspond to the prototype and parameter list for each syscall. This is confusing, hard to read, and error prone. We should really use something like pag's cparser to parse syscall.h and generate these fields for us.

@woodruffw woodruffw added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Apr 2, 2019
@disconnect3d
Copy link
Member

disconnect3d commented Apr 4, 2019

Are we missing sth from the list?

idk if that is helpful, but pwndbg can show args for syscalls, e.g.:
image
image
I didn't dig down deep, but I think those argnames might come from functions.py file in the repo which is generated via https://github.com/zachriggle/functions

@disconnect3d
Copy link
Member

Also note that gef can also do that as long as you install the extra module. The syscall tables from it can be found in https://github.com/hugsy/gef-extras/tree/master/syscall-tables

@woodruffw
Copy link
Member Author

Didn't know about functions.py or gef's extras! Looks like the latter is what we want, since it includes the slot numbers and all of the additional parameter attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed platform:linux
Projects
None yet
Development

No branches or pull requests

2 participants