lkml.org 
[lkml]   [2004]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: PPC KGDB changes and some help?
On Thu, Jan 22, 2004 at 10:44:16AM -0700, Tom Rini wrote:
> On Wed, Jan 21, 2004 at 12:22:30PM -0700, Tom Rini wrote:
> > On Wed, Jan 21, 2004 at 12:21:28PM -0700, Tom Rini wrote:
> > > On Wed, Jan 21, 2004 at 11:42:17AM -0700, Tom Rini wrote:
> > > > On Wed, Jan 21, 2004 at 10:23:12PM +0530, Amit S. Kale wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Here it is: ppc kgdb from timesys kernel is available at
> > > > > http://kgdb.sourceforge.net/kgdb-2/linux-2.6.1-kgdb-2.1.0.tar.bz2
> > > > >
> > > > > This is my attempt at extracting kgdb from TimeSys kernel. It works well in
> > > > > TimeSys kernel, so blame me if above patch doesn't work.
> > > >
> > > > Okay, here's my first patch against this.
> > >
> > > And dependant upon this is a patch to fixup the rest of the common PPC
> > > code, as follows:
> >
> > And on top of all of that is the following, which allows KGDB to work on
> > the Motorola LoPEC.
>
> On top of everything from yesterday, here's:

First up:
We need to call flush_instruction_cache() on a 'c' or 's' command.
arch/ppc/kernel/ppc-stub.c | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
--- 1.14/arch/ppc/kernel/ppc-stub.c Thu Jan 22 10:41:58 2004
+++ edited/arch/ppc/kernel/ppc-stub.c Thu Jan 22 10:49:30 2004
@@ -144,18 +144,6 @@
return;
} /* gdb_regs_to_regs */

-/* exit_handler:
- *
- * This is called by the generic layer when it is about to return from
- * the exception handler
- */
-void
-ppc_handler_exit(void)
-{
-// flush_instruction_cache ();
- return;
-}
-
/*
* This function does PoerPC specific procesing for interfacing to gdb.
*/
@@ -188,6 +176,12 @@
if (kgdb_hexToLong(&ptr, &addr))
linux_regs->nip = addr;

+/* Need to flush the instruction cache here, as we may have deposited a
+ * breakpoint, and the icache probably has no way of knowing that a data ref to
+ * some location may have changed something that is in the instruction cache.
+ */
+ flush_instruction_cache();
+
/* set the trace bit if we're stepping */
if (remcomInBuffer[0] == 's') {
#if defined (CONFIG_4xx)
@@ -254,5 +248,4 @@
.sleeping_thread_to_gdb_regs = ppc_sleeping_thread_to_gdb_regs,
.gdb_regs_to_regs = ppc_gdb_regs_to_regs,
.handle_exception = ppc_handle_exception,
- .handler_exit = ppc_handler_exit,
};
--
Tom Rini
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site