From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20266 invoked by alias); 20 Oct 2005 16:20:04 -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 20193 invoked by uid 22791); 20 Oct 2005 16:19:59 -0000 Received: from fra-del-03.spheriq.net (HELO fra-del-03.spheriq.net) (195.46.51.99) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 20 Oct 2005 16:19:59 +0000 Received: from fra-out-02.spheriq.net (fra-out-02.spheriq.net [195.46.51.130]) by fra-del-03.spheriq.net with ESMTP id j9KGJuQw023341 for ; Thu, 20 Oct 2005 16:19:56 GMT Received: from fra-cus-01.spheriq.net (fra-cus-01.spheriq.net [195.46.51.37]) by fra-out-02.spheriq.net with ESMTP id j9KGJs56012476 for ; Thu, 20 Oct 2005 16:19:55 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by fra-cus-01.spheriq.net with ESMTP id j9KGJqxu021031 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 20 Oct 2005 16:19:53 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 79CA6DA45; Thu, 20 Oct 2005 16:19:51 +0000 (GMT) Received: by zeta.dmz-eu.st.com (STMicroelectronics, from userid 60012) id E302F474E8; Thu, 20 Oct 2005 16:22:37 +0000 (GMT) Received: from zeta.dmz-eu.st.com (localhost [127.0.0.1]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8A5B475994; Thu, 20 Oct 2005 16:22:37 +0000 (UTC) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DD147474BC; Thu, 20 Oct 2005 16:22:35 +0000 (GMT) Received: from [164.129.15.13] (terrorhawk.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.5.8-GR) with ESMTP id CDM02522 (AUTH "andrew stubbs"); Thu, 20 Oct 2005 17:19:43 +0100 (BST) Message-ID: <4357C346.8070400@st.com> Date: Thu, 20 Oct 2005 16:20:00 -0000 From: Andrew STUBBS User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: Andrew Stubbs Cc: Eli Zaretskii , gdb-patches@sources.redhat.com Subject: Re: PATCH: Problem union comparision in TUI References: <4353BA69.1030401@st.com> <43561685.3010300@st.com> <20051019200751.GA19037@nevyn.them.org> <43576E68.8080804@st.com> In-Reply-To: <43576E68.8080804@st.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-O-Spoofed: Not Scanned X-O-General-Status: No X-O-Spam1-Status: Not Scanned X-O-Spam2-Status: Not Scanned X-O-URL-Status: Not Scanned X-O-Virus1-Status: No X-O-Virus2-Status: Not Scanned X-O-Virus3-Status: No X-O-Virus4-Status: No X-O-Virus5-Status: Not Scanned X-O-Image-Status: Not Scanned X-O-Attach-Status: Not Scanned X-SpheriQ-Ver: 2.3.0 X-SW-Source: 2005-10/txt/msg00168.txt.bz2 Andrew Stubbs wrote: > Eli Zaretskii wrote: >> Yes, I've read the code before I replied, so I know all that already. >> Having read the code, I'm not sure that addresses are used only for >> disassembly windows and line numbers only for source windows. We >> could have more bugs; that's why I think cleaning the code is >> important. > > > Indeed, it isn't as simple as addresses for assembly and lines for > sources. That's what the original problem was - i686-pc-linux-gnu native > uses one and sh-elf cross (also running on i686-pc-linux-gnu) uses the > other while both are supposedly running the same simple program . Apologies, please ignore this. I have just done some experiments to try to understand this better. It would appear that both are using line numbers for the source window. The difference is that, for reasons unknown, sh-elf has a 64 bit CORE_ADDR, but i686-pc-linux-gnu has a 32 bit CORE_ADDR. line_no remains 32 bit on both platforms. Hence I only see the problem on targets with mismatched types, and then only when random data manages to find its way into the unused half of the union. Therefore, an alternative fix for this problem would be to figure out which window we are in for the problem comparison. I an not sure whether that would be a better solution or not. Sorry for the confusion. Andrew Stubbs