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

Ghidra's C (Pre)Processor language support #7526

Open
nmggithub opened this issue Feb 19, 2025 · 0 comments
Open

Ghidra's C (Pre)Processor language support #7526

nmggithub opened this issue Feb 19, 2025 · 0 comments
Assignees
Labels
Feature: C-Parser Status: Triage Information is being gathered

Comments

@nmggithub
Copy link
Contributor

nmggithub commented Feb 19, 2025

Hello!

I've been playing around with Ghidra's C header parser and while I do find it interesting, I've ran into many issues with it. I am trying to feed it a macOS SDK.

One of the very first things it ran up against was a in cdefs.h, on this line in particular.

Specifically, it complains about the opening parentheses, but I believe the double-colon might also be playing a factor as removing it results in another parse error (but further down the file). Commenting lines 592-608 got me more progress, and I found myself needing to define macros enough to fake being Apple Clang (or similar).

Ultimately though, it isn't enough (I just keep running into parser errors), and I'm wondering if Ghidra's C parsing is just not cut out for this yet, or if I'm using it wrong.

Finally the line number and/or file where the it claims the parsing error originated will, on occasion, make no real sense (i.e. there is no token (or even a line) as described at that spot). This makes fixing the parsing errors all the more difficult.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: C-Parser Status: Triage Information is being gathered
Projects
None yet
Development

No branches or pull requests

3 participants