use uint32_t for instruction storage. This fixes operation on big endian 64bit MIPS
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
What does this have to do with big endianess? You're basically moving 8 bytes forward and then 4 bytes backwards. What system is this on?
Comment Actions
What does this have to do with big endianess? You're basically moving 8 bytes forward and then 4 bytes backwards. What system is this on?
it is MIPS64EB. Unsigned long is 8 bytes, instruction is 4 bytes, so it copies wrong data (it copies zeroes)
Comment Actions
it reads the correct value, e.g. 0x67bdfff000000000. Casting it to uint32_t gives us 0x67bdfff0.
lib/libproc/proc_bkpt.c | ||
---|---|---|
71 ↗ | (On Diff #21651) | Maybe add a comment here explaining why this works for x86. |