From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20698 invoked by alias); 2 Nov 2010 18:46:22 -0000 Received: (qmail 20689 invoked by uid 22791); 2 Nov 2010 18:46:21 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Nov 2010 18:46:17 +0000 Received: (qmail 8874 invoked from network); 2 Nov 2010 18:46:15 -0000 Received: from unknown (HELO codesourcery.com) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 2 Nov 2010 18:46:15 -0000 Date: Tue, 02 Nov 2010 18:46:00 -0000 From: Nathan Froyd To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] fix debugging code compiled for newer PPC BookE processors Message-ID: <20101102184612.GD26083@nightcrawler> References: <1288380041-22165-1-git-send-email-froydnj@codesourcery.com> <20101102182326.GD2492@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20101102182326.GD2492@adacore.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-11/txt/msg00040.txt.bz2 On Tue, Nov 02, 2010 at 11:23:26AM -0700, Joel Brobecker wrote: > > + /* The type must be 2. */ > > + if (type != 2) > > + break; > > So, the type must always be 2 and I am to understand that if type is not > 2, then the data is screwed, hence the early exit? What's the purpose of > that field, if it is always the same value? I don't know exactly what the purpose is. The E500 ABI User's Guide says simply: For the .PPC.EMB.apuinfo section, the name shall be “APUinfo\0”, the type shall be 2 (as type 1 is already reserved for ELF_NOTE_ABI), and the data shall contain a series of words containing APU information, one per word. The APU information contains two unsigned halfwords: the upper half contains the unique APU identifier, and the lower half contains the revision of that APU. So, there's the rationale. -Nathan