Merge remote-tracking branch 'origin/GP-5624_dev747368_gcwritebarrier_flag_dwarf'

This commit is contained in:
Ryan Kurtz 2025-04-28 18:52:41 -04:00
commit ef4e9fee4d

View file

@ -756,9 +756,12 @@ public class GolangSymbolAnalyzer extends AbstractAnalyzer {
} }
// mark the 4 bytes of the flag with a data type and set it to constant mutability. // mark the 4 bytes of the flag with a data type and set it to constant mutability.
try { try {
// this will overwrite any DWARF discovered struct (that encompasses the flag)
// that was placed here, which is necessary to allow the decompiler to determine
// that the flag is a constant value.
Data flagData = DataUtilities.createData(program, flagAddr, Data flagData = DataUtilities.createData(program, flagAddr,
AbstractIntegerDataType.getUnsignedDataType(4, null), 4, AbstractIntegerDataType.getUnsignedDataType(4, null), 4,
ClearDataMode.CLEAR_ALL_UNDEFINED_CONFLICT_DATA); ClearDataMode.CLEAR_ALL_CONFLICT_DATA);
MutabilitySettingsDefinition.DEF.setChoice(flagData, MutabilitySettingsDefinition.DEF.setChoice(flagData,
MutabilitySettingsDefinition.CONSTANT); MutabilitySettingsDefinition.CONSTANT);
markupSession.labelAddress(flagAddr, "runtime.writeBarrier.discovered"); markupSession.labelAddress(flagAddr, "runtime.writeBarrier.discovered");