From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13765 invoked by alias); 11 Feb 2006 01:48:18 -0000 Received: (qmail 13590 invoked by uid 22791); 11 Feb 2006 01:48:13 -0000 X-Spam-Check-By: sourceware.org Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.201) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 11 Feb 2006 01:48:12 +0000 Received: by zproxy.gmail.com with SMTP id m7so695170nzf for ; Fri, 10 Feb 2006 17:48:10 -0800 (PST) Received: by 10.65.237.13 with SMTP id o13mr14665qbr; Fri, 10 Feb 2006 17:48:10 -0800 (PST) Received: by 10.64.76.5 with HTTP; Fri, 10 Feb 2006 17:48:10 -0800 (PST) Message-ID: Date: Sat, 11 Feb 2006 01:48:00 -0000 From: Mitchell Fang To: gdb@sourceware.org Subject: More GDB stub questions MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00096.txt.bz2 So I've implementing a GDB stub thats connect GDB to a PowerPC4xx board (target) via a JTAG controller. I've got some questions that I'm still not sure about and since I got great advice last time I figured I try again. So here is my environment, the host computer is a linux machine and my GDB stub resides on the host also. They connect by TCP/IP. 1) Do I need to configure GDB so that the host is linux and the target is PPC? I don't think so but wanted to be sure. 2) When GDB connects with the stub, one of the initial commands will be the 'g' read general register commands. Is this only the GPR registers then? Shouldn't it need to know the SPR registers, and other registers also? I'm not really sure what GDB is expecting.=20 When I type "info registers" afterward it just lists some stuff that I don't know what it is. (top-gdb) target remote :8888 Remote debugging using :8888 0x00000000 in ?? () (top-gdb) info register eax 0x0 0 ecx 0x0 0 edx 0x0 0 ebx 0x0 0 esp 0x0 0x0 ebp 0x0 0x0 esi 0x0 0 edi 0x0 0 eip 0x0 0x0 eflags 0xf9daf8 16374520 cs 0x0 0 ss 0x0 0 ds 0x0 0 es 0x0 0 fs 0x0 0 gs 0x0 0 3) For the program that I want to debug, I've been trying load it onto the Target by using the GDB load command. So when I type in gdb "load test", my stub just reads it as a write hex data to memory. I haven't implemented the 'X' write bin data to memory command. If that's all load does, how are you suppose to figure out where to set the PC? or is this just not the right way to load the program to be debugged onto the Target. Any input would be appreciated. Thanks, Mitchell