AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20090710113226.10827c5b@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:mail.onstor.net
NSV:
SSH:
R:<rendell.fong@onstor.com>,<Bill.Fisher@onstor.com>,<brian.stark@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@exch1.onstor.net/INBOX	0	2779531E7C760D4491C96305019FEEB52AD1B84EEA@exch1.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Fri, 10 Jul 2009 11:32:52 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: Rendell Fong <rendell.fong@onstor.com>
Cc: Bill Fisher <Bill.Fisher@onstor.com>, Brian Stark
 <brian.stark@onstor.com>
Subject: Re: kgdb is now working
Message-ID: <20090710113252.32d39113@ripper.onstor.net>
In-Reply-To: <2779531E7C760D4491C96305019FEEB52AD1B84EEA@exch1.onstor.net>
References: <2779531E7C760D4491C96305019FEEB52AD1B84EEA@exch1.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Very good work, Rendell.  Thanks!

a

On Fri, 10 Jul 2009 11:22:40 -0700 Rendell Fong
<rendell.fong@onstor.com> wrote:

> Guys,
> 
> I managed to resolve the single stepping issue.  So I think kgdb is
> finally working via rcon.  (breakpoints, single stepping, listing
> source code, etc.) You will need to pull in my changes from git tree
> (arch/mips/kernel/gdb-stub.c, drivers/mgmt-bus/rcon.c, and maybe some
> other files). The kernel must be built with the debug option -gstabs
> instead of -g.  This option is the only one that I could get working
> with our kernel and gdb.
> 
> You will also need to use my version of gdb
> (/homes/rendellf/utils/gdb-tux) since I had to make a small patch to
> it. It is based on the latest version of gdb (6.8) with a change to
> the computation of function line number to address offsets required
> for single stepping. Apparently there is an incompatibility(?)
> between the version of gcc and gdb that we are currently using.
> 
> Happy Debugging,
> Rendell
> 
> ------------------------------------------------
> 
> Setup .gdbinit file with the following settings or run these commands
> manually: set architecture mips:sb1
>   set remoteaddresssize 64
>   target remote SSC_IP_ADDRESS:61230
> 
> 
> linux-compile.onstor.net $ gdb-tux vmlinux
> GNU gdb 6.8
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html> This is free software: you are
> free to change and redistribute it. There is NO WARRANTY, to the
> extent permitted by law.  Type "show copying" and "show warranty" for
> details. This GDB was configured as "--host=i686-pc-linux-gnu
> --target=mipsel-unknown-linux-gnu"... The target architecture is
> assumed to be mips:sb1 0xffffffff83004384 in cpu_idle () at
> include/linux/sched.h:1585 1585            return
> unlikely(test_thread_flag(TIF_NEED_RESCHED)); (gdb) bt
> #0  0xffffffff83004384 in cpu_idle () at include/linux/sched.h:1585
> #1  0xffffffff83336e14 in start_kernel ()
> Backtrace stopped: frame did not save the PC
> (gdb)
> 
> 
