openMSX / debugger

31 stars 15 forks source link

CommMemoryRequest requesting wrong size_ in high memory #110

Closed pvmm closed 2 years ago

pvmm commented 2 years ago

For instance, when:

offset = 0xfd0c (64780) size = 0xffff02f4 (4294902516)

which makes openMSX ignore the request and the Goto... dialog does nothing.

m9710797 commented 2 years ago

This is an easy change and I'm sure it fixes the problem. Maybe one detail: you make size a 16-bit value. I guess in practice this will be fine, but isn't it theoretically possible to request the full 64kB? That won't fit in 16-bit.

Above I said "it fixes the problem", but maybe I should say "it hides the symptom"? Isn't the real problem that size_ can become as big as 0xffff02f4? I would not expect size a large size for the disassemble view (for a 64kB address space). (I know this is because it's a negative value shown as an unsigned 32 bit).

Wouldn't it be better to investigate why we end up with such a value for size_ and fix it the root cause?

Or maybe I misunderstood. Please inform me.