Review Board 2.0.15


Alpha: Fix the datatypes of some values read from the simulated kernel.

Review Request #533 - Created March 3, 2011 and submitted

Information
Gabe Black
gem5
Reviewers
Default
ali, gblack, nate, stever
Alpha: Fix the datatypes of some values read from the simulated kernel.

   
Posted (March 6, 2011, 10:58 p.m.)



  
src/arch/alpha/linux/threadinfo.hh (Diff revision 1)
 
 
Did the size of this type change at some point in the kernel?  Maybe it's always just been wrong, but this did work at some point (or at least I thought it did).  Unfortunately, this code is pretty fragile and it is going to be difficult to, in general keep this code correct.  (Be nice to use bfd for this some day).
  1. I don't know if you saw my email on one of the mailing lists related to this that got into more detail, but the field being read is from an int added in one of the M5 patches, so that should actually be pretty stable unless the size of an int changed (does that ever happen?) or we change the patch around. Basically it sticks the offset of some members of a structure into ints that M5 can read out pretty easily, and maybe some other things I'm not remembering off hand. I would guess the purpose of the patch in the first place is to put those values somewhere we can have a bit more control over. It might be a good idea to even change those to be a fixed size integer like int32_t (which should be quite sufficient) that wouldn't depend on how big an int ended up being. I'm not familiar with bfd, but if it is or has type data for debugging purposes then that would make at least some of those ints unnecessary.