Commit 8099410c authored by Claes Sjofors's avatar Claes Sjofors

Rt and wb attribute offset for large array fixes

parent 7f7c9ea5
...@@ -295,7 +295,7 @@ mvol_AnameToAttribute ( ...@@ -295,7 +295,7 @@ mvol_AnameToAttribute (
if ( i != pn->nAttribute - 1) { if ( i != pn->nAttribute - 1) {
if ( pn->hasIndex[i]) if ( pn->hasIndex[i])
offset += pn->index[i] * ap->adef->Info.Size / ap->adef->Info.Elements; offset += pn->index[i] * (ap->adef->Info.Size / ap->adef->Info.Elements);
if ( !(ap->adef->Info.Flags & PWR_MASK_CLASS)) pwr_Return(NULL, sts, GDH__NOSUCHCLASS); if ( !(ap->adef->Info.Flags & PWR_MASK_CLASS)) pwr_Return(NULL, sts, GDH__NOSUCHCLASS);
tid = ap->adef->TypeRef; tid = ap->adef->TypeRef;
...@@ -479,7 +479,7 @@ mvol_ArefToAttribute ( ...@@ -479,7 +479,7 @@ mvol_ArefToAttribute (
if (arp->Offset > offset && if (arp->Offset > offset &&
((arp->Offset - offset) % (acp->attr[i].size / acp->attr[i].elem)) != 0) ((arp->Offset - offset) % (acp->attr[i].size / acp->attr[i].elem)) != 0)
pwr_Return(NULL, sts, GDH__ATTRIBUTE); pwr_Return(NULL, sts, GDH__ATTRIBUTE);
offset -= idx * acp->attr[i].size / acp->attr[i].elem; offset -= idx * (acp->attr[i].size / acp->attr[i].elem);
break; break;
} }
} }
...@@ -980,7 +980,7 @@ static void insertCattObject( pwr_tStatus *sts, pwr_tCid cid, gdb_sAttribute *ap ...@@ -980,7 +980,7 @@ static void insertCattObject( pwr_tStatus *sts, pwr_tCid cid, gdb_sAttribute *ap
for ( j = 0; j < ap->elem; j++) { for ( j = 0; j < ap->elem; j++) {
if ( ODD(*sts) && item->numOffset < gdb_cCattOffsetSize) { if ( ODD(*sts) && item->numOffset < gdb_cCattOffsetSize) {
/* Insert in current item */ /* Insert in current item */
item->offset[item->numOffset] = offset + ap->offs + j * ap->size / ap->elem; item->offset[item->numOffset] = offset + ap->offs + j * (ap->size / ap->elem);
item->flags[item->numOffset++] = ap->flags; item->flags[item->numOffset++] = ap->flags;
} }
else { else {
...@@ -992,7 +992,7 @@ static void insertCattObject( pwr_tStatus *sts, pwr_tCid cid, gdb_sAttribute *ap ...@@ -992,7 +992,7 @@ static void insertCattObject( pwr_tStatus *sts, pwr_tCid cid, gdb_sAttribute *ap
itemr = ptree_Insert( sts, gdbroot->catt_tt, &key); itemr = ptree_Insert( sts, gdbroot->catt_tt, &key);
item = (gdb_sClassAttr *) pool_Address( sts, gdbroot->pool, itemr); item = (gdb_sClassAttr *) pool_Address( sts, gdbroot->pool, itemr);
if ( item == NULL) return; if ( item == NULL) return;
item->offset[item->numOffset] = offset + ap->offs + j * ap->size / ap->elem; item->offset[item->numOffset] = offset + ap->offs + j * (ap->size / ap->elem);
item->flags[item->numOffset++] = ap->flags; item->flags[item->numOffset++] = ap->flags;
} }
...@@ -1000,7 +1000,7 @@ static void insertCattObject( pwr_tStatus *sts, pwr_tCid cid, gdb_sAttribute *ap ...@@ -1000,7 +1000,7 @@ static void insertCattObject( pwr_tStatus *sts, pwr_tCid cid, gdb_sAttribute *ap
for (i=0; i < cp->acount; i++) { for (i=0; i < cp->acount; i++) {
if ( cp->attr[i].flags.b.isclass && cdh_tidIsCid( cp->attr[i].tid) && !cp->attr[i].flags.b.pointer) { if ( cp->attr[i].flags.b.isclass && cdh_tidIsCid( cp->attr[i].tid) && !cp->attr[i].flags.b.pointer) {
insertCattObject( sts, cid, &cp->attr[i], insertCattObject( sts, cid, &cp->attr[i],
offset + ap->offs + j * ap->size / ap->elem); offset + ap->offs + j * (ap->size / ap->elem));
if ( EVEN(*sts)) return; if ( EVEN(*sts)) return;
} }
} }
......
...@@ -769,7 +769,7 @@ int rtt_attribute_func ( ...@@ -769,7 +769,7 @@ int rtt_attribute_func (
} }
} }
object_element = object_par + element * attrsize / attrelem; object_element = object_par + element * (attrsize / attrelem);
switch ( attrtype ) switch ( attrtype )
{ {
......
...@@ -5516,7 +5516,7 @@ static int rtt_show_parameter_add( ...@@ -5516,7 +5516,7 @@ static int rtt_show_parameter_add(
if ( element >= 0) if ( element >= 0)
parameter_ptr += element * ad.attr->Param.Info.Size / elements; parameter_ptr += element * (ad.attr->Param.Info.Size / elements);
/* Get class name */ /* Get class name */
sts = rtt_objidtoclassname( objid, classname); sts = rtt_objidtoclassname( objid, classname);
......
...@@ -8173,7 +8173,7 @@ static int xnav_attribute_func ( ...@@ -8173,7 +8173,7 @@ static int xnav_attribute_func (
} }
} }
object_element = object_par + element * attrsize / attrelem; object_element = object_par + element * (attrsize / attrelem);
switch ( attrtype ) switch ( attrtype )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment