mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
GP-5752 Fixed missing characters at the end of operands, for example closing parenthesis added in the base sleigh instruction constructor.
This commit is contained in:
parent
9ddc746e6f
commit
9979a6f9ec
6 changed files with 16 additions and 28 deletions
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -708,7 +708,7 @@ public class SleighInstructionPrototype implements InstructionPrototype {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getSeparator(int opIndex, InstructionContext context) {
|
||||
public String getSeparator(int opIndex) {
|
||||
if (opIndex < 0 || opIndex > opresolve.length) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -550,7 +550,7 @@ public class PseudoInstruction extends PseudoCodeUnit implements Instruction, In
|
|||
|
||||
@Override
|
||||
public String getSeparator(int opIndex) {
|
||||
return instrProto.getSeparator(opIndex, this);
|
||||
return instrProto.getSeparator(opIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -349,18 +349,7 @@ public class InstructionDB extends CodeUnitDB implements Instruction, Instructio
|
|||
|
||||
@Override
|
||||
public String getSeparator(int opIndex) {
|
||||
|
||||
if (opIndex < 0 || opIndex >= getNumOperands()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
lock.acquire();
|
||||
try {
|
||||
return proto.getSeparator(opIndex, this);
|
||||
}
|
||||
finally {
|
||||
lock.release();
|
||||
}
|
||||
return proto.getSeparator(opIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -194,10 +194,9 @@ public interface InstructionPrototype {
|
|||
* The separator string for numOperands+1 are the characters after the last operand.
|
||||
*
|
||||
* @param opIndex valid values are 0 thru numOperands+1
|
||||
* @param context the instruction context
|
||||
* @return separator string, or null if there is no string
|
||||
*/
|
||||
public String getSeparator(int opIndex, InstructionContext context);
|
||||
public String getSeparator(int opIndex);
|
||||
|
||||
/**
|
||||
* Get a List of Objects that can be used to render an operands representation.
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -176,7 +176,7 @@ public class InvalidPrototype implements InstructionPrototype, ParserContext {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getSeparator(int opIndex, InstructionContext context) {
|
||||
public String getSeparator(int opIndex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue