mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-27 12:31:44 +08:00
GP-1320 corrected DTM used when Function Editor parses signature
This commit is contained in:
+1
-1
@@ -206,7 +206,7 @@ public class FunctionSignatureParser {
|
|||||||
// attempt to separate trailing parameter name from datatype and reparse
|
// attempt to separate trailing parameter name from datatype and reparse
|
||||||
int spaceIndex = arg.lastIndexOf(' ');
|
int spaceIndex = arg.lastIndexOf(' ');
|
||||||
if (spaceIndex < 0) {
|
if (spaceIndex < 0) {
|
||||||
throw new ParseException("Can't resolve datatype: " + dt);
|
throw new ParseException("Can't resolve datatype: " + arg);
|
||||||
}
|
}
|
||||||
int starIndex = arg.lastIndexOf('*');
|
int starIndex = arg.lastIndexOf('*');
|
||||||
int nameIndex = Math.max(spaceIndex, starIndex) + 1;
|
int nameIndex = Math.max(spaceIndex, starIndex) + 1;
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ public class DataTypeParser {
|
|||||||
// handle C primitives (e.g. long long, unsigned long int, etc.)
|
// handle C primitives (e.g. long long, unsigned long int, etc.)
|
||||||
DataType dataType = DataTypeUtilities.getCPrimitiveDataType(baseName);
|
DataType dataType = DataTypeUtilities.getCPrimitiveDataType(baseName);
|
||||||
if (dataType != null) {
|
if (dataType != null) {
|
||||||
return dataType;
|
return dataType.clone(dtm);
|
||||||
}
|
}
|
||||||
|
|
||||||
dtm.findDataTypes(baseName, list);
|
dtm.findDataTypes(baseName, list);
|
||||||
|
|||||||
+2
-1
@@ -48,7 +48,8 @@ public class ParameterDefinitionImpl implements ParameterDefinition {
|
|||||||
* @throws IllegalArgumentException if invalid parameter datatype specified
|
* @throws IllegalArgumentException if invalid parameter datatype specified
|
||||||
*/
|
*/
|
||||||
protected ParameterDefinitionImpl(String name, DataType dataType, String comment, int ordinal) {
|
protected ParameterDefinitionImpl(String name, DataType dataType, String comment, int ordinal) {
|
||||||
this.dataType = validateDataType(dataType, null, false);
|
this.dataType = validateDataType(dataType,
|
||||||
|
dataType != null ? dataType.getDataTypeManager() : null, false);
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.comment = comment;
|
this.comment = comment;
|
||||||
this.ordinal = ordinal;
|
this.ordinal = ordinal;
|
||||||
|
|||||||
Reference in New Issue
Block a user