diff --git a/Ghidra/Features/Base/ghidra_scripts/EmuX86DeobfuscateExampleScript.java b/Ghidra/Features/Base/ghidra_scripts/EmuX86DeobfuscateExampleScript.java index 099fd5be68..eef41e2441 100644 --- a/Ghidra/Features/Base/ghidra_scripts/EmuX86DeobfuscateExampleScript.java +++ b/Ghidra/Features/Base/ghidra_scripts/EmuX86DeobfuscateExampleScript.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,7 +31,6 @@ import ghidra.app.util.opinion.ElfLoader; import ghidra.pcode.emulate.EmulateExecutionState; import ghidra.program.model.address.Address; import ghidra.program.model.listing.Instruction; -import ghidra.program.model.listing.Program; import ghidra.program.model.symbol.*; import ghidra.util.Msg; import ghidra.util.exception.NotFoundException; @@ -61,8 +60,7 @@ public class EmuX86DeobfuscateExampleScript extends GhidraScript { @Override protected void run() throws Exception { - String format = - currentProgram.getOptions(Program.PROGRAM_INFO).getString("Executable Format", null); + String format = currentProgram.getExecutableFormat(); if (currentProgram == null || !currentProgram.getName().startsWith(PROGRAM_NAME) || !"x86:LE:64:default".equals(currentProgram.getLanguageID().toString()) || diff --git a/Ghidra/Features/Base/ghidra_scripts/EmuX86GccDeobfuscateHookExampleScript.java b/Ghidra/Features/Base/ghidra_scripts/EmuX86GccDeobfuscateHookExampleScript.java index e11adaebbc..dc5339d91a 100644 --- a/Ghidra/Features/Base/ghidra_scripts/EmuX86GccDeobfuscateHookExampleScript.java +++ b/Ghidra/Features/Base/ghidra_scripts/EmuX86GccDeobfuscateHookExampleScript.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,7 +33,6 @@ import ghidra.pcode.emulate.EmulateExecutionState; import ghidra.program.model.address.*; import ghidra.program.model.lang.InsufficientBytesException; import ghidra.program.model.listing.Function; -import ghidra.program.model.listing.Program; import ghidra.program.model.symbol.*; import ghidra.util.Msg; import ghidra.util.exception.NotFoundException; @@ -64,8 +63,7 @@ public class EmuX86GccDeobfuscateHookExampleScript extends GhidraScript { @Override protected void run() throws Exception { - String format = - currentProgram.getOptions(Program.PROGRAM_INFO).getString("Executable Format", null); + String format = currentProgram.getExecutableFormat(); if (currentProgram == null || !currentProgram.getName().startsWith(PROGRAM_NAME) || !"x86:LE:64:default".equals(currentProgram.getLanguageID().toString()) || diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/formats/CoffBinaryAnalysisCommand.java b/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/formats/CoffBinaryAnalysisCommand.java index 86a837f0d1..c6208604bc 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/formats/CoffBinaryAnalysisCommand.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/formats/CoffBinaryAnalysisCommand.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,7 +25,6 @@ import ghidra.app.util.bin.format.coff.*; import ghidra.app.util.importer.MessageLog; import ghidra.app.util.opinion.BinaryLoader; import ghidra.framework.cmd.BinaryAnalysisCommand; -import ghidra.framework.options.Options; import ghidra.program.flatapi.FlatProgramAPI; import ghidra.program.model.address.Address; import ghidra.program.model.data.*; @@ -46,9 +45,7 @@ public class CoffBinaryAnalysisCommand extends FlatProgramAPI @Override public boolean canApply(Program program) { try { - Options options = program.getOptions(Program.PROGRAM_INFO); - String format = options.getString("Executable Format", null); - if (!BinaryLoader.BINARY_NAME.equals(format)) { + if (!BinaryLoader.BINARY_NAME.equals(program.getExecutableFormat())) { return false; } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/formats/ElfBinaryAnalysisCommand.java b/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/formats/ElfBinaryAnalysisCommand.java index f549941575..dddc75dae1 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/formats/ElfBinaryAnalysisCommand.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/formats/ElfBinaryAnalysisCommand.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -27,7 +27,6 @@ import ghidra.app.util.bin.format.elf.ElfDynamicType.ElfDynamicValueType; import ghidra.app.util.importer.MessageLog; import ghidra.app.util.opinion.BinaryLoader; import ghidra.framework.cmd.BinaryAnalysisCommand; -import ghidra.framework.options.Options; import ghidra.program.flatapi.FlatProgramAPI; import ghidra.program.model.address.Address; import ghidra.program.model.address.AddressOverflowException; @@ -54,9 +53,7 @@ public class ElfBinaryAnalysisCommand extends FlatProgramAPI @Override public boolean canApply(Program program) { try { - Options options = program.getOptions(Program.PROGRAM_INFO); - String format = options.getString("Executable Format", null); - if (!BinaryLoader.BINARY_NAME.equals(format)) { + if (!BinaryLoader.BINARY_NAME.equals(program.getExecutableFormat())) { return false; } Memory memory = program.getMemory(); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/formats/MachoBinaryAnalysisCommand.java b/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/formats/MachoBinaryAnalysisCommand.java index 1aa61ebae4..a559018998 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/formats/MachoBinaryAnalysisCommand.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/cmd/formats/MachoBinaryAnalysisCommand.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -27,7 +27,6 @@ import ghidra.app.util.bin.format.macho.commands.UnsupportedLoadCommand; import ghidra.app.util.importer.MessageLog; import ghidra.app.util.opinion.BinaryLoader; import ghidra.framework.cmd.BinaryAnalysisCommand; -import ghidra.framework.options.Options; import ghidra.program.flatapi.FlatProgramAPI; import ghidra.program.model.address.Address; import ghidra.program.model.data.DataType; @@ -63,9 +62,7 @@ public class MachoBinaryAnalysisCommand extends FlatProgramAPI @Override public boolean canApply(Program program) { try { - Options options = program.getOptions(Program.PROGRAM_INFO); - String format = options.getString("Executable Format", null); - if (!BinaryLoader.BINARY_NAME.equals(format)) { + if (!BinaryLoader.BINARY_NAME.equals(program.getExecutableFormat())) { return false; } Memory memory = program.getMemory(); diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/ExternalSymbolResolverAnalyzer.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/ExternalSymbolResolverAnalyzer.java index a7f07deaa3..c168facad8 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/ExternalSymbolResolverAnalyzer.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/ExternalSymbolResolverAnalyzer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,7 +19,6 @@ import ghidra.app.services.*; import ghidra.app.util.importer.MessageLog; import ghidra.app.util.opinion.ElfLoader; import ghidra.app.util.opinion.MachoLoader; -import ghidra.framework.options.Options; import ghidra.program.model.address.AddressSetView; import ghidra.program.model.listing.Program; import ghidra.program.util.ExternalSymbolResolver; @@ -57,8 +56,7 @@ public class ExternalSymbolResolverAnalyzer extends AbstractAnalyzer { return false; } - Options options = program.getOptions(Program.PROGRAM_INFO); - String format = options.getString("Executable Format", null); + String format = program.getExecutableFormat(); return ElfLoader.ELF_NAME.equals(format) || MachoLoader.MACH_O_NAME.equals(format); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/MachoFunctionStartsAnalyzer.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/MachoFunctionStartsAnalyzer.java index 0315b3a540..4e3df6eb1e 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/MachoFunctionStartsAnalyzer.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/MachoFunctionStartsAnalyzer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -91,8 +91,7 @@ public class MachoFunctionStartsAnalyzer extends AbstractAnalyzer { @Override public boolean canAnalyze(Program program) { - Options options = program.getOptions(Program.PROGRAM_INFO); - String format = options.getString("Executable Format", null); + String format = program.getExecutableFormat(); isDyld = DyldCacheLoader.DYLD_CACHE_NAME.equals(format); return isDyld || MachoLoader.MACH_O_NAME.equals(format); } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/util/DataTypeArchiveUtility.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/util/DataTypeArchiveUtility.java index f339468d68..733cda8895 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/util/DataTypeArchiveUtility.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/util/DataTypeArchiveUtility.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,6 @@ import ghidra.app.plugin.core.analysis.rust.RustConstants; import ghidra.app.plugin.core.datamgr.archive.DataTypeManagerHandler; import ghidra.app.util.opinion.*; import ghidra.framework.Application; -import ghidra.framework.options.Options; import ghidra.program.model.data.FileDataTypeManager; import ghidra.program.model.listing.Program; import ghidra.util.Msg; @@ -116,13 +115,12 @@ public class DataTypeArchiveUtility { public static List getArchiveList(Program program) { List list = new ArrayList(); - Options props = program.getOptions(Program.PROGRAM_INFO); - String format = props.getString("Executable Format", ""); + String format = program.getExecutableFormat(); int size = program.getAddressFactory().getDefaultAddressSpace().getSize(); - if (format.equals(PeLoader.PE_NAME) || - (format.equals(CoffLoader.COFF_NAME) && isVisualStudio(program))) { + if (PeLoader.PE_NAME.equals(format) || + (CoffLoader.COFF_NAME.equals(format) && isVisualStudio(program))) { // TODO: add in win7/win10 if (size == 64) { list.add("windows_vs12_64"); @@ -131,7 +129,7 @@ public class DataTypeArchiveUtility { list.add("windows_vs12_32"); } } - else if (format.equals(MachoLoader.MACH_O_NAME)) { + else if (MachoLoader.MACH_O_NAME.equals(format)) { // list.add("Cocoa"); // no more cocoa puffs for you // TODO: should we have a 64/32 version? // TODO: multiple OSX versions diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/cramfs/CramFsAnalyzer.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/cramfs/CramFsAnalyzer.java index 4f34fc60ab..d02c502924 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/cramfs/CramFsAnalyzer.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/cramfs/CramFsAnalyzer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,6 @@ import ghidra.app.services.AnalyzerType; import ghidra.app.util.bin.*; import ghidra.app.util.importer.MessageLog; import ghidra.app.util.opinion.BinaryLoader; -import ghidra.framework.options.Options; import ghidra.program.model.address.Address; import ghidra.program.model.address.AddressSetView; import ghidra.program.model.data.DataType; @@ -48,9 +47,7 @@ public class CramFsAnalyzer extends AbstractAnalyzer { @Override public boolean canAnalyze(Program program) { try { - Options options = program.getOptions(Program.PROGRAM_INFO); - String format = options.getString("Executable Format", null); - if (!BinaryLoader.BINARY_NAME.equals(format)) { + if (!BinaryLoader.BINARY_NAME.equals(program.getExecutableFormat())) { return false; } Language language = program.getLanguage(); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/apport/Apport.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/apport/Apport.java index 91948963dc..1397ad79f8 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/apport/Apport.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/apport/Apport.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,7 +24,6 @@ import ghidra.app.util.importer.MessageLog; import ghidra.app.util.opinion.*; import ghidra.file.formats.dump.DumpFile; import ghidra.file.formats.dump.DumpFileReader; -import ghidra.framework.options.Options; import ghidra.framework.store.LockException; import ghidra.program.database.mem.FileBytes; import ghidra.program.model.address.*; @@ -53,8 +52,7 @@ public class Apport extends DumpFile { super(reader, dtm, options, monitor); this.log = log; - Options props = program.getOptions(Program.PROGRAM_INFO); - props.setString("Executable Format", PeLoader.PE_NAME); + program.setExecutableFormat(PeLoader.PE_NAME); initManagerList(null); header = new ApportHeader(reader, 0L, monitor); diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Minidump.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Minidump.java index 02a56bd562..feef2f7ce2 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Minidump.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/mdmp/Minidump.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,9 +24,7 @@ import ghidra.app.util.bin.StructConverter; import ghidra.app.util.opinion.PeLoader; import ghidra.file.formats.dump.*; import ghidra.file.formats.dump.cmd.ModuleToPeHelper; -import ghidra.framework.options.Options; import ghidra.program.model.data.*; -import ghidra.program.model.listing.Program; import ghidra.util.Msg; import ghidra.util.task.TaskMonitor; @@ -44,8 +42,7 @@ public class Minidump extends DumpFile { super(reader, dtm, options, monitor); - Options props = program.getOptions(Program.PROGRAM_INFO); - props.setString("Executable Format", PeLoader.PE_NAME); + program.setExecutableFormat(PeLoader.PE_NAME); initManagerList(null); createBlocks = diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/Pagedump.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/Pagedump.java index a07fe8fadb..ce11eb6eb5 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/Pagedump.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/pagedump/Pagedump.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,9 +29,7 @@ import ghidra.app.util.opinion.PeLoader; import ghidra.app.util.pdb.pdbapplicator.*; import ghidra.file.formats.dump.*; import ghidra.file.formats.dump.cmd.ModuleToPeHelper; -import ghidra.framework.options.Options; import ghidra.program.model.data.*; -import ghidra.program.model.listing.Program; import ghidra.util.Msg; import ghidra.util.exception.CancelledException; import ghidra.util.exception.DuplicateNameException; @@ -109,8 +107,7 @@ public class Pagedump extends DumpFile { addins.add("ntoskrnl"); addins.add("ntkrnlmp"); - Options props = program.getOptions(Program.PROGRAM_INFO); - props.setString("Executable Format", PeLoader.PE_NAME); + program.setExecutableFormat(PeLoader.PE_NAME); initManagerList(addins); createBlocks = OptionUtils.getBooleanOptionValue(CREATE_MEMORY_BLOCKS_OPTION_NAME, options, diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/Userdump.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/Userdump.java index e75245868b..3757e86c2c 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/Userdump.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/dump/userdump/Userdump.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,9 +24,7 @@ import ghidra.app.util.OptionUtils; import ghidra.app.util.opinion.PeLoader; import ghidra.file.formats.dump.*; import ghidra.file.formats.dump.cmd.ModuleToPeHelper; -import ghidra.framework.options.Options; import ghidra.program.model.data.*; -import ghidra.program.model.listing.Program; import ghidra.util.Msg; import ghidra.util.task.TaskMonitor; @@ -42,8 +40,7 @@ public class Userdump extends DumpFile { super(reader, dtm, options, monitor); - Options props = program.getOptions(Program.PROGRAM_INFO); - props.setString("Executable Format", PeLoader.PE_NAME); + program.setExecutableFormat(PeLoader.PE_NAME); initManagerList(null); createBlocks = diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/dyldcache/DyldCacheAnalyzer.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/dyldcache/DyldCacheAnalyzer.java index d2c19679a5..9b49ce0a66 100644 --- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/dyldcache/DyldCacheAnalyzer.java +++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/dyldcache/DyldCacheAnalyzer.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,6 @@ import ghidra.app.util.importer.MessageLog; import ghidra.app.util.opinion.BinaryLoader; import ghidra.app.util.opinion.DyldCacheUtils; import ghidra.file.analyzers.FileFormatAnalyzer; -import ghidra.framework.options.Options; import ghidra.program.model.address.Address; import ghidra.program.model.address.AddressSetView; import ghidra.program.model.data.DataType; @@ -105,9 +104,7 @@ public class DyldCacheAnalyzer extends FileFormatAnalyzer { @Override public boolean canAnalyze(Program program) { - Options options = program.getOptions("Program Information"); - String format = options.getString("Executable Format", null); - if (!BinaryLoader.BINARY_NAME.equals(format)) { + if (!BinaryLoader.BINARY_NAME.equals(program.getExecutableFormat())) { return false; } return DyldCacheUtils.isDyldCache(program);