@@ -7145,7 +7145,7 @@ void Debugger::ParseDebugData()
7145
7145
usage->rows = rows;
7146
7146
usage->columns = columns;
7147
7147
7148
- if (bytesRemaining > 0 )
7148
+ if (( bytesRemaining > 0 ) && (bytesRemaining != scalar. sizeInBytes * rows * columns) )
7149
7149
{
7150
7150
if (usage->children .isEmpty ())
7151
7151
{
@@ -7179,6 +7179,8 @@ void Debugger::ParseDebugData()
7179
7179
}
7180
7180
RDCASSERTEQUAL (usage->children .size (), rows);
7181
7181
7182
+ // assigning to a vector (row or column)
7183
+ uint32_t vecSize = (typeWalk->colMajorMat ) ? columns : rows;
7182
7184
// assigning to a single element
7183
7185
if (bytesRemaining == scalar.sizeInBytes )
7184
7186
{
@@ -7224,51 +7226,46 @@ void Debugger::ParseDebugData()
7224
7226
usage->children [row].emitSourceVar = true ;
7225
7227
}
7226
7228
}
7227
- else
7229
+ // Assigning to a row/col
7230
+ else if (bytesRemaining == scalar.sizeInBytes * vecSize)
7228
7231
{
7229
- // assigning to a vector (row or column)
7230
- uint32_t vecSize = (typeWalk->colMajorMat ) ? columns : rows;
7231
- if (bytesRemaining == scalar.sizeInBytes * vecSize)
7232
+ uint32_t componentIndex = byteOffset / scalar.sizeInBytes ;
7233
+ if (typeWalk->colMajorMat )
7232
7234
{
7233
- uint32_t componentIndex = byteOffset / scalar.sizeInBytes ;
7234
- if (typeWalk->colMajorMat )
7235
- {
7236
- uint32_t col = componentIndex % columns;
7237
- RDCASSERT (col < columns, col, columns);
7238
- // one remaining index selects a column within the matrix.
7239
- // source vars are displayed as row-major, need <rows> mappings
7240
- for (uint32_t r = 0 ; r < rows; ++r)
7241
- {
7242
- RDCASSERTEQUAL (usage->children [r].children .size (), columns);
7243
- usage->children [r].children [col].emitSourceVar =
7244
- !usage->children [r].emitSourceVar ;
7245
- usage->children [r].children [col].debugVarSSAName = mapping.debugVarSSAName ;
7246
- usage->children [r].children [col].debugVarComponent = r;
7247
- }
7248
- }
7249
- else
7235
+ uint32_t col = componentIndex % columns;
7236
+ RDCASSERT (col < columns, col, columns);
7237
+ // one remaining index selects a column within the matrix.
7238
+ // source vars are displayed as row-major, need <rows> mappings
7239
+ for (uint32_t r = 0 ; r < rows; ++r)
7250
7240
{
7251
- uint32_t row = componentIndex % rows;
7252
- RDCASSERT (row < rows, row, rows);
7253
- RDCASSERTEQUAL (usage->children .size (), rows);
7254
- RDCASSERTEQUAL (usage->children [row].children .size (), columns);
7255
- // one remaining index selects a row within the matrix.
7256
- // source vars are displayed as row-major, need <rows> mappings
7257
- for (uint32_t c = 0 ; c < columns; ++c)
7258
- {
7259
- usage->children [row].children [c].emitSourceVar =
7260
- !usage->children [row].emitSourceVar ;
7261
- usage->children [row].children [c].debugVarSSAName = mapping.debugVarSSAName ;
7262
- usage->children [row].children [c].debugVarComponent = c;
7263
- }
7241
+ RDCASSERTEQUAL (usage->children [r].children .size (), columns);
7242
+ usage->children [r].children [col].emitSourceVar =
7243
+ !usage->children [r].emitSourceVar ;
7244
+ usage->children [r].children [col].debugVarSSAName = mapping.debugVarSSAName ;
7245
+ usage->children [r].children [col].debugVarComponent = r;
7264
7246
}
7265
7247
}
7266
7248
else
7267
7249
{
7268
- RDCERR (" Unhandled matrix source variable mapping %u %u" , bytesRemaining,
7269
- byteOffset);
7250
+ uint32_t row = componentIndex % rows;
7251
+ RDCASSERT (row < rows, row, rows);
7252
+ RDCASSERTEQUAL (usage->children .size (), rows);
7253
+ RDCASSERTEQUAL (usage->children [row].children .size (), columns);
7254
+ // one remaining index selects a row within the matrix.
7255
+ // source vars are displayed as row-major, need <rows> mappings
7256
+ for (uint32_t c = 0 ; c < columns; ++c)
7257
+ {
7258
+ usage->children [row].children [c].emitSourceVar =
7259
+ !usage->children [row].emitSourceVar ;
7260
+ usage->children [row].children [c].debugVarSSAName = mapping.debugVarSSAName ;
7261
+ usage->children [row].children [c].debugVarComponent = c;
7262
+ }
7270
7263
}
7271
7264
}
7265
+ else
7266
+ {
7267
+ RDCERR (" Unhandled matrix assignment" );
7268
+ }
7272
7269
// try to recombine matrix rows to a single source var display
7273
7270
for (uint32_t r = 0 ; r < rows; ++r)
7274
7271
{
@@ -7313,7 +7310,7 @@ void Debugger::ParseDebugData()
7313
7310
usage->rows = 1U ;
7314
7311
usage->columns = columns;
7315
7312
7316
- if (bytesRemaining > 0 )
7313
+ if (bytesRemaining == scalar. sizeInBytes )
7317
7314
{
7318
7315
bytesRemaining -= scalar.sizeInBytes ;
7319
7316
RDCASSERTEQUAL (bytesRemaining, 0 );
@@ -7454,7 +7451,6 @@ void Debugger::ParseDebugData()
7454
7451
}
7455
7452
else
7456
7453
{
7457
- RDCASSERTEQUAL (n->rows * n->columns , (uint32_t )n->children .count ());
7458
7454
for (int32_t c = 0 ; c < n->children .count (); ++c)
7459
7455
sourceVar.variables .push_back (DebugVariableReference (
7460
7456
DebugVariableType::Variable,
0 commit comments