From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2501 invoked by alias); 1 Jul 2002 19:20:45 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 2479 invoked from network); 1 Jul 2002 19:20:40 -0000 Received: from unknown (HELO aaron.internal) (66.129.209.18) by sources.redhat.com with SMTP; 1 Jul 2002 19:20:40 -0000 Received: (from aaron@localhost) by aaron.internal (8.8.8/8.8.8) id MAA24744 for gdb-patches@sources.redhat.com; Mon, 1 Jul 2002 12:20:40 -0700 (PDT) Date: Mon, 01 Jul 2002 12:20:00 -0000 From: "Aaron J. Grier" To: gdb-patches@sources.redhat.com Subject: write_register_bytes() confusion Message-ID: <20020701122039.Q12218@aaron.internal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-SW-Source: 2002-07/txt/msg00009.txt.bz2 I'm in the middle of bringing BDM for m68k support into current gdb, and while I have fixed the most blatant calling convention changes (pid changing to pid_t, etc) write_register_bytes() in regcache has got me horribly confused. not to mention all this m68k craziness happening elsewhere. ;) in v1.61 of valops.c (which appears to be current) there is the snippet: write_register_bytes (VALUE_ADDRESS (toval) + VALUE_OFFSET (toval), VALUE_CONTENTS (fromval), TYPE_LENGTH (type)); I'm writing a register -- it seems in my case this should be: write_register_bytes (VALUE_REGNO (toval), VALUE_CONTENTS (fromval), 1); the 1 of course is machine dependent what I'm seeing is the register number getting completely thrashed on the way through. yet all calls to write_register_bytes are using VALUE_ADDRESS? insane. I'm starting to think I need to back off -current and just stick with gdb-5.0... -- Aaron J. Grier | Frye Electronics, Tigard, OR | aaron@frye.com