mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-29 05:58:21 +08:00
Merge branch 'GP-0_ghidra1_StackUnwinderTestFix' into patch
This commit is contained in:
+4
-1
@@ -221,9 +221,12 @@ public class AnalysisUnwoundFrame<T> extends AbstractUnwoundFrame<T> {
|
|||||||
* Generate the structure for {@link #resolveStructure(int)}
|
* Generate the structure for {@link #resolveStructure(int)}
|
||||||
*
|
*
|
||||||
* @param prevParamSize the number of bytes occupied by the parameters for the next frame down.
|
* @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) {
|
protected Structure generateStructure(int prevParamSize) {
|
||||||
|
if (info.error() != null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
FrameStructureBuilder builder =
|
FrameStructureBuilder builder =
|
||||||
new FrameStructureBuilder(language, staticPcVal, info, prevParamSize);
|
new FrameStructureBuilder(language, staticPcVal, info, prevParamSize);
|
||||||
return builder.build(StackUnwinder.FRAMES_PATH, "frame_" + pcVal.toString(false),
|
return builder.build(StackUnwinder.FRAMES_PATH, "frame_" + pcVal.toString(false),
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ public class UnwindStackCommand extends TypedBackgroundCommand<Trace> {
|
|||||||
for (AnalysisUnwoundFrame<WatchValue> frame : unwinder.frames(where.frame(0),
|
for (AnalysisUnwoundFrame<WatchValue> frame : unwinder.frames(where.frame(0),
|
||||||
monitor)) {
|
monitor)) {
|
||||||
UnwindInfo info = frame.getUnwindInfo();
|
UnwindInfo info = frame.getUnwindInfo();
|
||||||
if (info != null) {
|
if (info != null && info.error() == null) {
|
||||||
frame.applyToListing(prevParamSize, monitor);
|
frame.applyToListing(prevParamSize, monitor);
|
||||||
prevParamSize = info.computeParamSize();
|
prevParamSize = info.computeParamSize();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user