I was debugging under IBM AIX with dbx. I was seeing the following:
(dbx) print $r4
0x00000001614aa050
(dbx) print *((int64*)0x00000001614aa050)
-1
(dbx) print $r3
0x0000000165e08468
Then I "stepi" my 64bit program which executed the following instruction:
std r3,0x0(r4)
I then immediately checked the content of that memory:
(dbx) print *((int64*)0x00000001614aa050)
-1
Still -1? I was expecting the content in $r3 should be saved to that memory. I then manually assigned the value to that address using my variables:
(dbx) print &bmc._pLong
0x00000001614aa050
(dbx) assign bmc._pLong=(int64 *)0x0000000165e08468
(dbx) print *((int64*)0x00000001614aa050)
6004180072 (which is 0x0000000165e08468)
How could that happen?