mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-25 13:42:06 +00:00
Merge remote-tracking branch 'origin/GP-1545_Dan_noGuavaCache--SQUASHED'
Conflicts: Ghidra/Debug/Debugger-agent-dbgmodel/src/main/java/agent/dbgmodel/model/impl/DelegateDbgModel2TargetObject.java
This commit is contained in:
commit
2b20e32a78
@ -17,7 +17,6 @@ package agent.dbgeng.impl.dbgeng.advanced;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -43,14 +42,11 @@ public interface DebugAdvancedInternal extends DebugAdvanced {
|
||||
return DbgEngUtil.lazyWeakCache(CACHE, advanced, DebugAdvancedImpl3::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugAdvanced>> PREFERRED_ADVANCED_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugAdvanced>> PREFERRED_ADVANCED_IIDS =
|
||||
PREFERRED_ADVANCED_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugAdvanced3.IID_IDEBUG_ADVANCED3), WrapIDebugAdvanced3.class) //
|
||||
.put(new REFIID(IDebugAdvanced2.IID_IDEBUG_ADVANCED2), WrapIDebugAdvanced2.class) //
|
||||
.put(new REFIID(IDebugAdvanced.IID_IDEBUG_ADVANCED), WrapIDebugAdvanced.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugAdvanced3.IID_IDEBUG_ADVANCED3), WrapIDebugAdvanced3.class),
|
||||
Map.entry(new REFIID(IDebugAdvanced2.IID_IDEBUG_ADVANCED2), WrapIDebugAdvanced2.class),
|
||||
Map.entry(new REFIID(IDebugAdvanced.IID_IDEBUG_ADVANCED), WrapIDebugAdvanced.class));
|
||||
|
||||
static DebugAdvancedInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgEngUtil.tryPreferredInterfaces(DebugAdvancedInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgeng.impl.dbgeng.breakpoint;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -43,16 +42,14 @@ public interface DebugBreakpointInternal extends DebugBreakpoint {
|
||||
return DbgEngUtil.lazyWeakCache(CACHE, bp, DebugBreakpointImpl3::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugBreakpoint>> PREFERRED_BREAKPOINT_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugBreakpoint>> PREFERRED_BREAKPOINT_IIDS =
|
||||
PREFERRED_BREAKPOINT_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugBreakpoint3.IID_IDEBUG_BREAKPOINT3),
|
||||
WrapIDebugBreakpoint3.class) //
|
||||
.put(new REFIID(IDebugBreakpoint2.IID_IDEBUG_BREAKPOINT2),
|
||||
WrapIDebugBreakpoint2.class) //
|
||||
.put(new REFIID(IDebugBreakpoint.IID_IDEBUG_BREAKPOINT), WrapIDebugBreakpoint.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugBreakpoint3.IID_IDEBUG_BREAKPOINT3),
|
||||
WrapIDebugBreakpoint3.class),
|
||||
Map.entry(new REFIID(IDebugBreakpoint2.IID_IDEBUG_BREAKPOINT2),
|
||||
WrapIDebugBreakpoint2.class),
|
||||
Map.entry(new REFIID(IDebugBreakpoint.IID_IDEBUG_BREAKPOINT),
|
||||
WrapIDebugBreakpoint.class));
|
||||
|
||||
static DebugBreakpointInternal tryPreferredInterfaces(DebugControlInternal control,
|
||||
InterfaceSupplier supplier) {
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgeng.impl.dbgeng.client;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -67,18 +66,15 @@ public interface DebugClientInternal extends DebugClient {
|
||||
return DbgEngUtil.lazyWeakCache(CACHE, client, DebugClientImpl7::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugClient>> PREFERRED_CLIENT_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugClient>> PREFERRED_CLIENT_IIDS =
|
||||
PREFERRED_CLIENT_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugClient7.IID_IDEBUG_CLIENT7), WrapIDebugClient7.class) //
|
||||
.put(new REFIID(IDebugClient6.IID_IDEBUG_CLIENT6), WrapIDebugClient6.class) //
|
||||
.put(new REFIID(IDebugClient5.IID_IDEBUG_CLIENT5), WrapIDebugClient5.class) //
|
||||
.put(new REFIID(IDebugClient4.IID_IDEBUG_CLIENT4), WrapIDebugClient4.class) //
|
||||
.put(new REFIID(IDebugClient3.IID_IDEBUG_CLIENT3), WrapIDebugClient3.class) //
|
||||
.put(new REFIID(IDebugClient2.IID_IDEBUG_CLIENT2), WrapIDebugClient2.class) //
|
||||
.put(new REFIID(IDebugClient.IID_IDEBUG_CLIENT), WrapIDebugClient.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugClient7.IID_IDEBUG_CLIENT7), WrapIDebugClient7.class),
|
||||
Map.entry(new REFIID(IDebugClient6.IID_IDEBUG_CLIENT6), WrapIDebugClient6.class),
|
||||
Map.entry(new REFIID(IDebugClient5.IID_IDEBUG_CLIENT5), WrapIDebugClient5.class),
|
||||
Map.entry(new REFIID(IDebugClient4.IID_IDEBUG_CLIENT4), WrapIDebugClient4.class),
|
||||
Map.entry(new REFIID(IDebugClient3.IID_IDEBUG_CLIENT3), WrapIDebugClient3.class),
|
||||
Map.entry(new REFIID(IDebugClient2.IID_IDEBUG_CLIENT2), WrapIDebugClient2.class),
|
||||
Map.entry(new REFIID(IDebugClient.IID_IDEBUG_CLIENT), WrapIDebugClient.class));
|
||||
|
||||
static DebugClientInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgEngUtil.tryPreferredInterfaces(DebugClientInternal.class, PREFERRED_CLIENT_IIDS,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgeng.impl.dbgeng.control;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -59,18 +58,15 @@ public interface DebugControlInternal extends DebugControl {
|
||||
return DbgEngUtil.lazyWeakCache(CACHE, control, DebugControlImpl7::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugControl>> PREFERRED_CONTROL_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugControl>> PREFERRED_CONTROL_IIDS =
|
||||
PREFERRED_CONTROL_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugControl7.IID_IDEBUG_CONTROL7), WrapIDebugControl7.class) //
|
||||
.put(new REFIID(IDebugControl6.IID_IDEBUG_CONTROL6), WrapIDebugControl6.class) //
|
||||
.put(new REFIID(IDebugControl5.IID_IDEBUG_CONTROL5), WrapIDebugControl5.class) //
|
||||
.put(new REFIID(IDebugControl4.IID_IDEBUG_CONTROL4), WrapIDebugControl4.class) //
|
||||
.put(new REFIID(IDebugControl3.IID_IDEBUG_CONTROL3), WrapIDebugControl3.class) //
|
||||
.put(new REFIID(IDebugControl2.IID_IDEBUG_CONTROL2), WrapIDebugControl2.class) //
|
||||
.put(new REFIID(IDebugControl.IID_IDEBUG_CONTROL), WrapIDebugControl.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugControl7.IID_IDEBUG_CONTROL7), WrapIDebugControl7.class),
|
||||
Map.entry(new REFIID(IDebugControl6.IID_IDEBUG_CONTROL6), WrapIDebugControl6.class),
|
||||
Map.entry(new REFIID(IDebugControl5.IID_IDEBUG_CONTROL5), WrapIDebugControl5.class),
|
||||
Map.entry(new REFIID(IDebugControl4.IID_IDEBUG_CONTROL4), WrapIDebugControl4.class),
|
||||
Map.entry(new REFIID(IDebugControl3.IID_IDEBUG_CONTROL3), WrapIDebugControl3.class),
|
||||
Map.entry(new REFIID(IDebugControl2.IID_IDEBUG_CONTROL2), WrapIDebugControl2.class),
|
||||
Map.entry(new REFIID(IDebugControl.IID_IDEBUG_CONTROL), WrapIDebugControl.class));
|
||||
|
||||
static DebugControlInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgEngUtil.tryPreferredInterfaces(DebugControlInternal.class, PREFERRED_CONTROL_IIDS,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgeng.impl.dbgeng.dataspaces;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -46,19 +45,16 @@ public interface DebugDataSpacesInternal extends DebugDataSpaces {
|
||||
return DbgEngUtil.lazyWeakCache(CACHE, data, DebugDataSpacesImpl4::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugDataSpaces>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugDataSpaces>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugDataSpaces4.IID_IDEBUG_DATA_SPACES4),
|
||||
WrapIDebugDataSpaces4.class) //
|
||||
.put(new REFIID(IDebugDataSpaces3.IID_IDEBUG_DATA_SPACES3),
|
||||
WrapIDebugDataSpaces3.class) //
|
||||
.put(new REFIID(IDebugDataSpaces2.IID_IDEBUG_DATA_SPACES2),
|
||||
WrapIDebugDataSpaces2.class) //
|
||||
.put(new REFIID(IDebugDataSpaces.IID_IDEBUG_DATA_SPACES),
|
||||
WrapIDebugDataSpaces.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugDataSpaces4.IID_IDEBUG_DATA_SPACES4),
|
||||
WrapIDebugDataSpaces4.class),
|
||||
Map.entry(new REFIID(IDebugDataSpaces3.IID_IDEBUG_DATA_SPACES3),
|
||||
WrapIDebugDataSpaces3.class),
|
||||
Map.entry(new REFIID(IDebugDataSpaces2.IID_IDEBUG_DATA_SPACES2),
|
||||
WrapIDebugDataSpaces2.class),
|
||||
Map.entry(new REFIID(IDebugDataSpaces.IID_IDEBUG_DATA_SPACES),
|
||||
WrapIDebugDataSpaces.class));
|
||||
|
||||
static DebugDataSpacesInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgEngUtil.tryPreferredInterfaces(DebugDataSpacesInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgeng.impl.dbgeng.registers;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -38,13 +37,12 @@ public interface DebugRegistersInternal extends DebugRegisters {
|
||||
return DbgEngUtil.lazyWeakCache(CACHE, registers, DebugRegistersImpl2::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugRegisters>> PREFERRED_REGISTERS_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugRegisters>> PREFERRED_REGISTERS_IIDS =
|
||||
PREFERRED_REGISTERS_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugRegisters2.IID_IDEBUG_REGISTERS2), WrapIDebugRegisters2.class) //
|
||||
.put(new REFIID(IDebugRegisters.IID_IDEBUG_REGISTERS), WrapIDebugRegisters.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugRegisters2.IID_IDEBUG_REGISTERS2),
|
||||
WrapIDebugRegisters2.class),
|
||||
Map.entry(new REFIID(IDebugRegisters.IID_IDEBUG_REGISTERS),
|
||||
WrapIDebugRegisters.class));
|
||||
|
||||
static DebugRegistersInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgEngUtil.tryPreferredInterfaces(DebugRegistersInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgeng.impl.dbgeng.symbols;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -51,16 +50,13 @@ public interface DebugSymbolsInternal extends DebugSymbols {
|
||||
return DbgEngUtil.lazyWeakCache(CACHE, symbols, DebugSymbolsImpl5::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugSymbols>> PREFERRED_SYMBOLS_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugSymbols>> PREFFERED_SYMBOLS_IIDS =
|
||||
PREFERRED_SYMBOLS_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugSymbols5.IID_IDEBUG_SYMBOLS5), WrapIDebugSymbols5.class) //
|
||||
.put(new REFIID(IDebugSymbols4.IID_IDEBUG_SYMBOLS4), WrapIDebugSymbols4.class) //
|
||||
.put(new REFIID(IDebugSymbols3.IID_IDEBUG_SYMBOLS3), WrapIDebugSymbols3.class) //
|
||||
.put(new REFIID(IDebugSymbols2.IID_IDEBUG_SYMBOLS2), WrapIDebugSymbols2.class) //
|
||||
.put(new REFIID(IDebugSymbols.IID_IDEBUG_SYMBOLS), WrapIDebugSymbols.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugSymbols5.IID_IDEBUG_SYMBOLS5), WrapIDebugSymbols5.class),
|
||||
Map.entry(new REFIID(IDebugSymbols4.IID_IDEBUG_SYMBOLS4), WrapIDebugSymbols4.class),
|
||||
Map.entry(new REFIID(IDebugSymbols3.IID_IDEBUG_SYMBOLS3), WrapIDebugSymbols3.class),
|
||||
Map.entry(new REFIID(IDebugSymbols2.IID_IDEBUG_SYMBOLS2), WrapIDebugSymbols2.class),
|
||||
Map.entry(new REFIID(IDebugSymbols.IID_IDEBUG_SYMBOLS), WrapIDebugSymbols.class));
|
||||
|
||||
static DebugSymbolsInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgEngUtil.tryPreferredInterfaces(DebugSymbolsInternal.class, PREFFERED_SYMBOLS_IIDS,
|
||||
@ -69,6 +65,7 @@ public interface DebugSymbolsInternal extends DebugSymbols {
|
||||
|
||||
String getModuleName(DebugModuleName which, DebugModule module);
|
||||
|
||||
@Override
|
||||
DebugModuleInfo getModuleParameters(int count, int startIndex);
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgeng.impl.dbgeng.sysobj;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -46,19 +45,16 @@ public interface DebugSystemObjectsInternal extends DebugSystemObjects {
|
||||
return DbgEngUtil.lazyWeakCache(CACHE, sysobj, DebugSystemObjectsImpl4::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugSystemObjects>> PREFERRED_SYSTEM_OBJECTS_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugSystemObjects>> PREFERRED_SYSTEM_OBJECTS_IIDS =
|
||||
PREFERRED_SYSTEM_OBJECTS_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugSystemObjects4.IID_IDEBUG_SYSTEM_OBJECTS4),
|
||||
WrapIDebugSystemObjects4.class) //
|
||||
.put(new REFIID(IDebugSystemObjects3.IID_IDEBUG_SYSTEM_OBJECTS3),
|
||||
WrapIDebugSystemObjects3.class) //
|
||||
.put(new REFIID(IDebugSystemObjects2.IID_IDEBUG_SYSTEM_OBJECTS2),
|
||||
WrapIDebugSystemObjects2.class) //
|
||||
.put(new REFIID(IDebugSystemObjects.IID_IDEBUG_SYSTEM_OBJECTS),
|
||||
WrapIDebugSystemObjects.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugSystemObjects4.IID_IDEBUG_SYSTEM_OBJECTS4),
|
||||
WrapIDebugSystemObjects4.class),
|
||||
Map.entry(new REFIID(IDebugSystemObjects3.IID_IDEBUG_SYSTEM_OBJECTS3),
|
||||
WrapIDebugSystemObjects3.class),
|
||||
Map.entry(new REFIID(IDebugSystemObjects2.IID_IDEBUG_SYSTEM_OBJECTS2),
|
||||
WrapIDebugSystemObjects2.class),
|
||||
Map.entry(new REFIID(IDebugSystemObjects.IID_IDEBUG_SYSTEM_OBJECTS),
|
||||
WrapIDebugSystemObjects.class));
|
||||
|
||||
static DebugSystemObjectsInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgEngUtil.tryPreferredInterfaces(DebugSystemObjectsInternal.class,
|
||||
|
@ -26,6 +26,7 @@ import ghidra.dbg.target.TargetBreakpointSpec;
|
||||
import ghidra.dbg.target.schema.TargetAttributeType;
|
||||
import ghidra.dbg.target.schema.TargetObjectSchemaInfo;
|
||||
import ghidra.dbg.util.PathUtils;
|
||||
import ghidra.util.datastruct.ListenerMap.ListenerEntry;
|
||||
import ghidra.util.datastruct.ListenerSet;
|
||||
|
||||
@TargetObjectSchemaInfo(
|
||||
@ -84,8 +85,9 @@ public class DbgModelTargetBreakpointSpecImpl extends DbgModelTargetObjectImpl
|
||||
private final ListenerSet<TargetBreakpointAction> actions =
|
||||
new ListenerSet<>(TargetBreakpointAction.class) {
|
||||
// Use strong references on actions
|
||||
protected Map<TargetBreakpointAction, TargetBreakpointAction> createMap() {
|
||||
return Collections.synchronizedMap(new LinkedHashMap<>());
|
||||
// The values may be weak, but the keys, which are the same objects, are strong
|
||||
protected Map<TargetBreakpointAction, ListenerEntry<? extends TargetBreakpointAction>> createMap() {
|
||||
return new LinkedHashMap<>();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -17,16 +17,13 @@ package agent.dbgmodel.impl.dbgmodel;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
import com.sun.jna.platform.win32.COM.IUnknown;
|
||||
|
||||
import agent.dbgmodel.dbgmodel.UnknownEx;
|
||||
import agent.dbgmodel.impl.dbgmodel.DbgModelUtil.InterfaceSupplier;
|
||||
import agent.dbgmodel.jna.dbgmodel.WrapIUnknownEx;
|
||||
|
||||
import com.sun.jna.platform.win32.COM.IUnknown;
|
||||
|
||||
import ghidra.util.datastruct.WeakValueHashMap;
|
||||
|
||||
public interface UnknownExInternal extends UnknownEx {
|
||||
@ -36,12 +33,9 @@ public interface UnknownExInternal extends UnknownEx {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, UnknownExImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIUnknownEx>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIUnknownEx>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IUnknown.IID_IUNKNOWN), WrapIUnknownEx.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IUnknown.IID_IUNKNOWN), WrapIUnknownEx.class));
|
||||
|
||||
static UnknownExInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(UnknownExInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.bridge;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface HostDataModelAccessInternal extends HostDataModelAccess {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, HostDataModelAccessImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIHostDataModelAccess>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIHostDataModelAccess>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IHostDataModelAccess.IID_IHOST_DATA_MODEL_ACCESS),
|
||||
WrapIHostDataModelAccess.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IHostDataModelAccess.IID_IHOST_DATA_MODEL_ACCESS),
|
||||
WrapIHostDataModelAccess.class));
|
||||
|
||||
static HostDataModelAccessInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(HostDataModelAccessInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.concept;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface ComparableConceptInternal extends ComparableConcept {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, ComparableConceptImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIComparableConcept>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIComparableConcept>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IComparableConcept.IID_ICOMPARABLE_CONCEPT),
|
||||
WrapIComparableConcept.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IComparableConcept.IID_ICOMPARABLE_CONCEPT),
|
||||
WrapIComparableConcept.class));
|
||||
|
||||
static ComparableConceptInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(ComparableConceptInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.concept;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DataModelConceptInternal extends DataModelConcept {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelConceptImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelConcept>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelConcept>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDataModelConcept.IID_IDATA_MODEL_CONCEPT),
|
||||
WrapIDataModelConcept.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDataModelConcept.IID_IDATA_MODEL_CONCEPT),
|
||||
WrapIDataModelConcept.class));
|
||||
|
||||
static DataModelConceptInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DataModelConceptInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.concept;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -36,15 +35,12 @@ public interface DynamicConceptProviderConceptInternal extends DynamicConceptPro
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DynamicConceptProviderConceptImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDynamicConceptProviderConcept>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDynamicConceptProviderConcept>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(
|
||||
new REFIID(
|
||||
IDynamicConceptProviderConcept.IID_IDYNAMIC_CONCEPT_PROVIDER_CONCEPT),
|
||||
WrapIDynamicConceptProviderConcept.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(
|
||||
new REFIID(
|
||||
IDynamicConceptProviderConcept.IID_IDYNAMIC_CONCEPT_PROVIDER_CONCEPT),
|
||||
WrapIDynamicConceptProviderConcept.class));
|
||||
|
||||
static DynamicConceptProviderConceptInternal tryPreferredInterfaces(
|
||||
InterfaceSupplier supplier) {
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.concept;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DynamicKeyProviderConceptInternal extends DynamicKeyProviderCon
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DynamicKeyProviderConceptImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDynamicKeyProviderConcept>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDynamicKeyProviderConcept>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDynamicKeyProviderConcept.IID_IDYNAMIC_KEY_PROVIDER_CONCEPT),
|
||||
WrapIDynamicKeyProviderConcept.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDynamicKeyProviderConcept.IID_IDYNAMIC_KEY_PROVIDER_CONCEPT),
|
||||
WrapIDynamicKeyProviderConcept.class));
|
||||
|
||||
static DynamicKeyProviderConceptInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DynamicKeyProviderConceptInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.concept;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface EquatableConceptInternal extends EquatableConcept {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, EquatableConceptImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIEquatableConcept>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIEquatableConcept>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IEquatableConcept.IID_IEQUATABLE_CONCEPT),
|
||||
WrapIEquatableConcept.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IEquatableConcept.IID_IEQUATABLE_CONCEPT),
|
||||
WrapIEquatableConcept.class));
|
||||
|
||||
static EquatableConceptInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(EquatableConceptInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.concept;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface IndexableConceptInternal extends IndexableConcept {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, IndexableConceptImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIIndexableConcept>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIIndexableConcept>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IIndexableConcept.IID_IINDEXABLE_CONCEPT),
|
||||
WrapIIndexableConcept.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IIndexableConcept.IID_IINDEXABLE_CONCEPT),
|
||||
WrapIIndexableConcept.class));
|
||||
|
||||
static IndexableConceptInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(IndexableConceptInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.concept;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,12 +34,10 @@ public interface IterableConceptInternal extends IterableConcept {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, IterableConceptImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIIterableConcept>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIIterableConcept>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IIterableConcept.IID_IITERABLE_CONCEPT), WrapIIterableConcept.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IIterableConcept.IID_IITERABLE_CONCEPT),
|
||||
WrapIIterableConcept.class));
|
||||
|
||||
static IterableConceptInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(IterableConceptInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.concept;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface PreferredRuntimeTypeConceptInternal extends PreferredRuntimeTyp
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, PreferredRuntimeTypeConceptImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIPreferredRuntimeTypeConcept>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIPreferredRuntimeTypeConcept>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IPreferredRuntimeTypeConcept.IID_IPREFERRED_RUNTIME_TYPE_CONCEPT),
|
||||
WrapIPreferredRuntimeTypeConcept.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IPreferredRuntimeTypeConcept.IID_IPREFERRED_RUNTIME_TYPE_CONCEPT),
|
||||
WrapIPreferredRuntimeTypeConcept.class));
|
||||
|
||||
static PreferredRuntimeTypeConceptInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(PreferredRuntimeTypeConceptInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.concept;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface StringDisplayableConceptInternal extends StringDisplayableConce
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, StringDisplayableConceptImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIStringDisplayableConcept>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIStringDisplayableConcept>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IStringDisplayableConcept.IID_ISTRING_DISPLAYABLE_CONCEPT),
|
||||
WrapIStringDisplayableConcept.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IStringDisplayableConcept.IID_ISTRING_DISPLAYABLE_CONCEPT),
|
||||
WrapIStringDisplayableConcept.class));
|
||||
|
||||
static StringDisplayableConceptInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(StringDisplayableConceptInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -38,15 +37,12 @@ public interface DataModelManagerInternal extends DataModelManager1 {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelManagerImpl2::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelManager1>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelManager1>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDataModelManager2.IID_IDATA_MODEL_MANAGER2),
|
||||
WrapIDataModelManager2.class) //
|
||||
.put(new REFIID(IDataModelManager1.IID_IDATA_MODEL_MANAGER),
|
||||
WrapIDataModelManager1.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDataModelManager2.IID_IDATA_MODEL_MANAGER2),
|
||||
WrapIDataModelManager2.class),
|
||||
Map.entry(new REFIID(IDataModelManager1.IID_IDATA_MODEL_MANAGER),
|
||||
WrapIDataModelManager1.class));
|
||||
|
||||
static DataModelManagerInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DataModelManagerInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DataModelNameBinderInternal extends DataModelNameBinder {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelNameBinderImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelNameBinder>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelNameBinder>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDataModelNameBinder.IID_IDATA_MODEL_NAME_BINDER),
|
||||
WrapIDataModelNameBinder.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDataModelNameBinder.IID_IDATA_MODEL_NAME_BINDER),
|
||||
WrapIDataModelNameBinder.class));
|
||||
|
||||
static DataModelNameBinderInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DataModelNameBinderInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DataModelScriptClientInternal extends DataModelScriptClient {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelScriptClientImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptClient>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptClient>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDataModelScriptClient.IID_IDATA_MODEL_SCRIPT_CLIENT),
|
||||
WrapIDataModelScriptClient.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDataModelScriptClient.IID_IDATA_MODEL_SCRIPT_CLIENT),
|
||||
WrapIDataModelScriptClient.class));
|
||||
|
||||
static DataModelScriptClientInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DataModelScriptClientInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DataModelScriptHostContextInternal extends DataModelScriptHostC
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelScriptHostContextImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptHostContext>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptHostContext>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDataModelScriptHostContext.IID_IDATA_MODEL_SCRIPT_HOST_CONTEXT),
|
||||
WrapIDataModelScriptHostContext.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDataModelScriptHostContext.IID_IDATA_MODEL_SCRIPT_HOST_CONTEXT),
|
||||
WrapIDataModelScriptHostContext.class));
|
||||
|
||||
static DataModelScriptHostContextInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DataModelScriptHostContextInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DataModelScriptInternal extends DataModelScript {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelScriptImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScript>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScript>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDataModelScript.IID_IDATA_MODEL_SCRIPT),
|
||||
WrapIDataModelScript.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDataModelScript.IID_IDATA_MODEL_SCRIPT),
|
||||
WrapIDataModelScript.class));
|
||||
|
||||
static DataModelScriptInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DataModelScriptInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DataModelScriptManagerInternal extends DataModelScriptManager {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelScriptManagerImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptManager>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptManager>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDataModelScriptManager.IID_IDATA_MODEL_SCRIPT_MANAGER),
|
||||
WrapIDataModelScriptManager.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDataModelScriptManager.IID_IDATA_MODEL_SCRIPT_MANAGER),
|
||||
WrapIDataModelScriptManager.class));
|
||||
|
||||
static DataModelScriptManagerInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DataModelScriptManagerInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -37,15 +36,12 @@ public interface DataModelScriptProviderEnumeratorInternal
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelScriptProviderEnumeratorImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptProviderEnumerator>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptProviderEnumerator>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(
|
||||
new REFIID(
|
||||
IDataModelScriptProviderEnumerator.IID_IDATA_MODEL_SCRIPT_PROVIDER_ENUMERATOR),
|
||||
WrapIDataModelScriptProviderEnumerator.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(
|
||||
new REFIID(
|
||||
IDataModelScriptProviderEnumerator.IID_IDATA_MODEL_SCRIPT_PROVIDER_ENUMERATOR),
|
||||
WrapIDataModelScriptProviderEnumerator.class));
|
||||
|
||||
static DataModelScriptProviderEnumeratorInternal tryPreferredInterfaces(
|
||||
InterfaceSupplier supplier) {
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DataModelScriptProviderInternal extends DataModelScriptProvider
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelScriptProviderImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptProvider>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptProvider>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDataModelScriptProvider.IID_IDATA_MODEL_SCRIPT_PROVIDER),
|
||||
WrapIDataModelScriptProvider.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDataModelScriptProvider.IID_IDATA_MODEL_SCRIPT_PROVIDER),
|
||||
WrapIDataModelScriptProvider.class));
|
||||
|
||||
static DataModelScriptProviderInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DataModelScriptProviderInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -37,15 +36,11 @@ public interface DataModelScriptTemplateEnumeratorInternal
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelScriptTemplateEnumeratorImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptTemplateEnumerator>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptTemplateEnumerator>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(
|
||||
new REFIID(
|
||||
IDataModelScriptTemplateEnumerator.IID_IDATA_MODEL_SCRIPT_TEMPLATE_ENUMERATOR),
|
||||
WrapIDataModelScriptTemplateEnumerator.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(
|
||||
IDataModelScriptTemplateEnumerator.IID_IDATA_MODEL_SCRIPT_TEMPLATE_ENUMERATOR),
|
||||
WrapIDataModelScriptTemplateEnumerator.class));
|
||||
|
||||
static DataModelScriptTemplateEnumeratorInternal tryPreferredInterfaces(
|
||||
InterfaceSupplier supplier) {
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DataModelScriptTemplateInternal extends DataModelScriptTemplate
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelScriptTemplateImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptTemplate>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptTemplate>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDataModelScriptTemplate.IID_IDATA_MODEL_SCRIPT_TEMPLATE),
|
||||
WrapIDataModelScriptTemplate.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDataModelScriptTemplate.IID_IDATA_MODEL_SCRIPT_TEMPLATE),
|
||||
WrapIDataModelScriptTemplate.class));
|
||||
|
||||
static DataModelScriptTemplateInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DataModelScriptTemplateInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script.debug;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -38,15 +37,12 @@ public interface DataModelScriptDebugBreakpointEnumeratorInternal
|
||||
DataModelScriptDebugBreakpointEnumeratorImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptDebugBreakpointEnumerator>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptDebugBreakpointEnumerator>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(
|
||||
new REFIID(
|
||||
IDataModelScriptDebugBreakpointEnumerator.IID_IDATA_MODEL_SCRIPT_DEBUG_BREAKPOINT_ENUMERATOR),
|
||||
WrapIDataModelScriptDebugBreakpointEnumerator.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(
|
||||
new REFIID(
|
||||
IDataModelScriptDebugBreakpointEnumerator.IID_IDATA_MODEL_SCRIPT_DEBUG_BREAKPOINT_ENUMERATOR),
|
||||
WrapIDataModelScriptDebugBreakpointEnumerator.class));
|
||||
|
||||
static DataModelScriptDebugBreakpointEnumeratorInternal tryPreferredInterfaces(
|
||||
InterfaceSupplier supplier) {
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script.debug;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -36,15 +35,12 @@ public interface DataModelScriptDebugBreakpointInternal extends DataModelScriptD
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelScriptDebugBreakpointImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptDebugBreakpoint>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptDebugBreakpoint>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(
|
||||
new REFIID(
|
||||
IDataModelScriptDebugBreakpoint.IID_IDATA_MODEL_SCRIPT_DEBUG_BREAKPOINT),
|
||||
WrapIDataModelScriptDebugBreakpoint.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(
|
||||
new REFIID(
|
||||
IDataModelScriptDebugBreakpoint.IID_IDATA_MODEL_SCRIPT_DEBUG_BREAKPOINT),
|
||||
WrapIDataModelScriptDebugBreakpoint.class));
|
||||
|
||||
static DataModelScriptDebugBreakpointInternal tryPreferredInterfaces(
|
||||
InterfaceSupplier supplier) {
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script.debug;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -36,14 +35,11 @@ public interface DataModelScriptDebugClientInternal extends DataModelScriptDebug
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelScriptDebugClientImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptDebugClient>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptDebugClient>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(
|
||||
new REFIID(IDataModelScriptDebugClient.IID_IDATA_MODEL_SCRIPT_DEBUG_CLIENT),
|
||||
WrapIDataModelScriptDebugClient.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(
|
||||
new REFIID(IDataModelScriptDebugClient.IID_IDATA_MODEL_SCRIPT_DEBUG_CLIENT),
|
||||
WrapIDataModelScriptDebugClient.class));
|
||||
|
||||
static DataModelScriptDebugClientInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DataModelScriptDebugClientInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script.debug;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -34,15 +33,12 @@ public interface DataModelScriptDebugInternal extends DataModelScriptDebug1 {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelScriptDebugImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptDebug>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptDebug>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDataModelScriptDebug2.IID_IDATA_MODEL_SCRIPT_DEBUG2),
|
||||
WrapIDataModelScriptDebug.class) //
|
||||
.put(new REFIID(IDataModelScriptDebug.IID_IDATA_MODEL_SCRIPT_DEBUG),
|
||||
WrapIDataModelScriptDebug.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDataModelScriptDebug2.IID_IDATA_MODEL_SCRIPT_DEBUG2),
|
||||
WrapIDataModelScriptDebug.class),
|
||||
Map.entry(new REFIID(IDataModelScriptDebug.IID_IDATA_MODEL_SCRIPT_DEBUG),
|
||||
WrapIDataModelScriptDebug.class));
|
||||
|
||||
static DataModelScriptDebugInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DataModelScriptDebugInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script.debug;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -36,15 +35,12 @@ public interface DataModelScriptDebugStackFrameInternal extends DataModelScriptD
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelScriptDebugStackFrameImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptDebugStackFrame>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptDebugStackFrame>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(
|
||||
new REFIID(
|
||||
IDataModelScriptDebugStackFrame.IID_IDATA_MODEL_SCRIPT_DEBUG_STACK_FRAME),
|
||||
WrapIDataModelScriptDebugStackFrame.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(
|
||||
new REFIID(
|
||||
IDataModelScriptDebugStackFrame.IID_IDATA_MODEL_SCRIPT_DEBUG_STACK_FRAME),
|
||||
WrapIDataModelScriptDebugStackFrame.class));
|
||||
|
||||
static DataModelScriptDebugStackFrameInternal tryPreferredInterfaces(
|
||||
InterfaceSupplier supplier) {
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script.debug;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -36,14 +35,11 @@ public interface DataModelScriptDebugStackInternal extends DataModelScriptDebugS
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DataModelScriptDebugStackImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptDebugStack>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptDebugStack>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(
|
||||
new REFIID(IDataModelScriptDebugStack.IID_IDATA_MODEL_SCRIPT_DEBUG_STACK),
|
||||
WrapIDataModelScriptDebugStack.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(
|
||||
new REFIID(IDataModelScriptDebugStack.IID_IDATA_MODEL_SCRIPT_DEBUG_STACK),
|
||||
WrapIDataModelScriptDebugStack.class));
|
||||
|
||||
static DataModelScriptDebugStackInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DataModelScriptDebugStackInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.datamodel.script.debug;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -39,15 +38,12 @@ public interface DataModelScriptDebugVariableSetEnumeratorInternal
|
||||
DataModelScriptDebugVariableSetEnumeratorImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDataModelScriptDebugVariableSetEnumerator>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDataModelScriptDebugVariableSetEnumerator>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(
|
||||
new REFIID(
|
||||
IDataModelScriptDebugVariableSetEnumerator.IID_IDATA_MODEL_SCRIPT_DEBUG_VARIABLE_SET_ENUMERATOR),
|
||||
WrapIDataModelScriptDebugVariableSetEnumerator.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(
|
||||
new REFIID(
|
||||
IDataModelScriptDebugVariableSetEnumerator.IID_IDATA_MODEL_SCRIPT_DEBUG_VARIABLE_SET_ENUMERATOR),
|
||||
WrapIDataModelScriptDebugVariableSetEnumerator.class));
|
||||
|
||||
static DataModelScriptDebugVariableSetEnumeratorInternal tryPreferredInterfaces(
|
||||
InterfaceSupplier supplier) {
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -36,13 +35,10 @@ public interface DebugHostBaseClassInternal extends DebugHostBase {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, X_DebugHostBaseClassImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends X_WrapIDebugHostBaseClass>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends X_WrapIDebugHostBaseClass>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(X_IDebugHostBaseClass.IID_IDEBUG_HOST_BASE_CLASS),
|
||||
X_WrapIDebugHostBaseClass.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(X_IDebugHostBaseClass.IID_IDEBUG_HOST_BASE_CLASS),
|
||||
X_WrapIDebugHostBaseClass.class));
|
||||
|
||||
static X_DebugHostBaseClassInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(X_DebugHostBaseClassInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DebugHostConstantInternal extends DebugHostConstant {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostConstantImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostConstant>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostConstant>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostConstant.IID_IDEBUG_HOST_CONSTANT),
|
||||
WrapIDebugHostConstant.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostConstant.IID_IDEBUG_HOST_CONSTANT),
|
||||
WrapIDebugHostConstant.class));
|
||||
|
||||
static DebugHostConstantInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostConstantInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DebugHostContextInternal extends DebugHostContext {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostContextImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostContext>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostContext>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostContext.IID_IDEBUG_HOST_CONTEXT),
|
||||
WrapIDebugHostContext.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostContext.IID_IDEBUG_HOST_CONTEXT),
|
||||
WrapIDebugHostContext.class));
|
||||
|
||||
static DebugHostContextInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostContextInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,12 +34,9 @@ public interface DebugHostDataInternal extends DebugHostData {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostDataImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostData>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostData>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostData.IID_IDEBUG_HOST_DATA), WrapIDebugHostData.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostData.IID_IDEBUG_HOST_DATA), WrapIDebugHostData.class));
|
||||
|
||||
static DebugHostDataInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostDataInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DebugHostErrorSinkInternal extends DebugHostErrorSink {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostErrorSinkImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostErrorSink>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostErrorSink>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostErrorSink.IID_IDEBUG_HOST_ERROR_SINK),
|
||||
WrapIDebugHostErrorSink.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostErrorSink.IID_IDEBUG_HOST_ERROR_SINK),
|
||||
WrapIDebugHostErrorSink.class));
|
||||
|
||||
static DebugHostErrorSinkInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostErrorSinkInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -38,15 +37,12 @@ public interface DebugHostEvaluatorInternal extends DebugHostEvaluator1 {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostEvaluatorImpl2::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostEvaluator1>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostEvaluator1>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostEvaluator2.IID_IDEBUG_HOST_EVALUATOR2),
|
||||
WrapIDebugHostEvaluator2.class) //
|
||||
.put(new REFIID(IDebugHostEvaluator1.IID_IDEBUG_HOST_EVALUATOR),
|
||||
WrapIDebugHostEvaluator1.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostEvaluator2.IID_IDEBUG_HOST_EVALUATOR2),
|
||||
WrapIDebugHostEvaluator2.class),
|
||||
Map.entry(new REFIID(IDebugHostEvaluator1.IID_IDEBUG_HOST_EVALUATOR),
|
||||
WrapIDebugHostEvaluator1.class));
|
||||
|
||||
static DebugHostEvaluatorInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostEvaluatorInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DebugHostExtensabilityInternal extends DebugHostExtensability {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostExtensabilityImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostExtensability>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostExtensability>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostExtensability.IID_IDEBUG_HOST_EXTENSABILITY),
|
||||
WrapIDebugHostExtensability.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostExtensability.IID_IDEBUG_HOST_EXTENSABILITY),
|
||||
WrapIDebugHostExtensability.class));
|
||||
|
||||
static DebugHostExtensabilityInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostExtensabilityInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,12 +34,10 @@ public interface DebugHostFieldInternal extends DebugHostField {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostFieldImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostField>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostField>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostField.IID_IDEBUG_HOST_FIELD), WrapIDebugHostField.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostField.IID_IDEBUG_HOST_FIELD),
|
||||
WrapIDebugHostField.class));
|
||||
|
||||
static DebugHostFieldInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostFieldInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,12 +34,9 @@ public interface DebugHostInternal extends DebugHost {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHost>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHost>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHost.IID_IDEBUG_HOST), WrapIDebugHost.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHost.IID_IDEBUG_HOST), WrapIDebugHost.class));
|
||||
|
||||
static DebugHostInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -38,15 +37,12 @@ public interface DebugHostMemoryInternal extends DebugHostMemory1 {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostMemoryImpl2::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostMemory1>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostMemory1>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostMemory2.IID_IDEBUG_HOST_MEMORY2),
|
||||
WrapIDebugHostMemory2.class) //
|
||||
.put(new REFIID(IDebugHostMemory1.IID_IDEBUG_HOST_MEMORY),
|
||||
WrapIDebugHostMemory1.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostMemory2.IID_IDEBUG_HOST_MEMORY2),
|
||||
WrapIDebugHostMemory2.class),
|
||||
Map.entry(new REFIID(IDebugHostMemory1.IID_IDEBUG_HOST_MEMORY),
|
||||
WrapIDebugHostMemory1.class));
|
||||
|
||||
static DebugHostMemoryInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostMemoryInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -38,15 +37,12 @@ public interface DebugHostModuleInternal extends DebugHostModule1 {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostModuleImpl2::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostModule1>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostModule1>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostModule2.IID_IDEBUG_HOST_MODULE2),
|
||||
WrapIDebugHostModule2.class) //
|
||||
.put(new REFIID(IDebugHostModule1.IID_IDEBUG_HOST_MODULE),
|
||||
WrapIDebugHostModule1.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostModule2.IID_IDEBUG_HOST_MODULE2),
|
||||
WrapIDebugHostModule2.class),
|
||||
Map.entry(new REFIID(IDebugHostModule1.IID_IDEBUG_HOST_MODULE),
|
||||
WrapIDebugHostModule1.class));
|
||||
|
||||
static DebugHostModuleInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostModuleInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DebugHostModuleSignatureInternal extends DebugHostModuleSignatu
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostModuleSignatureImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostModuleSignature>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostModuleSignature>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostModuleSignature.IID_IDEBUG_HOST_MODULE_SIGNATURE),
|
||||
WrapIDebugHostModuleSignature.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostModuleSignature.IID_IDEBUG_HOST_MODULE_SIGNATURE),
|
||||
WrapIDebugHostModuleSignature.class));
|
||||
|
||||
static DebugHostModuleSignatureInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostModuleSignatureInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DebugHostPublicInternal extends DebugHostPublic {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostPublicImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostPublic>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostPublic>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostPublic.IID_IDEBUG_HOST_PUBLIC),
|
||||
WrapIDebugHostPublic.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostPublic.IID_IDEBUG_HOST_PUBLIC),
|
||||
WrapIDebugHostPublic.class));
|
||||
|
||||
static DebugHostPublicInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostPublicInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DebugHostScriptHostInternal extends DebugHostScriptHost {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostScriptHostImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostScriptHost>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostScriptHost>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostScriptHost.IID_IDEBUG_HOST_SCRIPT_HOST),
|
||||
WrapIDebugHostScriptHost.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostScriptHost.IID_IDEBUG_HOST_SCRIPT_HOST),
|
||||
WrapIDebugHostScriptHost.class));
|
||||
|
||||
static DebugHostScriptHostInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostScriptHostInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DebugHostStatusInternal extends DebugHostStatus {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostStatusImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostStatus>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostStatus>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostStatus.IID_IDEBUG_HOST_STATUS),
|
||||
WrapIDebugHostStatus.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostStatus.IID_IDEBUG_HOST_STATUS),
|
||||
WrapIDebugHostStatus.class));
|
||||
|
||||
static DebugHostStatusInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostStatusInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DebugHostSymbolEnumeratorInternal extends DebugHostSymbolEnumer
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostSymbolEnumeratorImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostSymbolEnumerator>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostSymbolEnumerator>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostSymbolEnumerator.IID_IDEBUG_HOST_SYMBOL_ENUMERATOR),
|
||||
WrapIDebugHostSymbolEnumerator.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostSymbolEnumerator.IID_IDEBUG_HOST_SYMBOL_ENUMERATOR),
|
||||
WrapIDebugHostSymbolEnumerator.class));
|
||||
|
||||
static DebugHostSymbolEnumeratorInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostSymbolEnumeratorInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -38,15 +37,12 @@ public interface DebugHostSymbolInternal extends DebugHostSymbol1 {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostSymbolImpl2::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostSymbol1>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostSymbol1>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostSymbol2.IID_IDEBUG_HOST_SYMBOL2),
|
||||
WrapIDebugHostSymbol2.class) //
|
||||
.put(new REFIID(IDebugHostSymbol1.IID_IDEBUG_HOST_SYMBOL),
|
||||
WrapIDebugHostSymbol1.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostSymbol2.IID_IDEBUG_HOST_SYMBOL2),
|
||||
WrapIDebugHostSymbol2.class),
|
||||
Map.entry(new REFIID(IDebugHostSymbol1.IID_IDEBUG_HOST_SYMBOL),
|
||||
WrapIDebugHostSymbol1.class));
|
||||
|
||||
static DebugHostSymbolInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostSymbolInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DebugHostSymbolsInternal extends DebugHostSymbols {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostSymbolsImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostSymbols>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostSymbols>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostSymbols.IID_IDEBUG_HOST_SYMBOLS),
|
||||
WrapIDebugHostSymbols.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostSymbols.IID_IDEBUG_HOST_SYMBOLS),
|
||||
WrapIDebugHostSymbols.class));
|
||||
|
||||
static DebugHostSymbolsInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostSymbolsInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -38,13 +37,10 @@ public interface DebugHostTypeInternal extends DebugHostType1 {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostTypeImpl2::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostType1>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostType1>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostType2.IID_IDEBUG_HOST_TYPE2), WrapIDebugHostType2.class) //
|
||||
.put(new REFIID(IDebugHostType1.IID_IDEBUG_HOST_TYPE), WrapIDebugHostType1.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostType2.IID_IDEBUG_HOST_TYPE2), WrapIDebugHostType2.class),
|
||||
Map.entry(new REFIID(IDebugHostType1.IID_IDEBUG_HOST_TYPE), WrapIDebugHostType1.class));
|
||||
|
||||
static DebugHostTypeInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostTypeInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface DebugHostTypeSignatureInternal extends DebugHostTypeSignature {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, DebugHostTypeSignatureImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIDebugHostTypeSignature>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIDebugHostTypeSignature>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IDebugHostTypeSignature.IID_IDEBUG_HOST_TYPE_SIGNATURE),
|
||||
WrapIDebugHostTypeSignature.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IDebugHostTypeSignature.IID_IDEBUG_HOST_TYPE_SIGNATURE),
|
||||
WrapIDebugHostTypeSignature.class));
|
||||
|
||||
static DebugHostTypeSignatureInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(DebugHostTypeSignatureInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.debughost;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface X_DebugHostBaseClassInternal extends DebugHostBaseClass {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, X_DebugHostBaseClassImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends X_WrapIDebugHostBaseClass>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends X_WrapIDebugHostBaseClass>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(X_IDebugHostBaseClass.IID_IDEBUG_HOST_BASE_CLASS),
|
||||
X_WrapIDebugHostBaseClass.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(X_IDebugHostBaseClass.IID_IDEBUG_HOST_BASE_CLASS),
|
||||
X_WrapIDebugHostBaseClass.class));
|
||||
|
||||
static X_DebugHostBaseClassInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(X_DebugHostBaseClassInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.main;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,12 +34,9 @@ public interface KeyEnumeratorInternal extends KeyEnumerator {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, KeyEnumeratorImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIKeyEnumerator>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIKeyEnumerator>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IKeyEnumerator.IID_IKEY_ENUMERATOR), WrapIKeyEnumerator.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IKeyEnumerator.IID_IKEY_ENUMERATOR), WrapIKeyEnumerator.class));
|
||||
|
||||
static KeyEnumeratorInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(KeyEnumeratorInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.main;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,12 +34,9 @@ public interface KeyStoreInternal extends KeyStore {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, KeyStoreImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIKeyStore>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIKeyStore>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IKeyStore.IID_IKEY_STORE), WrapIKeyStore.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IKeyStore.IID_IKEY_STORE), WrapIKeyStore.class));
|
||||
|
||||
static KeyStoreInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(KeyStoreInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.main;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,12 +34,9 @@ public interface ModelIteratorInternal extends ModelIterator {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, ModelIteratorImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIModelIterator>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIModelIterator>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IModelIterator.IID_IMODEL_ITERATOR), WrapIModelIterator.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IModelIterator.IID_IMODEL_ITERATOR), WrapIModelIterator.class));
|
||||
|
||||
static ModelIteratorInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(ModelIteratorInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.main;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -38,15 +37,12 @@ public interface ModelKeyReferenceInternal extends ModelKeyReference1 {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, ModelKeyReferenceImpl2::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIModelKeyReference1>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIModelKeyReference1>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IModelKeyReference2.IID_IMODEL_REFERENCE2),
|
||||
WrapIModelKeyReference2.class) //
|
||||
.put(new REFIID(IModelKeyReference.IID_IMODEL_REFERENCE),
|
||||
WrapIModelKeyReference1.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IModelKeyReference2.IID_IMODEL_REFERENCE2),
|
||||
WrapIModelKeyReference2.class),
|
||||
Map.entry(new REFIID(IModelKeyReference.IID_IMODEL_REFERENCE),
|
||||
WrapIModelKeyReference1.class));
|
||||
|
||||
static ModelKeyReferenceInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(ModelKeyReferenceInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.main;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,12 +34,9 @@ public interface ModelMethodInternal extends ModelMethod {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, ModelMethodImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIModelMethod>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIModelMethod>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IModelMethod.IID_IMODEL_METHOD), WrapIModelMethod.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IModelMethod.IID_IMODEL_METHOD), WrapIModelMethod.class));
|
||||
|
||||
static ModelMethodInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(ModelMethodInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.main;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,12 +34,9 @@ public interface ModelObjectInternal extends ModelObject {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, ModelObjectImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIModelObject>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIModelObject>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IModelObject.IID_IMODEL_OBJECT), WrapIModelObject.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IModelObject.IID_IMODEL_OBJECT), WrapIModelObject.class));
|
||||
|
||||
static ModelObjectInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(ModelObjectInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.main;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,13 +34,10 @@ public interface ModelPropertyAccessorInternal extends ModelPropertyAccessor {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, ModelPropertyAccessorImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIModelPropertyAccessor>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIModelPropertyAccessor>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IModelPropertyAccessor.IID_IMODEL_PROPERTY_ACCESSOR),
|
||||
WrapIModelPropertyAccessor.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IModelPropertyAccessor.IID_IMODEL_PROPERTY_ACCESSOR),
|
||||
WrapIModelPropertyAccessor.class));
|
||||
|
||||
static ModelPropertyAccessorInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(ModelPropertyAccessorInternal.class,
|
||||
|
@ -17,7 +17,6 @@ package agent.dbgmodel.impl.dbgmodel.main;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.win32.Guid.REFIID;
|
||||
|
||||
@ -35,12 +34,9 @@ public interface RawEnumeratorInternal extends RawEnumerator {
|
||||
return DbgModelUtil.lazyWeakCache(CACHE, data, RawEnumeratorImpl::new);
|
||||
}
|
||||
|
||||
ImmutableMap.Builder<REFIID, Class<? extends WrapIRawEnumerator>> PREFERRED_DATA_SPACES_IIDS_BUILDER =
|
||||
ImmutableMap.builder();
|
||||
Map<REFIID, Class<? extends WrapIRawEnumerator>> PREFERRED_DATA_SPACES_IIDS =
|
||||
PREFERRED_DATA_SPACES_IIDS_BUILDER //
|
||||
.put(new REFIID(IRawEnumerator.IID_IRAW_ENUMERATOR), WrapIRawEnumerator.class) //
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry(new REFIID(IRawEnumerator.IID_IRAW_ENUMERATOR), WrapIRawEnumerator.class));
|
||||
|
||||
static RawEnumeratorInternal tryPreferredInterfaces(InterfaceSupplier supplier) {
|
||||
return DbgModelUtil.tryPreferredInterfaces(RawEnumeratorInternal.class,
|
||||
|
@ -18,59 +18,19 @@ package agent.dbgmodel.model.impl;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.lang.ref.Cleaner;
|
||||
import java.lang.ref.Cleaner.Cleanable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import agent.dbgeng.manager.DbgCause;
|
||||
import agent.dbgeng.manager.DbgEventsListener;
|
||||
import agent.dbgeng.manager.DbgProcess;
|
||||
import agent.dbgeng.manager.DbgReason;
|
||||
import agent.dbgeng.manager.DbgState;
|
||||
import agent.dbgeng.manager.DbgStateListener;
|
||||
import agent.dbgeng.manager.DbgThread;
|
||||
import agent.dbgeng.manager.*;
|
||||
import agent.dbgeng.manager.breakpoint.DbgBreakpointInfo;
|
||||
import agent.dbgeng.manager.impl.DbgManagerImpl;
|
||||
import agent.dbgeng.model.iface1.DbgModelTargetAccessConditioned;
|
||||
import agent.dbgeng.model.iface1.DbgModelTargetBptHelper;
|
||||
import agent.dbgeng.model.iface1.DbgModelTargetExecutionStateful;
|
||||
import agent.dbgeng.model.iface1.DbgModelTargetMethod;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetAvailable;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetAvailableContainer;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetBreakpointContainer;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetBreakpointSpec;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetDebugContainer;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetMemoryContainer;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetModule;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetModuleContainer;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetObject;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetProcess;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetProcessContainer;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetRegister;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetRegisterBank;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetRegisterContainer;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetSession;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetSessionAttributes;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetSessionContainer;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetStack;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetStackFrame;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetTTD;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetThread;
|
||||
import agent.dbgeng.model.iface2.DbgModelTargetThreadContainer;
|
||||
import agent.dbgeng.model.iface1.*;
|
||||
import agent.dbgeng.model.iface2.*;
|
||||
import agent.dbgmodel.dbgmodel.main.ModelObject;
|
||||
import agent.dbgmodel.jna.dbgmodel.DbgModelNative.ModelObjectKind;
|
||||
import ghidra.dbg.target.TargetAccessConditioned;
|
||||
import ghidra.dbg.target.*;
|
||||
import ghidra.dbg.target.TargetBreakpointSpec.TargetBreakpointAction;
|
||||
import ghidra.dbg.target.TargetExecutionStateful;
|
||||
import ghidra.dbg.target.TargetObject;
|
||||
import ghidra.dbg.target.TargetRegisterBank;
|
||||
import ghidra.dbg.target.TargetRegisterContainer;
|
||||
import ghidra.dbg.target.TargetStack;
|
||||
import ghidra.dbg.target.TargetStackFrame;
|
||||
import ghidra.dbg.target.TargetThread;
|
||||
import ghidra.dbg.util.PathUtils;
|
||||
import ghidra.util.datastruct.ListenerMap.ListenerEntry;
|
||||
import ghidra.util.datastruct.ListenerSet;
|
||||
|
||||
public class DelegateDbgModel2TargetObject extends DbgModel2TargetObjectImpl implements //
|
||||
@ -198,13 +158,14 @@ public class DelegateDbgModel2TargetObject extends DbgModel2TargetObjectImpl imp
|
||||
protected final Cleanable cleanable;
|
||||
|
||||
private boolean breakpointEnabled;
|
||||
private final ListenerSet<TargetBreakpointAction> breakpointActions = new ListenerSet<>(
|
||||
TargetBreakpointAction.class) {
|
||||
// Use strong references on actions
|
||||
protected Map<TargetBreakpointAction, TargetBreakpointAction> createMap() {
|
||||
return Collections.synchronizedMap(new LinkedHashMap<>());
|
||||
|
||||
private final ListenerSet<TargetBreakpointAction> breakpointActions =
|
||||
new ListenerSet<>(TargetBreakpointAction.class) {
|
||||
// Use strong references on actions
|
||||
protected Map<TargetBreakpointAction, ListenerEntry<? extends TargetBreakpointAction>> createMap() {
|
||||
return new LinkedHashMap<>();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// Extending DefaultTargetObject may spare you from listeners, elements, and
|
||||
// attributes
|
||||
|
@ -18,8 +18,6 @@ package agent.gdb.manager.reason;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import agent.gdb.manager.GdbState;
|
||||
import agent.gdb.manager.parsing.GdbMiParser.GdbMiFieldList;
|
||||
import ghidra.util.Msg;
|
||||
@ -38,13 +36,12 @@ public interface GdbReason {
|
||||
* A map of reason strings to reason classes
|
||||
*/
|
||||
static final Map<String, Function<GdbMiFieldList, ? extends GdbReason>> TYPES =
|
||||
new ImmutableMap.Builder<String, Function<GdbMiFieldList, ? extends GdbReason>>()
|
||||
.put("signal-received", GdbSignalReceivedReason::new)
|
||||
.put("breakpoint-hit", GdbBreakpointHitReason::new)
|
||||
.put("end-stepping-range", GdbEndSteppingRangeReason::new)
|
||||
.put("exited", GdbExitedReason::new)
|
||||
.put("exited-normally", GdbExitNormallyReason::new)
|
||||
.build();
|
||||
Map.ofEntries(
|
||||
Map.entry("signal-received", GdbSignalReceivedReason::new),
|
||||
Map.entry("breakpoint-hit", GdbBreakpointHitReason::new),
|
||||
Map.entry("end-stepping-range", GdbEndSteppingRangeReason::new),
|
||||
Map.entry("exited", GdbExitedReason::new),
|
||||
Map.entry("exited-normally", GdbExitNormallyReason::new));
|
||||
|
||||
/**
|
||||
* Reasons other than those given by GDB
|
||||
|
@ -29,6 +29,7 @@ import ghidra.dbg.target.schema.TargetAttributeType;
|
||||
import ghidra.dbg.target.schema.TargetObjectSchemaInfo;
|
||||
import ghidra.dbg.util.PathUtils;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.datastruct.ListenerMap.ListenerEntry;
|
||||
import ghidra.util.datastruct.ListenerSet;
|
||||
import ghidra.util.datastruct.WeakValueHashMap;
|
||||
|
||||
@ -62,8 +63,8 @@ public class GdbModelTargetBreakpointSpec extends
|
||||
protected final ListenerSet<TargetBreakpointAction> actions =
|
||||
new ListenerSet<>(TargetBreakpointAction.class) {
|
||||
// Use strong references on actions
|
||||
protected Map<TargetBreakpointAction, TargetBreakpointAction> createMap() {
|
||||
return Collections.synchronizedMap(new LinkedHashMap<>());
|
||||
protected Map<TargetBreakpointAction, ListenerEntry<? extends TargetBreakpointAction>> createMap() {
|
||||
return new LinkedHashMap<>();
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -22,10 +22,6 @@ import java.util.function.Consumer;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import agent.gdb.manager.GdbTable;
|
||||
import agent.gdb.manager.parsing.GdbMiParser.GdbMiFieldList;
|
||||
|
||||
public class GdbTableTest {
|
||||
@ -35,16 +31,16 @@ public class GdbTableTest {
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
protected <K, V> Map<K, V> buildMap(Consumer<ImmutableMap.Builder<K, V>> conf) {
|
||||
ImmutableMap.Builder<K, V> builder = ImmutableMap.builder();
|
||||
protected <K, V> Map<K, V> buildMap(Consumer<Map<K, V>> conf) {
|
||||
Map<K, V> builder = new HashMap<>();
|
||||
conf.accept(builder);
|
||||
return builder.build();
|
||||
return Map.copyOf(builder);
|
||||
}
|
||||
|
||||
protected <E> List<E> buildList(Consumer<ImmutableList.Builder<E>> conf) {
|
||||
ImmutableList.Builder<E> builder = ImmutableList.builder();
|
||||
protected <E> List<E> buildList(Consumer<List<E>> conf) {
|
||||
List<E> builder = new ArrayList<>();
|
||||
conf.accept(builder);
|
||||
return builder.build();
|
||||
return List.copyOf(builder);
|
||||
}
|
||||
|
||||
protected GdbTable buildTestTable() {
|
||||
|
@ -18,8 +18,6 @@ package agent.lldb.manager.cmd;
|
||||
import java.math.BigInteger;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import com.google.common.collect.*;
|
||||
|
||||
import SWIG.*;
|
||||
import agent.lldb.manager.impl.LldbManagerImpl;
|
||||
import ghidra.program.model.address.*;
|
||||
|
@ -26,13 +26,14 @@ import ghidra.async.AsyncUtils;
|
||||
import ghidra.dbg.target.TargetBreakpointSpecContainer.TargetBreakpointKindSet;
|
||||
import ghidra.dbg.target.schema.*;
|
||||
import ghidra.dbg.util.PathUtils;
|
||||
import ghidra.util.datastruct.ListenerMap.ListenerEntry;
|
||||
import ghidra.util.datastruct.ListenerSet;
|
||||
import ghidra.util.datastruct.WeakValueHashMap;
|
||||
|
||||
@TargetObjectSchemaInfo(
|
||||
name = "BreakpointSpec",
|
||||
elements = { //
|
||||
@TargetElementType(type = LldbModelTargetBreakpointLocationImpl.class) //
|
||||
@TargetElementType(type = LldbModelTargetBreakpointLocationImpl.class)
|
||||
},
|
||||
attributes = {
|
||||
@TargetAttributeType(name = "Type", type = String.class),
|
||||
@ -60,8 +61,8 @@ public abstract class LldbModelTargetAbstractXpointSpec extends LldbModelTargetO
|
||||
protected final ListenerSet<TargetBreakpointAction> actions =
|
||||
new ListenerSet<>(TargetBreakpointAction.class) {
|
||||
// Use strong references on actions
|
||||
protected Map<TargetBreakpointAction, TargetBreakpointAction> createMap() {
|
||||
return Collections.synchronizedMap(new LinkedHashMap<>());
|
||||
protected Map<TargetBreakpointAction, ListenerEntry<? extends TargetBreakpointAction>> createMap() {
|
||||
return new LinkedHashMap<>();
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -19,19 +19,21 @@ import java.math.BigInteger;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import SWIG.*;
|
||||
import SWIG.SBBreakpoint;
|
||||
import SWIG.SBStream;
|
||||
import agent.lldb.model.iface2.LldbModelTargetBreakpointContainer;
|
||||
import agent.lldb.model.iface2.LldbModelTargetBreakpointLocation;
|
||||
import ghidra.dbg.target.TargetBreakpointLocation;
|
||||
import ghidra.dbg.target.TargetBreakpointSpecContainer.TargetBreakpointKindSet;
|
||||
import ghidra.dbg.target.TargetObject;
|
||||
import ghidra.dbg.target.schema.*;
|
||||
import ghidra.util.datastruct.ListenerMap.ListenerEntry;
|
||||
import ghidra.util.datastruct.ListenerSet;
|
||||
|
||||
@TargetObjectSchemaInfo(
|
||||
name = "BreakpointSpec",
|
||||
elements = { //
|
||||
@TargetElementType(type = LldbModelTargetBreakpointLocationImpl.class) //
|
||||
@TargetElementType(type = LldbModelTargetBreakpointLocationImpl.class)
|
||||
},
|
||||
attributes = {
|
||||
@TargetAttributeType(name = "Type", type = String.class),
|
||||
@ -46,8 +48,8 @@ public class LldbModelTargetBreakpointSpecImpl extends LldbModelTargetAbstractXp
|
||||
protected final ListenerSet<TargetBreakpointAction> actions =
|
||||
new ListenerSet<>(TargetBreakpointAction.class) {
|
||||
// Use strong references on actions
|
||||
protected Map<TargetBreakpointAction, TargetBreakpointAction> createMap() {
|
||||
return Collections.synchronizedMap(new LinkedHashMap<>());
|
||||
protected Map<TargetBreakpointAction, ListenerEntry<? extends TargetBreakpointAction>> createMap() {
|
||||
return new LinkedHashMap<>();
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -33,6 +33,7 @@ import ghidra.dbg.target.TargetObject;
|
||||
import ghidra.dbg.target.schema.TargetObjectSchema;
|
||||
import ghidra.program.model.address.AddressSpace;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.datastruct.ListenerMap.ListenerEntry;
|
||||
import ghidra.util.datastruct.ListenerSet;
|
||||
import utilities.util.ProxyUtilities;
|
||||
|
||||
@ -276,8 +277,8 @@ public class DelegateGadpClientTargetObject
|
||||
if (actions == null && createIfAbsent) {
|
||||
actions = new ListenerSet<>(TargetBreakpointAction.class) {
|
||||
// Want strong references on actions
|
||||
protected Map<TargetBreakpointAction, TargetBreakpointAction> createMap() {
|
||||
return Collections.synchronizedMap(new LinkedHashMap<>());
|
||||
protected Map<TargetBreakpointAction, ListenerEntry<? extends TargetBreakpointAction>> createMap() {
|
||||
return new LinkedHashMap<>();
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ import java.util.function.Function;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
import org.jdom.JDOMException;
|
||||
|
||||
import com.google.common.cache.RemovalNotification;
|
||||
import com.google.protobuf.Message;
|
||||
import com.google.protobuf.ProtocolStringList;
|
||||
|
||||
@ -48,6 +47,7 @@ import ghidra.dbg.target.schema.XmlSchemaContext;
|
||||
import ghidra.dbg.util.PathUtils;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.util.*;
|
||||
import ghidra.util.datastruct.FixedSizeHashMap;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import utilities.util.ProxyUtilities;
|
||||
|
||||
@ -58,7 +58,6 @@ public class GadpClient extends AbstractDebuggerObjectModel
|
||||
// TODO: More sophisticated cache management
|
||||
// TODO: Perhaps no cache at all, and rely totally on async notifications
|
||||
protected static final int MAX_OUTSTANDING_REQUESTS = Integer.MAX_VALUE;
|
||||
protected static final int REQUEST_TIMEOUT_MILLIS = Integer.MAX_VALUE;
|
||||
|
||||
protected static final ProtobufOneofByTypeHelper<Gadp.RootMessage, Gadp.RootMessage.Builder> MSG_HELPER =
|
||||
ProtobufOneofByTypeHelper.create(Gadp.RootMessage.getDefaultInstance(),
|
||||
@ -218,13 +217,22 @@ public class GadpClient extends AbstractDebuggerObjectModel
|
||||
new AsyncDebouncer<>(AsyncTimer.DEFAULT_TIMER, 500);
|
||||
|
||||
public MessagePairingCache() {
|
||||
super(4, REQUEST_TIMEOUT_MILLIS, MAX_OUTSTANDING_REQUESTS);
|
||||
super(MAX_OUTSTANDING_REQUESTS);
|
||||
cacheMonitor.addListener(this::cacheSettled);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void resultRemoved(RemovalNotification<Integer, Gadp.RootMessage> rn) {
|
||||
Msg.error(this, "Received message with unexpected sequence number: " + rn);
|
||||
protected Map<Integer, RootMessage> createResultCache(int max) {
|
||||
return new FixedSizeHashMap<>(max) {
|
||||
@Override
|
||||
protected boolean removeEldestEntry(Map.Entry<Integer, RootMessage> eldest) {
|
||||
if (!super.removeEldestEntry(eldest)) {
|
||||
return false;
|
||||
}
|
||||
Msg.error(this, "Received message with unexpected sequence number: " + eldest);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -235,17 +243,23 @@ public class GadpClient extends AbstractDebuggerObjectModel
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void promiseRemoved(
|
||||
RemovalNotification<Integer, CompletableFuture<Gadp.RootMessage>> rn) {
|
||||
if (rn.wasEvicted()) {
|
||||
String message = "Command with sequence number " + rn.getKey() +
|
||||
" evicted because " + rn.getCause();
|
||||
Msg.error(this, message);
|
||||
AsyncUtils.FRAMEWORK_EXECUTOR.execute(() -> {
|
||||
rn.getValue().completeExceptionally(new TimeoutException(message));
|
||||
});
|
||||
}
|
||||
cacheMonitor.contact(null);
|
||||
protected Map<Integer, CompletableFuture<RootMessage>> createPromiseCache(int max) {
|
||||
return new FixedSizeHashMap<>(max) {
|
||||
@Override
|
||||
protected boolean removeEldestEntry(
|
||||
Map.Entry<Integer, CompletableFuture<RootMessage>> eldest) {
|
||||
if (!super.removeEldestEntry(eldest)) {
|
||||
return false;
|
||||
}
|
||||
String message = "Command with sequence number " + eldest.getKey() +
|
||||
" evicted";
|
||||
Msg.error(this, message);
|
||||
AsyncUtils.FRAMEWORK_EXECUTOR.execute(() -> {
|
||||
eldest.getValue().completeExceptionally(new TimeoutException(message));
|
||||
});
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private void cacheSettled(Void __) {
|
||||
|
@ -20,11 +20,12 @@ import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import ghidra.dbg.jdi.manager.breakpoint.JdiBreakpointInfo;
|
||||
import ghidra.dbg.jdi.model.iface1.JdiModelTargetDeletable;
|
||||
import ghidra.dbg.target.TargetBreakpointSpecContainer.TargetBreakpointKindSet;
|
||||
import ghidra.dbg.target.TargetBreakpointLocation;
|
||||
import ghidra.dbg.target.TargetBreakpointSpec;
|
||||
import ghidra.dbg.target.TargetBreakpointSpecContainer.TargetBreakpointKindSet;
|
||||
import ghidra.dbg.target.schema.TargetAttributeType;
|
||||
import ghidra.dbg.target.schema.TargetObjectSchemaInfo;
|
||||
import ghidra.util.datastruct.ListenerMap.ListenerEntry;
|
||||
import ghidra.util.datastruct.ListenerSet;
|
||||
|
||||
@TargetObjectSchemaInfo(
|
||||
@ -48,8 +49,8 @@ public class JdiModelTargetBreakpointSpec extends JdiModelTargetObjectImpl
|
||||
protected final ListenerSet<TargetBreakpointAction> actions =
|
||||
new ListenerSet<>(TargetBreakpointAction.class) {
|
||||
// Use strong references on actions
|
||||
protected Map<TargetBreakpointAction, TargetBreakpointAction> createMap() {
|
||||
return Collections.synchronizedMap(new LinkedHashMap<>());
|
||||
protected Map<TargetBreakpointAction, ListenerEntry<? extends TargetBreakpointAction>> createMap() {
|
||||
return new LinkedHashMap<>();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -25,8 +25,6 @@ import java.util.function.Function;
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.*;
|
||||
|
||||
import com.google.common.collect.Collections2;
|
||||
|
||||
import docking.widgets.table.*;
|
||||
import docking.widgets.table.DefaultEnumeratedColumnTableModel.EnumeratedTableColumn;
|
||||
import ghidra.docking.settings.Settings;
|
||||
@ -239,8 +237,8 @@ public class DebuggerSnapshotTablePanel extends JPanel {
|
||||
Collection<? extends TraceSnapshot> snapshots = hideScratch
|
||||
? manager.getSnapshots(0, true, Long.MAX_VALUE, true)
|
||||
: manager.getAllSnapshots();
|
||||
snapshotTableModel.addAll(Collections2.transform(snapshots,
|
||||
s -> new SnapshotRow(currentTrace, s)));
|
||||
snapshotTableModel
|
||||
.addAll(snapshots.stream().map(s -> new SnapshotRow(currentTrace, s)).toList());
|
||||
}
|
||||
|
||||
protected void deleteScratchSnapshots() {
|
||||
@ -252,9 +250,10 @@ public class DebuggerSnapshotTablePanel extends JPanel {
|
||||
return;
|
||||
}
|
||||
TraceTimeManager manager = currentTrace.getTimeManager();
|
||||
snapshotTableModel.addAll(Collections2.transform(
|
||||
manager.getSnapshots(Long.MIN_VALUE, true, 0, false),
|
||||
s -> new SnapshotRow(currentTrace, s)));
|
||||
snapshotTableModel.addAll(manager.getSnapshots(Long.MIN_VALUE, true, 0, false)
|
||||
.stream()
|
||||
.map(s -> new SnapshotRow(currentTrace, s))
|
||||
.toList());
|
||||
}
|
||||
|
||||
public ListSelectionModel getSelectionModel() {
|
||||
|
@ -112,7 +112,7 @@ public class LoneLogicalBreakpoint implements LogicalBreakpointInternal {
|
||||
|
||||
@Override
|
||||
public Set<TraceBreakpoint> getTraceBreakpoints() {
|
||||
return new HashSet<>(breaks.getBreakpoints());
|
||||
return breaks.getBreakpoints();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -334,7 +334,7 @@ public class MappedLogicalBreakpoint implements LogicalBreakpointInternal {
|
||||
synchronized (traceBreaks) {
|
||||
breaks = traceBreaks.get(trace);
|
||||
}
|
||||
return breaks == null ? Set.of() : new HashSet<>(breaks.getBreakpoints());
|
||||
return breaks == null ? Set.of() : breaks.getBreakpoints();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,8 +16,7 @@
|
||||
package ghidra.app.plugin.core.debug.service.breakpoint;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.google.common.collect.Collections2;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import ghidra.app.services.*;
|
||||
import ghidra.app.services.LogicalBreakpoint.TraceMode;
|
||||
@ -239,8 +238,8 @@ class TraceBreakpointSet {
|
||||
*
|
||||
* @return the breakpoints
|
||||
*/
|
||||
public Collection<TraceBreakpoint> getBreakpoints() {
|
||||
return Collections2.transform(breakpoints, e -> e.obj);
|
||||
public Set<TraceBreakpoint> getBreakpoints() {
|
||||
return breakpoints.stream().map(e -> e.obj).collect(Collectors.toUnmodifiableSet());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,14 +17,12 @@ package ghidra.async;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Function;
|
||||
|
||||
import com.google.common.cache.*;
|
||||
|
||||
/**
|
||||
* A cache of futures which pairs each to its result by key
|
||||
*
|
||||
* <p>
|
||||
* The cache accepts promises and results, storing unpaired entries for a timeout period. Each
|
||||
* promise is fulfilled when the cache accepts its corresponding result, determined by key.
|
||||
* Conversely, a cached result fulfills its corresponding promise, determined by key, when the cache
|
||||
@ -32,6 +30,7 @@ import com.google.common.cache.*;
|
||||
* given key enter the cache, they are paired, the promise is fulfilled, and both are removed from
|
||||
* the cache.
|
||||
*
|
||||
* <p>
|
||||
* If an entry is not paired within the timeout period, it is evicted. An evicted promise is likely
|
||||
* a recoverable error, e.g., a request timed out. An evicted result is likely a logic or
|
||||
* synchronization error. Requests, i.e., promises, are usually created before the result is
|
||||
@ -53,66 +52,26 @@ public abstract class AsyncPairingCache<K, V> {
|
||||
/**
|
||||
* Construct a new matching cache
|
||||
*
|
||||
* @param concurrencyLevel the maximum number of thread expected to simultaneously access the
|
||||
* cache
|
||||
* @param timeoutMillis the amount of time (in milliseconds) a promise or result may pend before
|
||||
* eviction
|
||||
* @param maxPending the maximum number of pending promises or results before the eldest is
|
||||
* evicted. Each is counted independently, e.g., a value of 5 permits 5 pending
|
||||
* promises and 5 pending results simultaneously.
|
||||
*/
|
||||
public AsyncPairingCache(int concurrencyLevel, int timeoutMillis, int maxPending) {
|
||||
results = CacheBuilder.newBuilder()
|
||||
.concurrencyLevel(concurrencyLevel)
|
||||
.expireAfterWrite(timeoutMillis, TimeUnit.MILLISECONDS)
|
||||
.maximumSize(maxPending)
|
||||
.removalListener(this::resultRemoved)
|
||||
.build()
|
||||
.asMap();
|
||||
public AsyncPairingCache(int maxPending) {
|
||||
results = createResultCache(maxPending);
|
||||
resultsView = Collections.unmodifiableMap(results);
|
||||
|
||||
promises = CacheBuilder.newBuilder()
|
||||
.concurrencyLevel(concurrencyLevel)
|
||||
.expireAfterWrite(timeoutMillis, TimeUnit.MILLISECONDS)
|
||||
.maximumSize(maxPending)
|
||||
.removalListener(this::promiseRemoved)
|
||||
.build()
|
||||
.asMap();
|
||||
promises = createPromiseCache(maxPending);
|
||||
promisesView = Collections.unmodifiableMap(promises);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a result is removed
|
||||
*
|
||||
* Eviction is likely due to a logic bug or a gratuitous result from an external source.
|
||||
*
|
||||
* @param rn the removal notification for the result entry
|
||||
*/
|
||||
protected abstract void resultRemoved(RemovalNotification<K, V> rn);
|
||||
protected abstract Map<K, V> createResultCache(int max);
|
||||
|
||||
/**
|
||||
* Called when a promise is removed
|
||||
*
|
||||
* The most common implementation is to complete the future exceptionally. The default
|
||||
* implementation completes the future with a {@link RuntimeException}. Extensions should
|
||||
* override this method. Note that this method is called for removal as a result of normal
|
||||
* completion, too. In that case {@link RemovalNotification#getCause()} will return
|
||||
* {@link RemovalCause#EXPLICIT}.
|
||||
*
|
||||
* @param rn the removal notification for the promise entry
|
||||
*/
|
||||
protected void promiseRemoved(RemovalNotification<K, CompletableFuture<V>> rn) {
|
||||
if (rn.getCause() != RemovalCause.EXPLICIT) {
|
||||
rn.getValue()
|
||||
.completeExceptionally(new RuntimeException(
|
||||
"Promise with key " + rn.getKey() +
|
||||
" was evicted with the default handler"));
|
||||
}
|
||||
}
|
||||
protected abstract Map<K, CompletableFuture<V>> createPromiseCache(int max);
|
||||
|
||||
/**
|
||||
* Enter a promise for the the given key into the cache
|
||||
*
|
||||
* <p>
|
||||
* If the result for the given key is already available, the promise does not enter the cache.
|
||||
* Instead, the result is removed and the promise is completed.
|
||||
*
|
||||
@ -126,6 +85,7 @@ public abstract class AsyncPairingCache<K, V> {
|
||||
/**
|
||||
* Enter a promise for the the given key into the cache
|
||||
*
|
||||
* <p>
|
||||
* If the result for the given key is already available, the promise does not enter the cache.
|
||||
* Instead, the result is removed and the promise is completed.
|
||||
*
|
||||
@ -148,6 +108,7 @@ public abstract class AsyncPairingCache<K, V> {
|
||||
/**
|
||||
* Enter a result for the given key into the cache
|
||||
*
|
||||
* <p>
|
||||
* If a promise for the key already exists, the result does not enter the cache. Instead, the
|
||||
* promise is removed and completed.
|
||||
*
|
||||
@ -169,11 +130,8 @@ public abstract class AsyncPairingCache<K, V> {
|
||||
/**
|
||||
* Flush the cache, completing all pending requests exceptionally
|
||||
*
|
||||
* Both sides of the cache are cleared. Note that this will invoke the removal callback for each
|
||||
* entry giving {@link RemovalCause#EXPLICIT} as the cause. For requests, the callback ought not
|
||||
* to complete the request, exceptionally or otherwise, since the flush is about to complete it
|
||||
* with the given exception. The implementor may freely choose how to handle flushed pending
|
||||
* results.
|
||||
* <p>
|
||||
* Both sides of the cache are cleared.
|
||||
*
|
||||
* @param exc the exception for completing the requests
|
||||
*/
|
||||
|
@ -15,25 +15,50 @@
|
||||
*/
|
||||
package ghidra.framework.data;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.RemovalNotification;
|
||||
import java.lang.ref.Cleaner;
|
||||
import java.util.*;
|
||||
|
||||
import ghidra.framework.model.*;
|
||||
import ghidra.util.Lock;
|
||||
|
||||
public class DomainObjectEventQueues {
|
||||
protected static class PrivateQueue {
|
||||
private static final Cleaner CLEANER = Cleaner.create();
|
||||
|
||||
static class State implements Runnable {
|
||||
final DomainObjectChangeSupport docs;
|
||||
|
||||
public State(DomainObjectChangeSupport docs) {
|
||||
this.docs = docs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
docs.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private final State state;
|
||||
private final Cleaner.Cleanable cleanable;
|
||||
|
||||
public PrivateQueue(DomainObjectChangeSupport docs) {
|
||||
this.state = new State(docs);
|
||||
this.cleanable = CLEANER.register(this, state);
|
||||
}
|
||||
|
||||
public void flush() {
|
||||
state.docs.flush();
|
||||
}
|
||||
|
||||
public void fireEvent(DomainObjectChangeRecord ev) {
|
||||
state.docs.fireEvent(ev);
|
||||
}
|
||||
}
|
||||
|
||||
protected final DomainObject source;
|
||||
protected final Lock lock;
|
||||
protected final DomainObjectChangeSupport eventQueue;
|
||||
protected final Map<EventQueueID, DomainObjectChangeSupport> privateEventQueues =
|
||||
CacheBuilder.newBuilder()
|
||||
.removalListener(this::privateQueueRemoved)
|
||||
.weakKeys()
|
||||
.build()
|
||||
.asMap();
|
||||
protected final Map<EventQueueID, PrivateQueue> privateEventQueues = new WeakHashMap<>();
|
||||
|
||||
protected volatile boolean eventsEnabled = true;
|
||||
|
||||
@ -43,14 +68,9 @@ public class DomainObjectEventQueues {
|
||||
eventQueue = new DomainObjectChangeSupport(source, timeInterval, lock);
|
||||
}
|
||||
|
||||
private void privateQueueRemoved(
|
||||
RemovalNotification<EventQueueID, DomainObjectChangeSupport> rn) {
|
||||
rn.getValue().dispose();
|
||||
}
|
||||
|
||||
public void flushEvents() {
|
||||
eventQueue.flush();
|
||||
for (DomainObjectChangeSupport privateQueue : privateEventQueues.values()) {
|
||||
for (PrivateQueue privateQueue : privateEventQueues.values()) {
|
||||
privateQueue.flush();
|
||||
}
|
||||
}
|
||||
@ -65,20 +85,23 @@ public class DomainObjectEventQueues {
|
||||
|
||||
public EventQueueID createPrivateEventQueue(DomainObjectListener listener, int maxDelay) {
|
||||
EventQueueID id = new EventQueueID();
|
||||
DomainObjectChangeSupport privateQueue =
|
||||
new DomainObjectChangeSupport(source, maxDelay, lock);
|
||||
privateQueue.addListener(listener);
|
||||
privateEventQueues.put(id, privateQueue);
|
||||
DomainObjectChangeSupport docs = new DomainObjectChangeSupport(source, maxDelay, lock);
|
||||
docs.addListener(listener);
|
||||
privateEventQueues.put(id, new PrivateQueue(docs));
|
||||
return id;
|
||||
}
|
||||
|
||||
public boolean removePrivateEventQueue(EventQueueID id) {
|
||||
return privateEventQueues.remove(id) != null;
|
||||
// NOTE: Removal callback will dispose()
|
||||
PrivateQueue privateQueue = privateEventQueues.remove(id);
|
||||
if (privateQueue == null) {
|
||||
return false;
|
||||
}
|
||||
privateQueue.cleanable.clean();
|
||||
return true;
|
||||
}
|
||||
|
||||
public void flushPrivateEventQueue(EventQueueID id) {
|
||||
DomainObjectChangeSupport privateQueue = privateEventQueues.get(id);
|
||||
PrivateQueue privateQueue = privateEventQueues.get(id);
|
||||
if (privateQueue == null) {
|
||||
throw new NoSuchElementException("Private queue no longer exists");
|
||||
}
|
||||
@ -88,7 +111,7 @@ public class DomainObjectEventQueues {
|
||||
public void fireEvent(DomainObjectChangeRecord ev) {
|
||||
if (eventsEnabled) {
|
||||
eventQueue.fireEvent(ev);
|
||||
for (DomainObjectChangeSupport privateQueue : privateEventQueues.values()) {
|
||||
for (PrivateQueue privateQueue : privateEventQueues.values()) {
|
||||
privateQueue.fireEvent(ev);
|
||||
}
|
||||
}
|
||||
@ -103,7 +126,7 @@ public class DomainObjectEventQueues {
|
||||
DomainObjectChangeRecord restored =
|
||||
new DomainObjectChangeRecord(DomainObject.DO_OBJECT_RESTORED);
|
||||
eventQueue.fireEvent(restored);
|
||||
for (DomainObjectChangeSupport privateQueue : privateEventQueues.values()) {
|
||||
for (PrivateQueue privateQueue : privateEventQueues.values()) {
|
||||
privateQueue.fireEvent(restored);
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,6 @@
|
||||
package ghidra.pcode.exec.trace;
|
||||
|
||||
import ghidra.pcode.exec.AccessPcodeExecutionException;
|
||||
import ghidra.pcode.exec.PcodeExecutorStatePiece;
|
||||
import ghidra.pcode.exec.trace.data.PcodeTraceDataAccess;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.trace.model.memory.TraceMemorySpace;
|
||||
|
@ -21,8 +21,6 @@ import java.util.function.Consumer;
|
||||
|
||||
import org.apache.commons.collections4.collection.CompositeCollection;
|
||||
|
||||
import com.google.common.cache.RemovalNotification;
|
||||
|
||||
import db.DBHandle;
|
||||
import generic.depends.DependentService;
|
||||
import generic.depends.err.ServiceConstructionException;
|
||||
@ -229,10 +227,6 @@ public class DBTrace extends DBCachedDomainObjectAdapter implements Trace, Trace
|
||||
super.dbError(e);
|
||||
}
|
||||
|
||||
protected void fixedProgramViewRemoved(RemovalNotification<Long, DBTraceProgramView> rn) {
|
||||
Msg.debug(this, "Dropped cached fixed view at snap=" + rn.getKey());
|
||||
}
|
||||
|
||||
@Internal
|
||||
public void assertValidAddress(Address pc) {
|
||||
if (pc == null) {
|
||||
|
@ -20,12 +20,10 @@ import java.util.Map.Entry;
|
||||
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.RemovalNotification;
|
||||
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.trace.database.DBTraceCacheForContainingQueries.GetKey;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.util.datastruct.FixedSizeHashMap;
|
||||
|
||||
public abstract class DBTraceCacheForContainingQueries<K extends GetKey, V, T> {
|
||||
public static class GetKey {
|
||||
@ -73,16 +71,7 @@ public abstract class DBTraceCacheForContainingQueries<K extends GetKey, V, T> {
|
||||
public DBTraceCacheForContainingQueries(int snapBreadth, int addressBreadth, int maxPoints) {
|
||||
this.snapBreadth = snapBreadth;
|
||||
this.addressBreadth = addressBreadth;
|
||||
this.pointCache = CacheBuilder.newBuilder()
|
||||
.removalListener(this::getContainingRemoved)
|
||||
.maximumSize(maxPoints)
|
||||
.concurrencyLevel(2)
|
||||
.build()
|
||||
.asMap();
|
||||
}
|
||||
|
||||
private void getContainingRemoved(RemovalNotification<K, V> rn) {
|
||||
// Nothing
|
||||
this.pointCache = new FixedSizeHashMap<>(maxPoints);
|
||||
}
|
||||
|
||||
protected abstract void loadRangeCache(TraceAddressSnapRange range);
|
||||
|
@ -19,8 +19,6 @@ import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.google.common.collect.*;
|
||||
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.trace.model.*;
|
||||
import ghidra.trace.model.Lifespan.DefaultLifeSet;
|
||||
@ -324,10 +322,10 @@ public class DBTraceTimeViewport implements TraceTimeViewport {
|
||||
public List<Long> getReversedSnaps() {
|
||||
try (LockHold hold = trace.lockRead()) {
|
||||
synchronized (ordered) {
|
||||
return Lists.reverse(ordered)
|
||||
.stream()
|
||||
.map(Lifespan::lmax)
|
||||
.collect(Collectors.toList());
|
||||
List<Long> reversed =
|
||||
ordered.stream().map(Lifespan::lmax).collect(Collectors.toList());
|
||||
Collections.reverse(reversed);
|
||||
return reversed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,12 +15,9 @@
|
||||
*/
|
||||
package ghidra.trace.database.listing;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
|
||||
import com.google.common.collect.Collections2;
|
||||
|
||||
import generic.NestedIterator;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.trace.database.DBTraceUtils;
|
||||
@ -40,7 +37,6 @@ import ghidra.util.LockHold;
|
||||
public abstract class AbstractBaseDBTraceCodeUnitsMemoryView<T extends DBTraceCodeUnitAdapter, M extends AbstractBaseDBTraceCodeUnitsView<T>>
|
||||
implements DBTraceDelegatingManager<M> {
|
||||
protected final DBTraceCodeManager manager;
|
||||
protected final Collection<M> activeSpacesView;
|
||||
|
||||
/**
|
||||
* Construct a composite view
|
||||
@ -49,8 +45,6 @@ public abstract class AbstractBaseDBTraceCodeUnitsMemoryView<T extends DBTraceCo
|
||||
*/
|
||||
public AbstractBaseDBTraceCodeUnitsMemoryView(DBTraceCodeManager manager) {
|
||||
this.manager = manager;
|
||||
this.activeSpacesView =
|
||||
Collections2.transform(manager.getActiveMemorySpaces(), this::getView);
|
||||
}
|
||||
|
||||
public AddressSpace getSpace() {
|
||||
@ -242,8 +236,8 @@ public abstract class AbstractBaseDBTraceCodeUnitsMemoryView<T extends DBTraceCo
|
||||
*/
|
||||
public int size() {
|
||||
int sum = 0;
|
||||
for (M m : activeSpacesView) {
|
||||
sum += m.size();
|
||||
for (DBTraceCodeSpace space : manager.getActiveMemorySpaces()) {
|
||||
sum += getView(space).size();
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
@ -17,9 +17,7 @@ package ghidra.trace.database.listing;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.google.common.collect.Collections2;
|
||||
import com.google.common.collect.Iterators;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.trace.model.TraceAddressSnapRange;
|
||||
@ -83,7 +81,7 @@ public abstract class AbstractComposedDBTraceCodeUnitsView<T extends DBTraceCode
|
||||
@Override
|
||||
public Iterable<? extends T> get(long snap, Address min, Address max, boolean forward) {
|
||||
Collection<? extends Iterator<? extends T>> itCol =
|
||||
Collections2.transform(parts, p -> p.get(snap, min, max, forward).iterator());
|
||||
parts.stream().map(p -> p.get(snap, min, max, forward).iterator()).toList();
|
||||
return () -> new MergeSortingIterator<T>(itCol,
|
||||
forward ? DBTraceDefinedUnitsView::compareForward
|
||||
: DBTraceDefinedUnitsView::compareBackward);
|
||||
@ -91,9 +89,10 @@ public abstract class AbstractComposedDBTraceCodeUnitsView<T extends DBTraceCode
|
||||
|
||||
@Override
|
||||
public Iterable<? extends T> getIntersecting(TraceAddressSnapRange tasr) {
|
||||
Collection<? extends Iterator<? extends T>> itCol =
|
||||
Collections2.transform(parts, p -> p.getIntersecting(tasr).iterator());
|
||||
return () -> Iterators.concat(itCol.iterator());
|
||||
return () -> parts.stream()
|
||||
.flatMap(p -> StreamSupport.stream(p.getIntersecting(tasr).spliterator(), false)
|
||||
.map(t -> (T) t))
|
||||
.iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -165,7 +164,7 @@ public abstract class AbstractComposedDBTraceCodeUnitsView<T extends DBTraceCode
|
||||
@Override
|
||||
public AddressSetView getAddressSetView(long snap, AddressRange within) {
|
||||
return new UnionAddressSetView(
|
||||
Collections2.transform(parts, p -> p.getAddressSetView(snap, within)));
|
||||
parts.stream().map(p -> p.getAddressSetView(snap, within)).toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,8 +16,7 @@
|
||||
package ghidra.trace.database.listing;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.google.common.collect.Iterators;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.trace.model.TraceAddressSnapRange;
|
||||
@ -83,9 +82,12 @@ public abstract class AbstractWithUndefinedDBTraceCodeUnitsMemoryView<T extends
|
||||
|
||||
@Override
|
||||
public Iterable<? extends T> emptyOrFullIterableUndefined(TraceAddressSnapRange tasr) {
|
||||
Iterator<Iterator<? extends T>> itIt =
|
||||
Iterators.transform(tasr.getLifespan().iterator(),
|
||||
snap -> emptyOrFullIterableUndefined(snap, tasr.getRange(), true).iterator());
|
||||
return () -> Iterators.concat(itIt);
|
||||
return () -> StreamSupport.stream(tasr.getLifespan().spliterator(), false)
|
||||
.flatMap(snap -> StreamSupport
|
||||
.stream(emptyOrFullIterableUndefined(snap, tasr.getRange(), true)
|
||||
.spliterator(),
|
||||
false)
|
||||
.map(t -> (T) t))
|
||||
.iterator();
|
||||
}
|
||||
}
|
||||
|
@ -23,9 +23,6 @@ import java.util.*;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.RemovalNotification;
|
||||
|
||||
import db.DBHandle;
|
||||
import db.DBRecord;
|
||||
import ghidra.lifecycle.Internal;
|
||||
@ -56,6 +53,7 @@ import ghidra.trace.util.TraceAddressSpace;
|
||||
import ghidra.util.*;
|
||||
import ghidra.util.database.*;
|
||||
import ghidra.util.database.annot.*;
|
||||
import ghidra.util.datastruct.WeakValueHashMap;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.exception.VersionException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
@ -323,11 +321,7 @@ public class DBTraceCodeManager extends AbstractDBTraceSpaceBasedManager<DBTrace
|
||||
new DBTraceDefinedUnitsMemoryView(this);
|
||||
|
||||
protected final Map<AddressSnap, UndefinedDBTraceData> undefinedCache =
|
||||
CacheBuilder.newBuilder()
|
||||
.removalListener(this::undefinedRemovedFromCache)
|
||||
.weakValues()
|
||||
.build()
|
||||
.asMap();
|
||||
new WeakValueHashMap<>();
|
||||
|
||||
public DBTraceCodeManager(DBHandle dbh, DBOpenMode openMode, ReadWriteLock lock,
|
||||
TaskMonitor monitor, Language baseLanguage, DBTrace trace,
|
||||
@ -349,11 +343,6 @@ public class DBTraceCodeManager extends AbstractDBTraceSpaceBasedManager<DBTrace
|
||||
loadSpaces();
|
||||
}
|
||||
|
||||
private void undefinedRemovedFromCache(
|
||||
RemovalNotification<AddressSnap, UndefinedDBTraceData> rn) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
// Internal
|
||||
public UndefinedDBTraceData doCreateUndefinedUnit(long snap, Address address,
|
||||
TraceThread thread, int frameLevel) {
|
||||
|
@ -21,7 +21,7 @@ import java.nio.ByteBuffer;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.google.common.collect.Iterators;
|
||||
import org.apache.commons.collections4.IteratorUtils;
|
||||
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.address.AddressRangeImpl;
|
||||
@ -196,7 +196,7 @@ public interface DBTraceCodeUnitAdapter extends TraceCodeUnit, MemBufferAdapter
|
||||
@Override
|
||||
default Iterator<String> propertyNames() {
|
||||
Lifespan span = Lifespan.at(getStartSnap());
|
||||
return Iterators.transform(Iterators.filter(
|
||||
return IteratorUtils.transformedIterator(IteratorUtils.filteredIterator(
|
||||
getTrace().getInternalAddressPropertyManager().getAllProperties().entrySet().iterator(),
|
||||
e -> e.getValue().getAddressSetView(span).contains(getAddress())), Entry::getKey);
|
||||
}
|
||||
|
@ -17,16 +17,16 @@ package ghidra.trace.database.listing;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.RemovalNotification;
|
||||
import com.google.common.collect.Iterators;
|
||||
import org.apache.commons.collections4.IteratorUtils;
|
||||
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.trace.model.Lifespan;
|
||||
import ghidra.trace.model.TraceAddressSnapRange;
|
||||
import ghidra.trace.model.listing.*;
|
||||
import ghidra.util.*;
|
||||
import ghidra.util.datastruct.FixedSizeHashMap;
|
||||
|
||||
/**
|
||||
* The implementation of {@link TraceCodeSpace#undefinedData()}
|
||||
@ -39,11 +39,7 @@ public class DBTraceUndefinedDataView extends
|
||||
|
||||
protected final DBTraceCodeManager manager;
|
||||
|
||||
protected final Map<Long, CachedAddressSetView> cache = CacheBuilder.newBuilder()
|
||||
.removalListener(this::cacheEntryRemoved)
|
||||
.maximumSize(CACHE_MAX_SNAPS)
|
||||
.build()
|
||||
.asMap();
|
||||
protected final Map<Long, CachedAddressSetView> cache = new FixedSizeHashMap<>(CACHE_MAX_SNAPS);
|
||||
|
||||
/**
|
||||
* Construct the view
|
||||
@ -55,10 +51,6 @@ public class DBTraceUndefinedDataView extends
|
||||
this.manager = space.manager;
|
||||
}
|
||||
|
||||
private void cacheEntryRemoved(RemovalNotification<Long, CachedAddressSetView> rn) {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate an undefined data unit at the given point
|
||||
*
|
||||
@ -150,15 +142,16 @@ public class DBTraceUndefinedDataView extends
|
||||
boolean forward) {
|
||||
Iterator<Address> ait =
|
||||
getAddressSetView(snap, new AddressRangeImpl(min, max)).getAddresses(forward);
|
||||
return () -> Iterators.transform(ait, a -> doCreateUnit(snap, a));
|
||||
return () -> IteratorUtils.transformedIterator(ait, a -> doCreateUnit(snap, a));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<? extends UndefinedDBTraceData> getIntersecting(TraceAddressSnapRange tasr) {
|
||||
Iterator<Iterator<? extends UndefinedDBTraceData>> itIt =
|
||||
Iterators.transform(tasr.getLifespan().iterator(),
|
||||
snap -> get(snap, tasr.getX1(), tasr.getX2(), true).iterator());
|
||||
return () -> Iterators.concat(itIt);
|
||||
return () -> StreamSupport.stream(tasr.getLifespan().spliterator(), false)
|
||||
.flatMap(snap -> StreamSupport
|
||||
.stream(get(snap, tasr.getX1(), tasr.getX2(), true).spliterator(), false)
|
||||
.map(u -> (UndefinedDBTraceData) u))
|
||||
.iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -22,8 +22,6 @@ import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.google.common.collect.Collections2;
|
||||
|
||||
import db.DBHandle;
|
||||
import db.DBRecord;
|
||||
import ghidra.program.model.address.AddressSetView;
|
||||
@ -235,7 +233,7 @@ public class DBTraceAddressSnapRangePropertyMap<T, DR extends AbstractDBTraceAdd
|
||||
@Override
|
||||
public AddressSetView getAddressSetView(Lifespan span, Predicate<T> predicate) {
|
||||
return new UnionAddressSetView(
|
||||
Collections2.transform(memSpacesView, m -> m.getAddressSetView(span, predicate)));
|
||||
memSpaces.values().stream().map(m -> m.getAddressSetView(span, predicate)).toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -21,7 +21,7 @@ import java.util.NoSuchElementException;
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.google.common.collect.Iterators;
|
||||
import org.apache.commons.collections4.IteratorUtils;
|
||||
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.trace.database.map.DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery;
|
||||
@ -171,8 +171,9 @@ public class DBTraceAddressSnapRangePropertyMapAddressSetView<T> extends Abstrac
|
||||
.orderedEntries()
|
||||
.iterator();
|
||||
Iterator<Entry<TraceAddressSnapRange, T>> fltIt =
|
||||
Iterators.filter(mapIt, e -> predicate.test(e.getValue()));
|
||||
Iterator<AddressRange> rawIt = Iterators.transform(fltIt, e -> e.getKey().getRange());
|
||||
IteratorUtils.filteredIterator(mapIt, e -> predicate.test(e.getValue()));
|
||||
Iterator<AddressRange> rawIt =
|
||||
IteratorUtils.transformedIterator(fltIt, e -> e.getKey().getRange());
|
||||
return new UnionAddressRangeIterator(rawIt, forward);
|
||||
}
|
||||
|
||||
|
@ -24,8 +24,6 @@ import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.google.common.collect.Collections2;
|
||||
|
||||
import db.DBHandle;
|
||||
import ghidra.dbg.target.TargetMemoryRegion;
|
||||
import ghidra.program.model.address.*;
|
||||
@ -226,8 +224,9 @@ public class DBTraceMemoryManager extends AbstractDBTraceSpaceBasedManager<DBTra
|
||||
.getObjectsAddressSet(snap, TargetMemoryRegion.RANGE_ATTRIBUTE_NAME,
|
||||
TraceObjectMemoryRegion.class, r -> true);
|
||||
}
|
||||
return new UnionAddressSetView(Collections2.transform(getActiveMemorySpaces(),
|
||||
m -> m.getRegionsAddressSet(snap)));
|
||||
return new UnionAddressSetView(getActiveMemorySpaces().stream()
|
||||
.map(m -> m.getRegionsAddressSet(snap))
|
||||
.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -238,8 +237,9 @@ public class DBTraceMemoryManager extends AbstractDBTraceSpaceBasedManager<DBTra
|
||||
.getObjectsAddressSet(snap, TargetMemoryRegion.RANGE_ATTRIBUTE_NAME,
|
||||
TraceObjectMemoryRegion.class, predicate);
|
||||
}
|
||||
return new UnionAddressSetView(Collections2.transform(getActiveMemorySpaces(),
|
||||
m -> m.getRegionsAddressSetWith(snap, predicate)));
|
||||
return new UnionAddressSetView(getActiveMemorySpaces().stream()
|
||||
.map(m -> m.getRegionsAddressSetWith(snap, predicate))
|
||||
.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -298,15 +298,17 @@ public class DBTraceMemoryManager extends AbstractDBTraceSpaceBasedManager<DBTra
|
||||
|
||||
@Override
|
||||
public AddressSetView getAddressesWithState(long snap, Predicate<TraceMemoryState> predicate) {
|
||||
return new UnionAddressSetView(Collections2.transform(getActiveMemorySpaces(),
|
||||
m -> m.getAddressesWithState(snap, predicate)));
|
||||
return new UnionAddressSetView(getActiveMemorySpaces().stream()
|
||||
.map(m -> m.getAddressesWithState(snap, predicate))
|
||||
.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddressSetView getAddressesWithState(Lifespan lifespan,
|
||||
Predicate<TraceMemoryState> predicate) {
|
||||
return new UnionAddressSetView(Collections2.transform(getActiveMemorySpaces(),
|
||||
m -> m.getAddressesWithState(lifespan, predicate)));
|
||||
return new UnionAddressSetView(getActiveMemorySpaces().stream()
|
||||
.map(m -> m.getAddressesWithState(lifespan, predicate))
|
||||
.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,9 +23,6 @@ import java.util.Map.Entry;
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.RemovalNotification;
|
||||
|
||||
import db.DBHandle;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.program.model.mem.MemBuffer;
|
||||
@ -47,6 +44,7 @@ import ghidra.util.*;
|
||||
import ghidra.util.AddressIteratorAdapter;
|
||||
import ghidra.util.database.*;
|
||||
import ghidra.util.database.spatial.rect.Rectangle2DDirection;
|
||||
import ghidra.util.datastruct.FixedSizeHashMap;
|
||||
import ghidra.util.exception.DuplicateNameException;
|
||||
import ghidra.util.exception.VersionException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
@ -74,24 +72,16 @@ public class DBTraceMemorySpace
|
||||
protected final DBTraceAddressSnapRangePropertyMapSpace<DBTraceMemoryRegion, DBTraceMemoryRegion> regionMapSpace;
|
||||
protected final DBCachedObjectIndex<String, DBTraceMemoryRegion> regionsByPath;
|
||||
protected final Collection<TraceMemoryRegion> regionView;
|
||||
protected final Map<DBTraceMemoryRegion, DBTraceMemoryRegion> regionCache = CacheBuilder
|
||||
.newBuilder()
|
||||
.removalListener(this::regionCacheEntryRemoved)
|
||||
.maximumSize(10)
|
||||
.build()
|
||||
.asMap();
|
||||
protected final Map<DBTraceMemoryRegion, DBTraceMemoryRegion> regionCache =
|
||||
new FixedSizeHashMap<>(10);
|
||||
|
||||
protected final DBTraceAddressSnapRangePropertyMapSpace<TraceMemoryState, DBTraceMemoryStateEntry> stateMapSpace;
|
||||
|
||||
protected final DBCachedObjectStore<DBTraceMemoryBufferEntry> bufferStore;
|
||||
protected final DBCachedObjectStore<DBTraceMemoryBlockEntry> blockStore;
|
||||
protected final DBCachedObjectIndex<OffsetSnap, DBTraceMemoryBlockEntry> blocksByOffset;
|
||||
protected final Map<OffsetSnap, DBTraceMemoryBlockEntry> blockCacheMostRecent = CacheBuilder
|
||||
.newBuilder()
|
||||
.removalListener(this::blockCacheEntryRemoved)
|
||||
.maximumSize(10)
|
||||
.build()
|
||||
.asMap();
|
||||
protected final Map<OffsetSnap, DBTraceMemoryBlockEntry> blockCacheMostRecent =
|
||||
new FixedSizeHashMap<>(10);
|
||||
|
||||
protected final DBTraceTimeViewport viewport;
|
||||
|
||||
@ -146,16 +136,6 @@ public class DBTraceMemorySpace
|
||||
return lock;
|
||||
}
|
||||
|
||||
private void regionCacheEntryRemoved(
|
||||
RemovalNotification<DBTraceMemoryRegion, DBTraceMemoryRegion> rn) {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
private void blockCacheEntryRemoved(
|
||||
RemovalNotification<OffsetSnap, DBTraceMemoryBlockEntry> rn) {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public Trace getTrace() {
|
||||
return trace;
|
||||
|
@ -18,9 +18,7 @@ package ghidra.trace.database.program;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.*;
|
||||
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.RemovalNotification;
|
||||
import com.google.common.collect.Iterators;
|
||||
import org.apache.commons.collections4.IteratorUtils;
|
||||
|
||||
import generic.NestedIterator;
|
||||
import ghidra.program.database.ProgramDB;
|
||||
@ -51,6 +49,7 @@ import ghidra.trace.model.symbol.TraceFunctionSymbol;
|
||||
import ghidra.trace.util.*;
|
||||
import ghidra.util.*;
|
||||
import ghidra.util.AddressIteratorAdapter;
|
||||
import ghidra.util.datastruct.WeakValueHashMap;
|
||||
import ghidra.util.exception.*;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
@ -84,12 +83,7 @@ public abstract class AbstractDBTraceProgramViewListing implements TraceProgramV
|
||||
new HashMap<>();
|
||||
|
||||
protected final Map<AddressSnap, UndefinedDBTraceData> undefinedCache =
|
||||
CacheBuilder.newBuilder()
|
||||
.removalListener(
|
||||
this::undefinedRemovedFromCache)
|
||||
.weakValues()
|
||||
.build()
|
||||
.asMap();
|
||||
new WeakValueHashMap<>();
|
||||
|
||||
public AbstractDBTraceProgramViewListing(DBTraceProgramView program,
|
||||
TraceCodeOperations codeOperations) {
|
||||
@ -101,11 +95,6 @@ public abstract class AbstractDBTraceProgramViewListing implements TraceProgramV
|
||||
this.rootModule = new DBTraceProgramViewRootModule(this);
|
||||
}
|
||||
|
||||
private void undefinedRemovedFromCache(
|
||||
RemovalNotification<AddressSnap, UndefinedDBTraceData> rn) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public TraceProgramView getProgram() {
|
||||
return program;
|
||||
@ -165,7 +154,7 @@ public abstract class AbstractDBTraceProgramViewListing implements TraceProgramV
|
||||
|
||||
protected <T extends TraceCodeUnit> Iterator<T> getTopCodeIterator(
|
||||
java.util.function.Function<Long, Iterator<T>> iterFunc, boolean forward) {
|
||||
return Iterators.filter(
|
||||
return IteratorUtils.filteredIterator(
|
||||
program.viewport.mergedIterator(iterFunc, getUnitComparator(forward)),
|
||||
cu -> program.isCodeVisible(cu, cu.getLifespan()));
|
||||
}
|
||||
@ -239,16 +228,17 @@ public abstract class AbstractDBTraceProgramViewListing implements TraceProgramV
|
||||
defStart = defUnit.getMinAddress();
|
||||
}
|
||||
}
|
||||
Iterator<AddressRange> defIter = Iterators.transform(
|
||||
Iterator<AddressRange> defIter = IteratorUtils.transformedIterator(
|
||||
getDefinedUnitIterator(defStart, forward), u -> u.getRange());
|
||||
AddressRangeIterator undefIter =
|
||||
AddressRangeIterators.subtract(set.iterator(forward), defIter, start, forward);
|
||||
AddressIteratorAdapter undefAddrIter = new AddressIteratorAdapter(undefIter, forward);
|
||||
return Iterators.transform(undefAddrIter.iterator(), a -> doCreateUndefinedUnit(a));
|
||||
return IteratorUtils.transformedIterator(undefAddrIter.iterator(),
|
||||
a -> doCreateUndefinedUnit(a));
|
||||
}
|
||||
|
||||
protected AddressRangeIterator getUndefinedRangeIterator(AddressSetView set, boolean forward) {
|
||||
Iterator<AddressRange> defIter = Iterators.transform(
|
||||
Iterator<AddressRange> defIter = IteratorUtils.transformedIterator(
|
||||
getDefinedUnitIterator(set, forward), u -> u.getRange());
|
||||
return AddressRangeIterators.subtract(set.iterator(forward), defIter,
|
||||
forward ? set.getMinAddress() : set.getMaxAddress(), forward);
|
||||
@ -274,7 +264,8 @@ public abstract class AbstractDBTraceProgramViewListing implements TraceProgramV
|
||||
protected Iterator<TraceData> getUndefinedDataIterator(AddressSetView set, boolean forward) {
|
||||
AddressRangeIterator undefIter = getUndefinedRangeIterator(set, forward);
|
||||
AddressIteratorAdapter undefAddrIter = new AddressIteratorAdapter(undefIter, forward);
|
||||
return Iterators.transform(undefAddrIter.iterator(), a -> doCreateUndefinedUnit(a));
|
||||
return IteratorUtils.transformedIterator(undefAddrIter.iterator(),
|
||||
a -> doCreateUndefinedUnit(a));
|
||||
}
|
||||
|
||||
protected Iterator<TraceCodeUnit> getCodeUnitIterator(AddressSetView set, boolean forward) {
|
||||
|
@ -21,8 +21,6 @@ import java.nio.ByteBuffer;
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.google.common.cache.RemovalNotification;
|
||||
|
||||
import ghidra.framework.store.LockException;
|
||||
import ghidra.program.database.mem.*;
|
||||
import ghidra.program.model.address.*;
|
||||
@ -57,16 +55,6 @@ public abstract class AbstractDBTraceProgramViewMemory
|
||||
setSnap(program.snap);
|
||||
}
|
||||
|
||||
protected void regionBlockRemoved(
|
||||
RemovalNotification<TraceMemoryRegion, DBTraceProgramViewMemoryRegionBlock> rn) {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
protected void spaceBlockRemoved(
|
||||
RemovalNotification<AddressSpace, DBTraceProgramViewMemorySpaceBlock> rn) {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
protected abstract void recomputeAddressSet();
|
||||
|
||||
protected void forPhysicalSpaces(Consumer<AddressSpace> consumer) {
|
||||
|
@ -23,8 +23,6 @@ import javax.swing.Icon;
|
||||
|
||||
import org.apache.commons.collections4.IteratorUtils;
|
||||
|
||||
import com.google.common.collect.Iterators;
|
||||
|
||||
import generic.NestedIterator;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.program.model.listing.Bookmark;
|
||||
@ -283,6 +281,7 @@ public class DBTraceProgramViewBookmarkManager implements TraceProgramViewBookma
|
||||
* A less restrictive casting of
|
||||
* {@link IteratorUtils#filteredIterator(Iterator, org.apache.commons.collections4.Predicate)}.
|
||||
*
|
||||
* <p>
|
||||
* This one understands that the predicate will be testing things of the (possibly
|
||||
* more-specific) type of elements in the original iterator, not that of the returned iterator.
|
||||
*
|
||||
@ -293,7 +292,7 @@ public class DBTraceProgramViewBookmarkManager implements TraceProgramViewBookma
|
||||
@SuppressWarnings("unchecked")
|
||||
protected static <T, U extends T> Iterator<T> filteredIterator(Iterator<U> it,
|
||||
Predicate<? super U> predicate) {
|
||||
return (Iterator<T>) Iterators.filter(it, e -> predicate.test(e));
|
||||
return (Iterator<T>) IteratorUtils.filteredIterator(it, e -> predicate.test(e));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -17,9 +17,7 @@ package ghidra.trace.database.program;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
import com.google.common.cache.RemovalNotification;
|
||||
import com.google.common.collect.Iterators;
|
||||
import org.apache.commons.collections4.IteratorUtils;
|
||||
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.program.model.symbol.Equate;
|
||||
@ -30,6 +28,7 @@ import ghidra.trace.model.Lifespan;
|
||||
import ghidra.trace.model.listing.TraceCodeUnit;
|
||||
import ghidra.util.IntersectionAddressSetView;
|
||||
import ghidra.util.LockHold;
|
||||
import ghidra.util.datastruct.WeakValueHashMap;
|
||||
import ghidra.util.exception.*;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
@ -37,18 +36,13 @@ public class DBTraceProgramViewEquateTable implements EquateTable {
|
||||
protected final DBTraceProgramView program;
|
||||
protected final DBTraceEquateManager equateManager;
|
||||
|
||||
protected final Map<DBTraceEquate, DBTraceProgramViewEquate> cache =
|
||||
CacheBuilder.newBuilder().removalListener(this::equateRemoved).weakValues().build().asMap();
|
||||
protected final Map<DBTraceEquate, DBTraceProgramViewEquate> cache = new WeakValueHashMap<>();
|
||||
|
||||
public DBTraceProgramViewEquateTable(DBTraceProgramView program) {
|
||||
this.program = program;
|
||||
this.equateManager = program.trace.getEquateManager();
|
||||
}
|
||||
|
||||
private void equateRemoved(RemovalNotification<DBTraceEquate, DBTraceProgramViewEquate> rn) {
|
||||
// Nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public Equate createEquate(String name, long value)
|
||||
throws DuplicateNameException, InvalidInputException {
|
||||
@ -77,7 +71,8 @@ public class DBTraceProgramViewEquateTable implements EquateTable {
|
||||
@Override
|
||||
public void deleteAddressRange(Address start, Address end, TaskMonitor monitor)
|
||||
throws CancelledException {
|
||||
equateManager.clearReferences(Lifespan.nowOn(program.snap), new AddressRangeImpl(start, end),
|
||||
equateManager.clearReferences(Lifespan.nowOn(program.snap),
|
||||
new AddressRangeImpl(start, end),
|
||||
monitor);
|
||||
}
|
||||
|
||||
@ -161,7 +156,8 @@ public class DBTraceProgramViewEquateTable implements EquateTable {
|
||||
|
||||
@Override
|
||||
public Iterator<Equate> getEquates() {
|
||||
return Iterators.transform(equateManager.getAll().iterator(), e -> doGetViewEquate(e));
|
||||
return IteratorUtils.transformedIterator(equateManager.getAll().iterator(),
|
||||
e -> doGetViewEquate(e));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user