From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17799 invoked by alias); 1 May 2017 09:43:27 -0000 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 Received: (qmail 17784 invoked by uid 89); 1 May 2017 09:43:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=BAYES_00,KAM_COUK,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=Hx-languages-length:2094, Systems, remotely, HAccept-Language:en-GB X-HELO: exch-2010-smtp-out-02.livemail.co.uk Received: from exch-smtp-out.livemail.co.uk (HELO exch-2010-smtp-out-02.livemail.co.uk) (213.171.216.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 May 2017 09:43:24 +0000 Received: by exch-2010-smtp-out-02.livemail.co.uk (Postfix, from userid 500) id 148CBA0E821; Mon, 1 May 2017 10:43:24 +0100 (BST) Received: from WINHEXFEEU7.win.mail (unknown [217.160.154.182]) by exch-2010-smtp-out-02.livemail.co.uk (Postfix) with ESMTP id D2862A0E820 for ; Mon, 1 May 2017 10:43:23 +0100 (BST) Received: from WINHEXBEEU29.win.mail (10.76.18.45) by winhexbeeu25.win.mail (10.76.18.43) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Mon, 1 May 2017 11:43:23 +0200 Received: from WINHEXBEEU29.win.mail ([fe80::19ca:de71:a7fd:59db]) by winhexbeeu29.win.mail ([fe80::19ca:de71:a7fd:59db%15]) with mapi id 15.00.1178.000; Mon, 1 May 2017 11:43:23 +0200 From: Ed Liversidge To: "gdb@sourceware.org" Subject: Endian issues on T4240 Powerpc:e6500 Date: Mon, 01 May 2017 09:43:00 -0000 Message-ID: <3be0b78313f541d6866794c281327587@winhexbeeu29.win.mail> x-ms-exchange-transport-fromentityheader: Hosted x-1and1-spam-score: 0.1/10 x-1and1-spam-level: None x-1and1-expurgate-category: clean x-routing-0be3562e-11e2-4fc7-b5a6-c7ea0e0bf210: 1.0.0.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00000.txt.bz2 Hi, I am trying to get gdb 7.12.1 (build from source tried --target=3Dpowerpc64= -linux-gdb and --target=3Dpowerpc64-elf-gdb), to allow me to remotely debug= a T4240 PowerPC target. When I connect to a bdi3000 emulator, gdb reports the program counter to be= 32bit word swapped to the actual program counter, reported by the emulator: (gdb) target remote 192.168.1.70:2001 (gdb) show architecture The target architecture is assumed to be powerpc:e6500 (gdb) show endian The target endianness is set automatically (currently big endian) (gdb) i r pc pc 0x801080f8ffffffff 0x801080f8ffffffff (gdb) x $pc 0x801080f8ffffffff: Cannot access memory at address 0x801080f8fff= fffff T4240#0>info Target CPU : T4/B4 Thread#0 (e6500) Core state : halted Debug entry cause : single step Current PC : 0xffffffff_801080f8 Current CR : 0x00000000 Current MSR : 0x80000200 Current LR : 0xffffffff_8021bee4 Current CCSRBAR : 0xf_fe000000 As you can see, the BDI reports the PC as 0xffffffff801080f8, and gdb repor= ts it as 0x801080f8ffffffff. I thought perhaps this was a display issue, bu= t the read of the instruction at $pc is also incorrect. Is this a bug, or am I missing something? I have also tried the very latest git 8.0, with different results: (gdb) target remote 192.168.1.70:2001 Remote debugging using 192.168.1.70:2001 warning: No executable has been specified and target does not support determining executable automatically. Try using the "file" command. 0x7ff7bef0 in ?? () (gdb) i r $pc pc 0x7ff7bef0 0x7ff7bef0 (gdb) show architecture The target architecture is set automatically (currently rs6000:6000) (gdb) set architecture powerpc:common64 The target architecture is assumed to be powerpc:common64 Truncated register 51 in remote 'g' packet (gdb) show architecture The target architecture is assumed to be powerpc:common64 Truncated register 51 in remote 'g' packet (gdb) i r $pc Truncated register 51 in remote 'g' packet Can anyone help me to get this working? Thanks in advance for any help, Ed Liversidge Director, Harmonic Software Systems Ltd.