Closed simeonpilgrim closed 2 years ago
Ok, so I jump some hoops, and got the "ghidra_9.1.2_build" tag building and debugged this:
So the register that it's trying to fetch is the PS (processor state) to clear/set the Zero flag.
If I try set the Registor Context on the first instruction, I get the error message
Context register change conflicts with one or more instructions
which makes some sense, but given the state of the flags is unknown at the start of the processor init this is strange.
program.getRegister(regVarnode) is returning null
program.getRegister(regVarnode) is returning null
@astrelsky yes, that is point of the change set attached, but I do not understand who your comment is targeted at, and why they need that comment?
program.getRegister(regVarnode) is returning null
@astrelsky yes, that is point of the change set attached, but I do not understand who your comment is targeted at, and why they need that comment?
I did not see the linked pull request before submitting the comment. I encountered this myself earlier today and was going to submit an issue but found this one. It's often helpful to know where the null pointer is coming from so I was providing that information. It can clearly be deduced from the pull request though.
@astrelsky ah I see, nod I agree the screenshot of the code in question did not explicitly call out the line. And from the context you explain, that makes sense. Thank you for providing that context.
@astrelsky ah I see, nod I agree the screenshot of the code in question did not explicitly call out the line. And from the context you explain, that makes sense. Thank you for providing that context.
Of course. Arguably I should have provided more context in the first place.
to this cases point, the secondary exception I also listed:
Analysis Task: Subroutine References -
is the same piece of code, and the auto analysis runs much more happy once this change has been applied.
Should be fixed with c9121fe49877f14f22ee66bb01d6693ecee44d55.
Describe the bug A have new new processor that I am developing support for (https://github.com/simeonpilgrim/ghidra_fujitsu_fr).
A leaf function after disassembling the function if I press f (Create Function) I getting an exception pop up.
If I reduce the code down to a really tiny set of 20 bytes, the issue still happen, thus the code is
if I press Create Function on the instruct after the read register is set, it work. or if I change the read register to that the consts (address) is loaded into to not be the read register the Create Function works. or if I alter the shift to not set C or Z flags the Create Function works
The decompiler gets the function correct, just the disassembler is unhappy.
The pcode for the last example that is happy looks like:
The case which is unhappy and I set a flags register explicitly to zero
.sinc
outputs this pcode:
and triggers the pop-up.
Expected behavior A function to be created.
Screenshots
Attachments
Environment :
Other comment There are number of exception that a thrown when I do a full analysis, they a super annoying at many levels,
doesn't tell me what address/subroutine exploded, so I cannot go look at the address and workout is it my code that wrong, or make a minimum report/example.