From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7503 invoked by alias); 24 Jun 2004 19:47: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 7482 invoked from network); 24 Jun 2004 19:47:44 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.77.109) by sourceware.org with SMTP; 24 Jun 2004 19:47:44 -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 i5OJlgVL000986; Thu, 24 Jun 2004 21:47:42 +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 i5OJlgRi017242; Thu, 24 Jun 2004 21:47:42 +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 i5OJlgKr017239; Thu, 24 Jun 2004 21:47:42 +0200 (CEST) Date: Thu, 24 Jun 2004 19:47:00 -0000 Message-Id: <200406241947.i5OJlgKr017239@elgar.kettenis.dyndns.org> From: Mark Kettenis To: m.mueller99@kay-mueller.de CC: gdb-patches@sources.redhat.com In-reply-to: <40D6F901.3010008@kay-mueller.de> (message from Michael Mueller on Mon, 21 Jun 2004 17:04:33 +0200) Subject: Re: [RFC]: patch #2 for Sun C compiled target programs References: <40D32489.9070503@kay-mueller.de> <200406182159.i5ILxF9G001540@elgar.kettenis.dyndns.org> <40D6F901.3010008@kay-mueller.de> X-SW-Source: 2004-06/txt/msg00519.txt.bz2 Date: Mon, 21 Jun 2004 17:04:33 +0200 From: Michael Mueller > > The real problem is that dbxread.c was initially written as 32-bit > only code. The sign-extension problem you're seeing here can also be > interpreted as a 64-bit-dirty issue. So how can it be fixed? Not sure. As I said, it's not easy. As far as I understand things, INTERNALIZE_SYMBOL() should look at n_type to decide whether n_value should be treated as a signed or an unsigned value. The problem seems to be that n_value can either be interpreted as an address or as an offset. Addresses should be sign-extended based on what bfd_get_sign_extend_vma() tells us. Offsets should probably always be sign-extended. Mark