-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
CParser.parse() struct bug introduced in 10.2? #4903
Comments
I have probably the same problem with Java. When calling the CParser like this: var parser = new CParser(programDtm);
parser.parse(text); i get a NullPointerException at
This is probably an easy fix by changing this: https://github.com/Katharsas/ghidra/blob/79c0f3f1deccaac0fdcb211067eef7d6dcc49ca4/Ghidra/Features/Base/src/main/javacc/ghidra/app/util/cparser/C/C.jj#L429 hasSameSourceArchive = dt.getSourceArchive().equals(dtMgr.getLocalSourceArchive()); to
|
- fix problematic line and overwrite CParser
- fix problematic line and overwrite CParser
Thanks for the fix, will get it into the baseline. The fix will also include returning the structure data type that was parsed, instead of the last member's data type. |
- was fixed in Ghidra 10.3
Describe the bug
CParser fails (ParseException) to parse 'simple' structs using python script in latest version. Script works in 10.1.5 but not in 10.2 or 10.2.2.
To Reproduce
Steps to reproduce the behavior:
Then fails on "parser.parse(mystruct_txt)" with ParseException on 10.2, 10.2.2 but imports successfully in 10.1.5.
Expected behavior
Would have expected the above struct to be imported. Couldn't see any relevant lines in the 10.2 Changelogs.
Environment:
The text was updated successfully, but these errors were encountered: