From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11236 invoked by alias); 7 May 2009 00:54:02 -0000 Received: (qmail 11214 invoked by uid 22791); 7 May 2009 00:54:00 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 May 2009 00:53:52 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 4B0892BACBE; Wed, 6 May 2009 20:53:50 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id z-iMjQ+TBr+9; Wed, 6 May 2009 20:53:50 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 1909B2BACBB; Wed, 6 May 2009 20:53:50 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 16018F5900; Wed, 6 May 2009 17:53:48 -0700 (PDT) Date: Thu, 07 May 2009 00:54:00 -0000 From: Joel Brobecker To: uweigand@de.ibm.com, gdb-patches@sourceware.org Subject: [RFA] Add comment describing the target_gdbarch global Message-ID: <20090507005348.GA11074@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-05/txt/msg00142.txt.bz2 --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 530 Hello, I remember a few months ago when I stumbled across a piece of code using target_gdbarch, and I couldn't remember what this global was, and what the different was with gdbarch. I eventually found the original discussion again (http://sourceware.org/ml/gdb-patches/2008-08/msg00358.html) but I think a comment would be nice. I'm finally writing one today. Does this look accurate? 2009-05-06 Joel Brobecker * gdbarch.h (target_gdbarch): Add comment documenting this global. -- Joel --1yeeQ81UyVL57Vl7 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="comment.diff" Content-length: 851 diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 5e508d7..31c935f 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -54,6 +54,17 @@ struct displaced_step_closure; struct core_regset_section; extern struct gdbarch *current_gdbarch; + +/* The architecture associated with the connection to the target. + + The architecture vector provides some information that is really + a property of the target: The layout of certain packets, for instance; + or the solib_ops vector. Etc. To differentiate architecture accesses + to per-target properties to per-thread/pre-frame/per-objfile properties, + accesses to per-target properties should be made through target_gdbarch. + + Eventually, when support for multiple targets is implemented in + GDB, this global should be made target-specific. */ extern struct gdbarch *target_gdbarch; --1yeeQ81UyVL57Vl7--