From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3760 invoked by alias); 16 Jun 2010 23:58:15 -0000 Received: (qmail 3747 invoked by uid 22791); 16 Jun 2010 23:58:15 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.35) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Jun 2010 23:58:11 +0000 Received: from hpaq14.eem.corp.google.com (hpaq14.eem.corp.google.com [172.25.149.14]) by smtp-out.google.com with ESMTP id o5GNw7MG008114 for ; Wed, 16 Jun 2010 16:58:07 -0700 Received: from pvg2 (pvg2.prod.google.com [10.241.210.130]) by hpaq14.eem.corp.google.com with ESMTP id o5GNw5SS001124 for ; Wed, 16 Jun 2010 16:58:06 -0700 Received: by pvg2 with SMTP id 2so1382430pvg.27 for ; Wed, 16 Jun 2010 16:58:05 -0700 (PDT) Received: by 10.142.56.15 with SMTP id e15mr6904254wfa.128.1276732685199; Wed, 16 Jun 2010 16:58:05 -0700 (PDT) Received: from coign.google.com ([67.218.110.162]) by mx.google.com with ESMTPS id g14sm7449136rvb.1.2010.06.16.16.58.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 16 Jun 2010 16:58:04 -0700 (PDT) To: Doug Evans Cc: Pedro Alves , Stan Shebs , gdb-patches@sourceware.org, Eli Zaretskii , tromey@redhat.com Subject: Re: [NEWS/RFA] Re: [gdbserver] x86 agent expression bytecode compiler (speed up conditional tracepoints) References: <201006071700.28706.pedro@codesourcery.com> <4C19222C.2000208@codesourcery.com> <201006162016.18181.pedro@codesourcery.com> From: Ian Lance Taylor Date: Wed, 16 Jun 2010 23:58:00 -0000 In-Reply-To: (Doug Evans's message of "Wed\, 16 Jun 2010 12\:20\:38 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true 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-06/txt/msg00379.txt.bz2 Doug Evans writes: > This worked with the gcc4.4.0 variant I was using. > > Ian: Is there a Right way to do this? I don't know about a right way, but since this code is both gcc and x86 specific, I think I would just write something along the lines of #define EMIT_ASM(NAME, INSNS) \ do \ { \ extern unsigned char start_ ## NAME, end_ ## NAME; \ add_insns (&start_ ## NAME, &end_ ## NAME - &start_ ## NAME); \ asm ("jmp end_" NAME "\; start_" NAME ":\;" INSNS "\; end_" NAME ":"); \ } while (0) Ian