[parisc-linux] PATCH: flush_icache_page() and flush_icache_range()

Richard Hirst rhirst@linuxcare.com
Wed, 29 May 2002 07:02:42 +0100


On Tue, May 28, 2002 at 08:48:30PM -0400, John David Anglin wrote:
> > Hi,
> >   gdb has a problem in that it often doesn't stop the target program
> > when you do a 'step' or 'next'.  This is because it plants breakpoints,
> > but those breakpoints sit in the data cache and don't get flushed
> > through to be visible as code in time.  We need a flush_icache_page()
> > implementation to fix this; the following adds that and
> > flush_icache_range() also.  It does fix gdb for me on my a500.
> 
> Good find! I'll give it a try.  Can you now print function results?

You mean like

Breakpoint 1, main (argc=1, argv=0xbff00148) at ../simple.c:16
16              a = thing(1);
(gdb) print thing(7)

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
The program being debugged stopped while in a function called from GDB.
When the function (thing) is done executing, GDB will silently
stop (instead of continuing to evaluate the expression containing
the function call).
(gdb) 


thing(x) just returns x*2 in this case.  As you see it didn't work, 
and gave a protection id trap for the target program.  I'll investigate
further.


Richard