Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Logging memory with the debugger
10-28-2022, 11:11 PM
Post: #1
Logging memory with the debugger
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)?.
Find all posts by this user
Quote this message in a reply
10-29-2022, 01:13 AM
Post: #2
RE: Logging memory with the debugger
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]
Find all posts by this user
Quote this message in a reply
10-30-2022, 04:25 PM
Post: #3
RE: Logging memory with the debugger
{[a1,8]} doesn't work. It gives me Invalid log format error. It accepts {[a1]} but logs nothing.
Find all posts by this user
Quote this message in a reply
10-30-2022, 05:40 PM
Post: #4
RE: Logging memory with the debugger
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]
Find all posts by this user
Quote this message in a reply
10-31-2022, 12:03 AM
Post: #5
RE: Logging memory with the debugger
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.
Find all posts by this user
Quote this message in a reply
11-01-2022, 06:10 AM
Post: #6
RE: Logging memory with the debugger
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]
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: