From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21986 invoked by alias); 4 Feb 2010 07:05:04 -0000 Received: (qmail 21972 invoked by uid 22791); 4 Feb 2010 07:05:03 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Feb 2010 07:04:50 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id B54D167475 for ; Thu, 4 Feb 2010 07:04:48 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [patch] fix typo in sim_state documentation Date: Thu, 04 Feb 2010 07:05:00 -0000 User-Agent: KMail/1.12.4 (Linux/2.6.32.6; KDE/4.3.4; x86_64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201002040205.23317.vapier@gentoo.org> 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-02/txt/msg00103.txt.bz2 the sim-base.h suggests you declare cpu storage in sim_state, but the proposed code causes build failures in some files such as sim-core and sim-cpu.c (since STATE_CPU() is supposed to return an lvalue). it also doesnt make sense with the common sim_cpu_alloc_all() which dynamically allocates the memory for each cpu. 2010-02-04 Mike Frysinger * sim-base.h: Declare sim_state.cpu as a pointer in the comment. Drop & from the STATE_CPU() examples. RCS file: /cvs/src/src/sim/common/sim-base.h,v retrieving revision 1.11 diff -u -p -r1.11 sim-base.h --- sim/common/sim-base.h 1 Jan 2010 10:03:27 -0000 1.11 +++ sim/common/sim-base.h 4 Feb 2010 07:02:42 -0000 @@ -44,11 +44,11 @@ along with this program. If not, see cpu[n]) + #define STATE_CPU(sd,n) ((sd)->cpu[n]) #else - #define STATE_CPU(sd,n) (&(sd)->cpu[0]) + #define STATE_CPU(sd,n) ((sd)->cpu[0]) #endif ... simulator specific members ... sim_state_base base;