diff options
author | sagitario <sagitario@fc51e93f-b9fe-4711-8d8d-3ae870c5f7d8> | 2009-06-05 09:56:53 (GMT) |
---|---|---|
committer | sagitario <sagitario@fc51e93f-b9fe-4711-8d8d-3ae870c5f7d8> | 2009-06-05 09:56:53 (GMT) |
commit | 5f8ec64d826f844ccc5e5f5b8767545e305a6e81 (patch) | |
tree | 40c40ee8520b4c7130da473976c4190f03f60acb | |
parent | 890a9b3e4f9384f8937646d49848aa669f93ed8e (diff) | |
download | cv2pdb-5f8ec64d826f844ccc5e5f5b8767545e305a6e81.zip cv2pdb-5f8ec64d826f844ccc5e5f5b8767545e305a6e81.tar.gz cv2pdb-5f8ec64d826f844ccc5e5f5b8767545e305a6e81.tar.bz2 |
v0.4: fix crash when long is used as index or element type of dynamic or associative arrays
-rw-r--r-- | CHANGES | 7 | ||||
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | src/cv2pdb.cpp | 13 |
4 files changed, 20 insertions, 3 deletions
@@ -18,7 +18,7 @@ Version history * support for field type LF_VFUNCTAB and symbol type S_CONSTANT used by DMC.
* added stringview to autoexp.dat for full length text display.
-2009-06-01 Version 0.3
+2009-06-04 Version 0.3
* static members' debug info was not correctly converted, causing debugger confusion
* now works on executables compiled by DMC
@@ -28,3 +28,8 @@ Version history * added fields __viewhelper to classes string and object
* new addin dviewhelper.dll to display correctly terminated strings
and derived object type
+
+2009-06-05 Version 0.4
+
+ * fixed crash when long is used as index or element type of dynamic or
+ associative arrays
@@ -21,3 +21,4 @@ in the future, but not all have a known solution. * type display of delegate does not have arguments
* assoc_array.length cannot be displayed (it is assoc_array.a->nodes)
* enum values not displayed
+* does not work with debug version of phobos
@@ -1 +1 @@ -VERSION = 0.3
+VERSION = 0.4
diff --git a/src/cv2pdb.cpp b/src/cv2pdb.cpp index f2ead36..49cb158 100644 --- a/src/cv2pdb.cpp +++ b/src/cv2pdb.cpp @@ -1079,7 +1079,7 @@ bool CV2PDB::nameOfAssocArray(int indexType, int elemType, char* name, int maxle bool CV2PDB::nameOfDelegate(int thisType, int funcType, char* name, int maxlen) { - strcat(name, "delegate "); + strcpy(name, "delegate "); int len = strlen(name); if (!nameOfType(funcType, name + len, maxlen - len)) return false; @@ -1101,6 +1101,9 @@ bool CV2PDB::nameOfOEMType(codeview_oem_type* oem, char* name, int maxlen) const char* CV2PDB::appendDynamicArray(int indexType, int elemType) { + indexType = translateType(indexType); + elemType = translateType(elemType); + codeview_reftype* rdtype;
codeview_type* dtype; @@ -1173,6 +1176,9 @@ const char* CV2PDB::appendAssocArray(int keyType, int elemType) // elemType value;
// };
+ keyType = translateType(keyType); + elemType = translateType(elemType); + codeview_reftype* rdtype;
codeview_type* dtype; codeview_fieldtype* dfieldtype; @@ -1297,6 +1303,9 @@ const char* CV2PDB::appendAssocArray(int keyType, int elemType) const char* CV2PDB::appendDelegate(int thisType, int funcType) { + thisType = translateType(thisType); + funcType = translateType(funcType); + codeview_reftype* rdtype;
codeview_type* dtype; @@ -1735,6 +1744,8 @@ bool CV2PDB::addTypes() int rc = mod->AddTypes(globalTypes, cb); if (rc <= 0) return setError("cannot add type info to module"); + // does it make sense to add symbols more than once? + // break; } } return true; |