From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11994 invoked by alias); 16 Jun 2004 00:04:41 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 11972 invoked from network); 16 Jun 2004 00:04:40 -0000 Received: from unknown (HELO intranet.tidalnetworks.net) (67.114.153.34) by sourceware.org with SMTP; 16 Jun 2004 00:04:40 -0000 Received: from xinanpc (dynamic-10 [172.16.128.10]) (authenticated bits=0) by intranet.tidalnetworks.net (8.12.8/8.12.8) with ESMTP id i5G04taQ025535; Tue, 15 Jun 2004 17:04:56 -0700 From: "Xinan Tang" To: "Jim Blandy" Cc: Subject: RE: "Info reg doesn't work" Date: Wed, 16 Jun 2004 00:04:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: X-SW-Source: 2004-06/txt/msg00167.txt.bz2 Hi Jim, Please help me to debug this: 1. Assume my target is FOO, let's say it is similar to ARM. 2. I created a FOO subdirectory in 'gdb/config/FOO' and then created a file: 'embedd.mt' underneath, its content is: TDEPFILES=FOO-tdep.o ... TDEPLIBS= ... TM_FILES= ... SIM_OBS=remote-sim.o SIM = ../sim/arm/libsim.a I.e, arm-tdep.o is changed to FOO-tdep.o 3. FOO-tdep.c is copied from arm-tdep.c in which I changed the function name _initialize_arm_tdep() to _initialize_FOO_tdep() Should I go into function _initialize_FOO_tdep() to modify the places where bfd_arch_arm is used? I haven't done that yet since our target is similar to arm. Thanks --Xinan -----Original Message----- From: jimb@zenia.home [mailto:jimb@zenia.home]On Behalf Of Jim Blandy Sent: Tuesday, June 15, 2004 2:41 PM To: Xinan Tang Cc: gdb@sources.redhat.com Subject: Re: "Info reg doesn't work" "Xinan Tang" writes: > I am porting gdb (6.1) to a new target. After adding a new target that is > similar to an existing RISC 32bit architecture, I found out two problems: > > 1. `info register' does not work. For example, if I type in `info reg', > the content of all registers are showing ZERO except PC no matter how many > instructions are executed. > > 2. Gdb can start execution from _start but can not enter main. > > Could someone please point to me which files I should take a look to fix > this problem? Or is there any FAQ to explain how to add a new target based > on an existing architecture. Well, you might try looking at gdb/doc/gdbint.texi, the GDB internals documentation. But it sounds to me like your target is having trouble supplying register values to GDB. How is GDB communicating with the debuggee? Via the remote protocol? Via ptrace? Something else?