Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Logging memory with the debugger
#1
Is it possible to log memory values with debugger?

For example: if I have 0x089160c in a1 and said address contains
the value 0x7a, could I log said value (0x7a) instead of the
value in the register (0x089160c)?.
Reply
#2
Inside log expressions you can reference memory, yes.

I believe the syntax in this case would be:
Code:
Hit breakpoint, value at a1 is: {[a1,8]}

Where simply {a1} would log the value of a1 itself.

-[Unknown]
Reply
#3
{[a1,8]} doesn't work. It gives me Invalid log format error. It accepts {[a1]} but logs nothing.
Reply
#4
Sorry, {[a1,4]} would log 4 bytes (32-bits.) You're right, my example of 8 won't work as it doesn't support 64-bit log values.

If it logs nothing, are you sure your breakpoint is being hit? Even without a log format, it will log something, it'll just be generic. You can put words outside the {} to make sure.

For example, just yesterday I was logging things using {[[[[a0]+0x78]+0x34]+0x2c]}.

-[Unknown]
Reply
#5
Yes, {[a1,4]} does works. Can log an offset too with {[a1-x},4]}, but can't log offset 0x1 or 0x3.
However, it sometimes doesn't log any value, produces the log itself but not the value or the any text after it.
Reply
#6
If you use the latest git build, I recently removed the alignment restriction - not really sure why it was there.

I think it may truncate the string if it can't evaluate the expression inside the {}, so if it became unaligned or was garbage that might've caused it to break. I think the latest git will work better.

-[Unknown]
Reply


Forum Jump: