This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Can gdb handle aliased memory regions ?
- From: Kevin Pouget <kevin dot pouget at gmail dot com>
- To: gdb at sources dot redhat dot com
- Cc: MikeW <mw_phil at yahoo dot co dot uk>, Marc Titinger <marc dot titinger at st dot com>
- Date: Thu, 13 Oct 2011 18:16:13 +0200
- Subject: Re: Can gdb handle aliased memory regions ?
- References: <loom.20111012T171912-692@post.gmane.org>
On Wed, Oct 12, 2011 at 5:35 PM, MikeW <mw_phil@yahoo.co.uk> wrote:
> Target platform: STLinux / ST Micro Connect
>
> On the target CPU, there is one region of physical memory that is accessible by
> two different mapped memory address regions: one as cached memory and one as
> uncached, eg.
> ?0x8000000 (virt cached) ? -> 0x40000000 (phys)
> ?0xDF00000 (virt uncached) -> 0x40000000 (phys)
>
> During the kernel init, there is a code sequence which switches between cached
> and uncached (to update cache registers etc) and expects the execution to
> proceed from eg. 0x80001234 to 0xDF001236.
>
> Stepping with gdb is fine until the switchover point is reached,
> whereupon gdb thinks it's lost control ('step[i]', 'next' or 'finish'
> do not return to the (gdb) prompt), but of course the ms bits of
> the PC just refer to the other region.
>
> I note gbd has support for the older technique of overlays; is there any way to
> tell gdb that the 0x8000... and 0xDF00... regions are actually the same physical
> memory ?
>
> Thanks.
stlinux kernel debugger maintainer cc'd