From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22989 invoked by alias); 18 May 2005 19:53:03 -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 22969 invoked from network); 18 May 2005 19:52:59 -0000 Received: from unknown (HELO e34.co.us.ibm.com) (32.97.110.132) by sourceware.org with SMTP; 18 May 2005 19:52:59 -0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e34.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j4IJqwcu450272 for ; Wed, 18 May 2005 15:52:58 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j4IJqv1o231024 for ; Wed, 18 May 2005 13:52:58 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id j4IJqvvi024023 for ; Wed, 18 May 2005 13:52:57 -0600 Received: from austin.ibm.com (netmail2.austin.ibm.com [9.41.248.176]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j4IJqvWx023991; Wed, 18 May 2005 13:52:57 -0600 Received: from lazy.austin.ibm.com (lazy.austin.ibm.com [9.53.94.97]) by austin.ibm.com (8.12.10/8.12.10) with ESMTP id j4IJqqdr045308; Wed, 18 May 2005 14:52:52 -0500 Date: Wed, 18 May 2005 22:08:00 -0000 From: Manoj Iyer X-X-Sender: manjo@lazy To: Daniel Jacobowitz cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] gdb.server testcases (resend) In-Reply-To: <20050518160144.GA9283@nevyn.them.org> Message-ID: References: <20050518012521.GB8672@nevyn.them.org> <20050518130218.GA11918@nevyn.them.org> <20050518160144.GA9283@nevyn.them.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2005-05/txt/msg00457.txt.bz2 Looks like RHEL 4 ships wrong kernel headers, on RHEL4 /usr/include/linux/version.h: #define UTS_RELEASE "2.4.20", your patch works sorta on SLES (/usr/include/linux/version.h: #define UTS_RELEASE "2.6.5") running on a power5. On the host side ---------------- ./gdbserver 9.3.190.182:1234 /tmp/test Process /tmp/test created; pid = 8323 Stop pc is 0x40010470 Listening on port 1234 Remote debugging from host 9.3.190.187 readchar: Got EOF Remote side has terminated connection. GDBserver will reopen the connection. Listening on port 1234 On remote side -------------- ./gdb GNU gdb 6.3.50.20050516-cvs Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc64-unknown-linux-gnu". Setting up the environment for debugging gdb. No symbol table is loaded. Use the "file" command. No symbol table is loaded. Use the "file" command. .gdbinit:8: Error in sourced command file: No breakpoint number 0. (gdb) file /tmp/test Reading symbols from /tmp/test...done. Using host libthread_db library "/lib64/tls/libthread_db.so.1". (gdb) target remote 9.3.190.182:1234 Remote debugging using 9.3.190.182:1234 Remote register badly formatted: T0501:00000000ffffe6b0;40:0000000040010470; here: fffe6b0;40:0000000040010470; (gdb) ----- manjo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Cogito ergo sum + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ On Wed, 18 May 2005, Daniel Jacobowitz wrote: > On Wed, May 18, 2005 at 10:37:56AM -0500, Manoj Iyer wrote: > > > > Daniel, > > > > The patches did not apply cleanly to mainline, so I had to hand patch the > > files. Also, in the final link stage for gdbserver ld complained that: > > > > /usr/bin/ld: warning: powerpc:common64 architecture of input file > > `inferiors.o' is incompatible with powerpc:common output > > > > so I had to add a -m64 to the linker call. > > > > gdbserver still broken:. > > > > $ ./gdbserver uranus.ltc.austin.ibm.com /tmp/server > > Process /tmp/server created; pid = 4747 > > reading register 70: Input/output error > > Exiting > > My reading of the kernel source suggests that FPSCR should be accessible > using that address. You should figure out why it isn't. > > At a guess your headers are broken: > /* NOTE: cagney/2005-02-08: On some 64-bit GNU/Linux systems the > kernel headers incorrectly contained the 32-bit definition of > PT_FPSCR. For the 32-bit definition, floating-point > registers occupy two 32-bit "slots", and the FPSCR lives in > the secondhalf of such a slot-pair (hence +1). For 64-bit, > the FPSCR instead occupies the full 64-bit 2-word-slot and > hence no adjustment is necessary. Hack around this. */ > > -- > Daniel Jacobowitz > CodeSourcery, LLC >