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

rework kernel/generated/arch/object/structures_gen.h to allow including it #20

Open
axel-h opened this issue Apr 23, 2020 · 2 comments
Open

Comments

@axel-h
Copy link
Member

axel-h commented Apr 23, 2020

See my pull request #19 why this would be a useful. Is there a ways that parts of it could be made available in the seL4 API headers?

@kent-mcleod
Copy link
Member

Are you talking about just the enum cap_tag part? It's hard because user level isn't supposed to be able to query type information about a cap. Maybe we could look at how seL4_DebugCapIdentify is defined and change it to return the same information, but not directly tied to the internal seL4 enum values.

@axel-h
Copy link
Member Author

axel-h commented Apr 24, 2020

Seems to me that is the usual trade off between debug features and release code. In Debug mode you want to be able to have some insights and thus need some headers or definitions that are not meant to be really public. Wouldn't it be possible that things like the enum cap_tag" are simply put into a separate header file that has no includes? Then this header file can be included in debug builds by libsel4debug and thus become available to others indirectly when they include libsel4debug? No other module would then have a direct dependency here, all such "debug hacks" are well constained in libsel4debug.
After all, what is the real point on hiding some technical details that one desperately want for debugging and low level development purposes? If information is duplicated in hard coded magic numbers, I consider it even worse. That tends to end in a pitfall if something changes - because you never really notice this until things start behaving very strangely.

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

No branches or pull requests

2 participants