From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12649 invoked by alias); 15 Jul 2004 16:02:00 -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 12628 invoked from network); 15 Jul 2004 16:01:58 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.77.109) by sourceware.org with SMTP; 15 Jul 2004 16:01:58 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i6FG1j7s008645; Thu, 15 Jul 2004 18:01:45 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i6FG1jnl008935; Thu, 15 Jul 2004 18:01:45 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id i6FG1dcZ008932; Thu, 15 Jul 2004 18:01:39 +0200 (CEST) Date: Thu, 15 Jul 2004 17:32:00 -0000 Message-Id: <200407151601.i6FG1dcZ008932@elgar.kettenis.dyndns.org> From: Mark Kettenis To: cagney@gnu.org CC: hunt@redhat.com, gdb@sources.redhat.com In-reply-to: <40F58971.7000304@gnu.org> (message from Andrew Cagney on Wed, 14 Jul 2004 15:28:49 -0400) Subject: Re: dwarf2-frame.c question for maintainers References: <1089749730.3026.18.camel@dragon> <40F56CCA.5080106@gnu.org> <1089827266.3010.2.camel@dragon> <40F58971.7000304@gnu.org> X-SW-Source: 2004-07/txt/msg00171.txt.bz2 Date: Wed, 14 Jul 2004 15:28:49 -0400 From: Andrew Cagney >>> How come extract_typed_address, in read_reg, doesn't sign extend? > > > I should have explained that. It does. However extract_typed_address is > incorrect because it makes the invalid assumption that sizeof(address) > == sizeof(register). So that has to go and be replaced with something > like > extract_signed_integer (buf, register_size (current_gdbarch, regnum)); Martin, not all the world's a MIPS. Sign-extension is wrong here for most targets. You mean the builtin_type_void_data_ptr parameter to extract_typed_address? Ah. I see builtin_type_void_data_ptr dates back to 1.1 (Mark?). It could instead use the register's type? Nope. extract_typed_address only accepts a pointer type, and there's no guarantee that the register's type is a pointer type. Mark