Java Code Examples for ghidra.program.database.ProgramDB#getSymbolTable()
The following examples show how to use
ghidra.program.database.ProgramDB#getSymbolTable() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SymbolUtilities1Test.java From ghidra with Apache License 2.0 | 6 votes |
@Before public void setUp() throws Exception { TestEnv env = new TestEnv(); LanguageService ls = DefaultLanguageService.getLanguageService(); Language x86 = ls.getDefaultLanguage(TestProcessorConstants.PROCESSOR_X86); CompilerSpec windows = x86.getCompilerSpecByID(new CompilerSpecID("windows")); program = new ProgramDB("Test", x86, windows, this); env.dispose(); space = program.getAddressFactory().getDefaultAddressSpace(); Memory memory = program.getMemory(); transactionID = program.startTransaction("Test"); memory.createInitializedBlock("test", addr(0), 5000, (byte) 0, TaskMonitorAdapter.DUMMY_MONITOR, false); symbolTable = program.getSymbolTable(); refMgr = program.getReferenceManager(); listing = program.getListing(); }
Example 2
Source File: SymbolUtilities2Test.java From ghidra with Apache License 2.0 | 6 votes |
@Before public void setUp() throws Exception { TestEnv env = new TestEnv(); LanguageService ls = DefaultLanguageService.getLanguageService(); Language i8051 = ls.getDefaultLanguage(TestProcessorConstants.PROCESSOR_8051); program = new ProgramDB("Test", i8051, i8051.getDefaultCompilerSpec(), this); env.dispose(); space = program.getAddressFactory().getDefaultAddressSpace(); Memory memory = program.getMemory(); transactionID = program.startTransaction("Test"); memory.createInitializedBlock("test", addr(0), 5000, (byte) 0, TaskMonitorAdapter.DUMMY_MONITOR, false); symbolTable = program.getSymbolTable(); refMgr = program.getReferenceManager(); listing = program.getListing(); }
Example 3
Source File: ExternalManagerDB.java From ghidra with Apache License 2.0 | 5 votes |
/** * @see ghidra.program.database.ManagerDB#setProgram(ghidra.program.database.ProgramDB) */ @Override public void setProgram(ProgramDB program) { this.program = program; symbolMgr = (SymbolManager) program.getSymbolTable(); functionMgr = (FunctionManagerDB) program.getFunctionManager(); scopeMgr = program.getNamespaceManager(); }
Example 4
Source File: PinnedSymbolTest.java From ghidra with Apache License 2.0 | 5 votes |
@Before public void setUp() throws Exception { Language lang = getZ80_LANGUAGE(); program = new ProgramDB("z80", lang, lang.getDefaultCompilerSpec(), this); symbolTable = program.getSymbolTable(); space = program.getAddressFactory().getDefaultAddressSpace(); transactionID = program.startTransaction("Test"); createMemBlock(); createProcessorSymbols(lang); createBobSymbol(); createPinnedFunctionSymbol(); }
Example 5
Source File: NamespaceManager.java From ghidra with Apache License 2.0 | 4 votes |
@Override public void setProgram(ProgramDB program) { this.symbolMgr = (SymbolManager) program.getSymbolTable(); globalNamespace = program.getGlobalNamespace(); }