mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-01-08 21:47:59 -05:00
GP-5799: Improve example InstallCustomLibraryScript and fix NPE.
This commit is contained in:
@@ -4,17 +4,17 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import ghidra.app.plugin.core.debug.service.emulation.*;
|
import ghidra.app.plugin.core.debug.service.emulation.BytesDebuggerPcodeEmulator;
|
||||||
import ghidra.app.plugin.processors.sleigh.SleighLanguage;
|
import ghidra.app.plugin.core.debug.service.emulation.BytesDebuggerPcodeEmulatorFactory;
|
||||||
import ghidra.app.script.GhidraScript;
|
import ghidra.app.script.GhidraScript;
|
||||||
import ghidra.debug.api.emulation.DebuggerPcodeMachine;
|
import ghidra.debug.api.emulation.DebuggerPcodeMachine;
|
||||||
import ghidra.debug.api.emulation.PcodeDebuggerAccess;
|
import ghidra.debug.api.emulation.PcodeDebuggerAccess;
|
||||||
@@ -30,8 +30,7 @@ public class InstallCustomLibraryScript extends GhidraScript implements FlatDebu
|
|||||||
@Override
|
@Override
|
||||||
protected PcodeUseropLibrary<byte[]> createUseropLibrary() {
|
protected PcodeUseropLibrary<byte[]> createUseropLibrary() {
|
||||||
return super.createUseropLibrary()
|
return super.createUseropLibrary()
|
||||||
.compose(new ModelingScript.SleighStdLibPcodeUseropLibrary<>(
|
.compose(new ModelingScript.SleighStdLibPcodeUseropLibrary<>(getLanguage()));
|
||||||
(SleighLanguage) access.getLanguage()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user