From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28246 invoked by alias); 20 Feb 2003 18:28:12 -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 28199 invoked from network); 20 Feb 2003 18:28:11 -0000 Received: from unknown (HELO harvester.transas.com) (193.125.200.2) by 172.16.49.205 with SMTP; 20 Feb 2003 18:28:11 -0000 Received: from localhost (localhost [127.0.0.1]) by harvester.transas.com (Postfix) with SMTP id DA9DE6B81C; Thu, 20 Feb 2003 21:28:06 +0300 (MSK) Received: from localhost (localhost [127.0.0.1]) by harvester.transas.com (Postfix) with SMTP id 687F76B81E; Thu, 20 Feb 2003 21:28:00 +0300 (MSK) Received: from clue.transas.com (clue.transas.com [10.0.0.42]) by harvester.transas.com (Postfix) with ESMTP id F045D6B81D; Thu, 20 Feb 2003 21:27:59 +0300 (MSK) Received: by clue.transas.com with Internet Mail Service (5.5.2653.19) id <1AQW8F08>; Thu, 20 Feb 2003 21:27:59 +0300 Message-ID: <2E74F312D6980D459F3A05492BA40F8D01F65962@clue.transas.com> From: Andrew Volkov To: "D.Venkatasubramanian, Noida" , Kazu Hirata , Petr Ledvina Cc: gnuh8@gnuh8.org.uk, gdb@sources.redhat.com Subject: RE: Adding MAC registers on H8300 Simulator [H8S/2600] Date: Thu, 20 Feb 2003 18:28:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" X-SW-Source: 2003-02/txt/msg00425.txt.bz2 Hi, all Peoples, at first, please look in file include/gdb/sim-h8300.h, This file (more then half year ago old) ALREADY contain MACH and MACL numbers. And also contain some useful constants too, i.e. SIM_H8300_NUM_COMMON_REGS, SIM_H8300_S_NUM_REGS, SIM_H8300_NUM_REGS. > > As the H8S/2600 CPU has MAC registers, specifically > > MACH and MACL, I added them to the H8300 Simulator. How > > do I make GDB recognize these registers, more > > specifically, what are the files that need to be > > modified? sim/h8300/compile.c (IMHO, better rewrite it from scratch ;) and gdb/h8300-tdep.c Also look at multiarch patch from 2002-08-06 in gdb-patches archive (It was not accepted and replaced by Corina's multiarch patch). Also, if you have much time, very best way is write model for cgen. > in target definition, NUM_REGS specifies how many registers gdb uses. > REGISTER_NAME return name of given register. > This vector already contains special registers (cycles, inst, > .. ), so it > should be possible to add new registers. > gdbstub needs to only know register index mapping, so adding > new registers > to end of this list should be compatible. > > Also check cvs log, someone (Andrew Volkov?) added exr > register recently > to simulator, so he could know better. > > > Also, how do I make these registers conditionally > > displayed on GDB when the CPU is H8S/2600. > IIRC gdb knows only h8s target, so this could be quite difficult. Kazu, this question to you, remember our chat about new BFD target for h8s/2600? I dont't add real MAC support to simulator, 'cause bumped same problem, only one solution I found - command to enable/disable MAC directly :(. Andrey Volkov