From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30425 invoked by alias); 27 Jun 2004 01:52:37 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 30209 invoked from network); 27 Jun 2004 01:52:36 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 27 Jun 2004 01:52:36 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i5R1qae3017957 for ; Sat, 26 Jun 2004 21:52:36 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i5R1qY024057; Sat, 26 Jun 2004 21:52:34 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 412702B9D; Sat, 26 Jun 2004 21:52:30 -0400 (EDT) Message-ID: <40DE285E.8070407@gnu.org> Date: Sun, 27 Jun 2004 01:52:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Michael Elizabeth Chastain Cc: gdb@sources.redhat.com, tausq@debian.org Subject: Re: native hppa2.0w-hp-hpux11.00, 32-bit versus 64-bit References: <20040626232848.1D36F4B104@berman.michael-chastain.com> In-Reply-To: <20040626232848.1D36F4B104@berman.michael-chastain.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-06/txt/msg00260.txt.bz2 > We've got this test script to print hp register values, > gdb/testsuite/gdb.hp/gdb.base-hp/reg.exp. I'm working on it because > the hp register code changed between 6.1 and HEAD. There's some > cosmetic differences in the results, which are easy for me to fix, > and there's some 32-bit/64-bit changes, which I need help with. What's the ABI wordsize - the size of a register pushed onto the stack? "info registers" should be using that register size and looking at the HP/PA code, that appears to be the case. It might also pay to check out `file gdb`, `file test-program`, "(gdb) show architecture" and "(gdb) maint print registers" to see what's been compbined. At least for other architectures only a 64-bit native compiler can debug 64-bit code, and 32x64 while possible, gets more interesting :-) Andrew > I'm testing with gdb 6.1.1 and with gdb HEAD 2004-06-01. > My gdb's are native hppa2.0w-hp-hpux11.00, and I built them with > gcc 3.3.2 using no special flags. > > Here is my actual output: > > # gdb 6.1.1 > # gdb built with gcc 3.3.2, no special flags > (gdb) info reg r19 > r19 deadbeefbadcadee > (gdb) print /x $r19 > $1 = 0xbadcadee^M > > # gdb HEAD 2004-06-01 > # gdb built with gcc 3.3.2, no special flags > (gdb) info reg r19 > r19 0xbadcadee 3135024622 > (gdb) print /x $r19 > $1 = 0xbadcadee^M > > The inferior program has used assembly language to build a 64-bit > value in $r19, and I'm using gdb to examine the value. > > In three of these four instances, there's 32-bit truncation going on. > I need to figure out how to mark these in the test suite. > > In my view, the only correct result is the full 64-bit result. > I want to make the test results be: > > # gdb 6.1.1 > PASS: gdb.base-hp/reg.exp: info reg r19 > KFAIL: gdb.base-hp/reg.exp: print /x $r19 (pr gdb/NNNN) > > # gdb HEAD 2004-06-01 > KFAIL: gdb.base-hp/reg.exp: info reg r19 (pr gdb/NNNN) > KFAIL: gdb.base-hp/reg.exp: print /x $r19 (pr gdb/NNNN) > > The alternative would be to consider 32-bit truncation to be okay > issue a PASS on all four results. > > Advice please? > > Michael C