
Hi Wolfgang,
As far as the output, my vote would be to align the end address to a 32-bit address and add 3. eg assuming a starting address of 1000 and ending addresses of: 0x1ffc - output: Testing 00001000 ... 00001fff 0x1ffd - output: Testing 00001000 ... 00001fff 0x1ffe - output: Testing 00001000 ... 00001fff 0x1fff - output: Testing 00001000 ... 00001fff 0x2000 - output: Testing 00001000 ... 00002003 0x2001 - output: Testing 00001000 ... 00002003
No, please do not implement such automatic alignment; it may be useful for some cases, but it may as well hurt, for example if you intentionally want to run mtest with misalignment, like giving both odd start and end addresses.
I didn't express it well, but what I was getting at was that the "Testing X .. Y" would ideally state exactly what is being tested. Unaligned addresses would still be allowed. I think right now the end address is always automatically aligned to the same alignment as the start address though, so the current output is very misleading.
eg: mw.l 0x1000 0x12345678 0x1000 mtest 0x1003 0x1ffc 1 1 Testing 00001003 ... 00001ffc: ... md 0x1000 10; md 0x1ff0 10 00001000: 12345600 00000000 00000000 00000000 .4V............. 00001010: 00000000 00000000 00000000 00000000 ................ 00001020: 00000000 00000000 00000000 00000000 ................ 00001030: 00000000 00000000 00000000 00000000 ................ 00001ff0: 00000000 00000000 00000000 00000078 ...............x 00002000: 12345678 12345678 12345678 12345678 .4Vx.4Vx.4Vx.4Vx 00002010: 12345678 12345678 12345678 12345678 .4Vx.4Vx.4Vx.4Vx 00002020: 12345678 12345678 12345678 12345678 .4Vx.4Vx.4Vx.4Vx
You can see the starting alignment was respected, but the ending alignment was truncated to be 32-bit aligned to the starting address. In the above example, I think it would be nice to see "Testing 00001003 ... 00001ffe". Or some other way such that the user knows that their input wasn't executed to a T; their end address was truncated.
Best, Peter