From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27763 invoked by alias); 14 Jun 2003 22:29: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 27701 invoked from network); 14 Jun 2003 22:29:10 -0000 Received: from unknown (HELO planck.amplepower.com) (216.39.162.139) by sources.redhat.com with SMTP; 14 Jun 2003 22:29:10 -0000 Received: from [192.168.8.29] (helo=bozoland.mynet) by planck.amplepower.com with esmtp (Exim 3.36 #1 (Debian)) id 19RJLI-0007iI-00 for ; Sat, 14 Jun 2003 15:17:49 -0700 Date: Sat, 14 Jun 2003 22:29:00 -0000 From: "Theodore A. Roth" X-X-Sender: troth@bozoland.mynet To: gdb@sources.redhat.com Subject: register_type method Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2003-06/txt/msg00288.txt.bz2 Hi, What builtin type should the *_register_type method return for the PC? I would think that it it should be builtin_type_void_func_ptr like the d10v does, but when I use that for the avr, I only get 2 bytes for the PC register size and I need 4 bytes. Using builtin_type_uint32 works but just doesn't feel right. I also tried using builtin_type_CORE_ADDR and that seemed to work as well as builtin_type_uint32. Here's my avr_register_type method I'm currently playing with: static struct type * avr_register_type (struct gdbarch *gdbarch, int reg_nr) { if (reg_nr == AVR_PC_REGNUM) /* return builtin_type_void_func_ptr; */ /* return builtin_type_uint32; */ return builtin_type_CORE_ADDR; if (reg_nr == AVR_SP_REGNUM) return builtin_type_void_data_ptr; else return builtin_type_uint8; } Ted Roth