Merge remote-tracking branch 'origin/patch'

This commit is contained in:
Ryan Kurtz 2025-07-22 06:12:42 -04:00
commit a6a738f650
2 changed files with 11 additions and 2 deletions

View file

@ -248,13 +248,19 @@ public class DebuggerTrackLocationTrait {
return action; return action;
} }
protected ActionState<LocationTrackingSpec> makeState(LocationTrackingSpec spec) {
return new ActionState<>(spec.getMenuName(), spec.getMenuIcon(), spec);
}
public List<ActionState<LocationTrackingSpec>> getStates() { public List<ActionState<LocationTrackingSpec>> getStates() {
Map<String, ActionState<LocationTrackingSpec>> states = new TreeMap<>(); Map<String, ActionState<LocationTrackingSpec>> states = new TreeMap<>();
// NOTE: Ensure the saved spec is available, even if no factory produces it, yet.
// NOTE: In particular, the DebuggerWatchesPlugin may not read its config before us.
states.put(spec.getConfigName(), makeState(spec));
for (LocationTrackingSpec spec : LocationTrackingSpecFactory for (LocationTrackingSpec spec : LocationTrackingSpecFactory
.allSuggested(tool) .allSuggested(tool)
.values()) { .values()) {
states.put(spec.getConfigName(), states.put(spec.getConfigName(), makeState(spec));
new ActionState<>(spec.getMenuName(), spec.getMenuIcon(), spec));
} }
ActionState<LocationTrackingSpec> current = action.getCurrentState(); ActionState<LocationTrackingSpec> current = action.getCurrentState();
if (current != null) { if (current != null) {

View file

@ -1726,6 +1726,9 @@ Datatype *TypeStruct::nearestArrayedComponentForward(int8 off,int8 *newoff,int8
int8 suboff; int8 suboff;
Datatype *res = subtype->nearestArrayedComponentForward(remain, &suboff, elSize); Datatype *res = subtype->nearestArrayedComponentForward(remain, &suboff, elSize);
if (res != (Datatype *)0) { if (res != (Datatype *)0) {
int8 subdiff = diff + remain - suboff;
if (subdiff > 128)
break;
*newoff = -diff; *newoff = -diff;
return subtype; return subtype;
} }