From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17444 invoked by alias); 31 Mar 2010 17:56:02 -0000 Received: (qmail 17380 invoked by uid 22791); 31 Mar 2010 17:56:00 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 31 Mar 2010 17:55:56 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 1736413139; Wed, 31 Mar 2010 10:55:55 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost4.vmware.com (Postfix) with ESMTP id 0EB97C9A2D; Wed, 31 Mar 2010 10:55:55 -0700 (PDT) Message-ID: <4BB38CAA.6070901@vmware.com> Date: Wed, 31 Mar 2010 17:56:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20100311) MIME-Version: 1.0 To: Michael Snyder , Pedro Alves , "gdb@sourceware.org" Subject: Re: Random gdbserver question (x86) References: <4BB28BF2.8080100@vmware.com> <201003310219.49529.pedro@codesourcery.com> <4BB387E1.3070702@vmware.com> <20100331174749.GA16865@caradoc.them.org> In-Reply-To: <20100331174749.GA16865@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00227.txt.bz2 Daniel Jacobowitz wrote: > On Wed, Mar 31, 2010 at 10:35:29AM -0700, Michael Snyder wrote: >> Actually, I phrase it as a question even though I am pretty sure it >> is true. My real question is "Why?". It seems to me that if we just >> included amd64-linux-nat.o and amd64-*-tdep.o in the build, then >> 32-bit gdb should be able to debug 64-bit native apps. > > I don't think the necessary kernel interfaces exist. Or at least, we > aren't using them. Compare the offsets in the two nat files. > Hmmm, but both nat files get linked in when we do a 64 bit build. Suppose I wanted to build gdb on a 32 bit host, but use it on a 64 bit host. If I specify "target=x86_64-linux", then my gdb will not work natively on *either* host, because it will be built as a cross-only debugger.