Author Topic: Debugging Examine Memory window  (Read 6511 times)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Debugging Examine Memory window
« on: May 02, 2006, 02:45:45 pm »
the address displayed in the Memory window shows a wrong address.
The addresses are shown with an additional offset of 0x08

e.g. type in the Address edit field 0x43e000 and press Go button,
then the memory dump beginning at 0x43e000 is shown, but the
address of the first line is shown as 0x43e008: .. .. ..

the same happens if you enter a symbol name in the Address edit field,
the memory dump begins from the correct address, but the addresses
itself are offsetted by 8

i use gdb 6.3-2 and gcc 3.4.4 and CB svn rev 2397
« Last Edit: May 02, 2006, 03:02:30 pm by tiwag »

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Debugging Examine Memory window
« Reply #1 on: May 02, 2006, 02:59:59 pm »
the debug output for symbol s2 from gdb communication is:

Code
> x/32xb s2
0x22fe70: 0x33 0x32 0x31 0x00 0x00 0x00 0x00 0x00
0x22fe78: 0xff 0xff 0xff 0xff 0x90 0x24 0x4e 0x80
0x22fe80: 0x98 0x9a 0x4e 0x80 0xff 0xff 0xff 0xff
0x22fe88: 0x09 0x7a 0x57 0x80 0xec 0xe7 0x4d 0x80

symbol s2 is at address 0x22fe70

the memory window shows:
Code
0x22fe78: 33 32 31 00 00 00 00 00 ff ff ff ff 90 24 4e 80    321.....ÿÿÿÿ$N€
0x22fe88: 98 9a 4e 80 ff ff ff ff 09 7a 57 80 ec e7 4d 80    ˜šN€ÿÿÿÿ.zW€ìçM€

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Debugging Examine Memory window
« Reply #2 on: May 02, 2006, 03:06:04 pm »
Yes, I 'm aware of this but too lazy to fix this :P.
I promise I will :)
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Debugging Examine Memory window
« Reply #3 on: May 02, 2006, 03:24:44 pm »
it's better you fix this, i had a look at
void ExamineMemoryDlg::AddHexByte(const wxString& addr, const wxString& hexbyte)
but i don't want to change something there ...  :shock:

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Debugging Examine Memory window
« Reply #4 on: May 03, 2006, 11:01:54 am »
posted a bug report to berlios so that it doesn't get lost in mind ...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Debugging Examine Memory window
« Reply #5 on: May 03, 2006, 06:49:20 pm »
I was trying to fix this and all of the sudden I see it worked fine!
You could as well tell us about it ;)

Anyway, I had to change your fix to something more safe for the future. I also updated this dialog's XRC and added the wxTE_PROCESS_ENTER style flag for the address field. Without this, your fix to allow the Enter key didn't work (at least in linux).
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Debugging Examine Memory window
« Reply #6 on: May 04, 2006, 08:04:02 am »
sorry, i forgot to post it here too ...

i fear, that your solution is as unsure as my quick fix, because it depends too on the fact,
that always 8 bytes per address got sent, but it's easier to adapt in the future if any changes will get necessary.

thanks for the hint with linux, (i only tested with WinXp and there it worked).
« Last Edit: May 04, 2006, 08:12:33 am by tiwag »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Debugging Examine Memory window
« Reply #7 on: May 04, 2006, 08:46:35 am »
i fear, that your solution is as unsure as my quick fix, because it depends too on the fact,
that always 8 bytes per address got sent

I wonder why you say that.
It just saves the current address whenever 16 bytes have passed (and once at the very first byte).
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Debugging Examine Memory window
« Reply #8 on: May 04, 2006, 09:08:06 am »
i fear, that your solution is as unsure as my quick fix, because it depends too on the fact,
that always 8 bytes per address got sent

I wonder why you say that.
It just saves the current address whenever 16 bytes have passed (and once at the very first byte).
i think it'll fail too if any other number of bytes than 8 are sent per line (per sent address),
but maybe it'll work though.
anyway, it's fixed now, thank you.
« Last Edit: May 04, 2006, 09:12:39 am by tiwag »