From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13149 invoked by alias); 31 Mar 2010 17:46:45 -0000 Received: (qmail 13141 invoked by uid 22791); 31 Mar 2010 17:46:45 -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-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 31 Mar 2010 17:46:39 +0000 Received: from jupiter.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 8A4762E04A; Wed, 31 Mar 2010 10:46:38 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by jupiter.vmware.com (Postfix) with ESMTP id 7DA60DC27E; Wed, 31 Mar 2010 10:46:38 -0700 (PDT) Message-ID: <4BB38A7D.9070108@vmware.com> Date: Wed, 31 Mar 2010 17:46:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20100311) MIME-Version: 1.0 To: Pedro Alves CC: "gdb@sourceware.org" Subject: Re: Random gdbserver question (x86) References: <4BB28BF2.8080100@vmware.com> <201003310219.49529.pedro@codesourcery.com> <4BB387E1.3070702@vmware.com> <201003311843.47068.pedro@codesourcery.com> In-Reply-To: <201003311843.47068.pedro@codesourcery.com> 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/msg00225.txt.bz2 Pedro Alves wrote: > On Wednesday 31 March 2010 18:35:29, Michael Snyder wrote: >> And is that more-or-less true of gdb as well? I.e., if host/target >> is x86_64-linux, then gdb can debug both 32 and 64 bit apps, but if >> host/target is i386-linux, then gdb can only debug 32 bit apps? > > Native gdb yes. A 32-bit GDB should still be able to debug a > remote/gdbserver 64-bit inferior. > >> 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. > > Wouldn't work. The limitation is on ptrace. Can it be explained relatively simply? ;-)