[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] GDB & watch expression



Hi,

On torstai 27 tammikuu 2011, m0n0 wrote:
> Does watch expression work with gdb? Because it takes very long and after
> setting the watch it seems like nothing is happening anymore...

If m68k CPU itself doesn't have support for watching of memory address
content changes (I don't think it does), emulating such in Gdb is really
slow...

> memory
> usage isn't increasing of the target app. I'm also getting 2 warnings:
> 
> warning: (Internal error: px 0x4934bdc in read in psymtab, but not in
> symtab.)

If you can run your stuff under Hatari emulation, get the physical memory
address of your variable with Gdb and set a breakpoint for that address
contents changes in Hatari debugger.

For example, if the variable size is short, you can trace its value changes
and which instructions do the change with:
	b (address).w ! (address).w  :info

When you notice some suspicous value, make note of the printed PC value
i.e. at which address are the instructions setting the variable to that
value.

Then you can continue with Gdb, check with Gdb what code is at those PC
address etc.


	- Eero