One last diagnostic print to remove. In this case the mapping between
dwarf register and Dyninst register name needs to take into account
whether this is 32-bit or 64-bit code. However, there is a default in
the switch case to catch the anything other than 4 or 8 bytes. If the
code see something other than one of those two values, something is
very wrong. Figured best to just have an assert stop things, so the
problem is examined.
if (regno >= (sizeof(dyninst_register_64)/sizeof(MachRegister))) return 0;
r = dyninst_register_64[regno]; break;
default:
- cout << "Reg width " << reg_width << " bytes not understood." << endl;
+ // All the current architectures that systemtap (and dyninst) support
+ // are 32-bit (4 byte) or 64-bit (8 byte). Should never end up here.
+ assert(false);
return 0;
}