Merge branch 'GP-0_ghidra1_StackUnwinderTestFix' into patch

This commit is contained in:
ghidra1
2023-07-10 17:43:48 -04:00
2 changed files with 5 additions and 2 deletions
@@ -221,9 +221,12 @@ public class AnalysisUnwoundFrame<T> extends AbstractUnwoundFrame<T> {
* Generate the structure for {@link #resolveStructure(int)}
*
* @param prevParamSize the number of bytes occupied by the parameters for the next frame down.
* @return the generated structure
* @return the generated structure or null if {@link UnwindInfo info} contains an error.
*/
protected Structure generateStructure(int prevParamSize) {
if (info.error() != null) {
return null;
}
FrameStructureBuilder builder =
new FrameStructureBuilder(language, staticPcVal, info, prevParamSize);
return builder.build(StackUnwinder.FRAMES_PATH, "frame_" + pcVal.toString(false),
@@ -46,7 +46,7 @@ public class UnwindStackCommand extends TypedBackgroundCommand<Trace> {
for (AnalysisUnwoundFrame<WatchValue> frame : unwinder.frames(where.frame(0),
monitor)) {
UnwindInfo info = frame.getUnwindInfo();
if (info != null) {
if (info != null && info.error() == null) {
frame.applyToListing(prevParamSize, monitor);
prevParamSize = info.computeParamSize();
}