Merge branch 'GP-4827_ryanmkurtz_PR-6744_alandtse_malformed_pdb_datatypes'

This commit is contained in:
Ryan Kurtz 2024-08-07 14:12:34 -04:00
commit 351374286b

View File

@ -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.
@ -184,6 +184,17 @@ class PdbDataTypeParser {
String dataTypeName = datatype;
// Handle potential malformed datatypes where some datatype is implied
// *
// **
// [16]
if (dataTypeName.startsWith("*") || dataTypeName.startsWith("[")) {
// prepend undefined since intent is some datatype
Msg.warn(this, "dataTypeName \"" + dataTypeName +
"\" references a pointer or array without a declared datatype; assuming undefined");
dataTypeName = "undefined" + dataTypeName;
}
// Example type representations:
// char *[2][3] pointer(array(array(char,3),2))
// char *[2][3] * pointer(array(array(pointer(char),3),2))