From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3495 invoked by alias); 13 Jun 2012 17:02:08 -0000 Received: (qmail 3468 invoked by uid 22791); 13 Jun 2012 17:02:04 -0000 X-SWARE-Spam-Status: No, hits=-5.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_YY,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Jun 2012 17:01:51 +0000 Received: by vbkv13 with SMTP id v13so680130vbk.0 for ; Wed, 13 Jun 2012 10:01:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=1tfZMXwz/kDxR4B8msHTu0rN0cvdXL3ZW8vfugKTv4E=; b=nwTjY17+7FjWwuMEmdmqh+/LEQGn63HBMa6YKIPXIdj/dwiHxzP+AjO73hEOiEyv+s 7Wb5eqao99wL3tQPL5YLpxA+lJzOJBPEFwfRgLldmxaroJuaJhmmu0I5099DFzQvcm1t uGYe7uAPO38/+N1LvYsrJj0ronJxOPBrNCH5q3yDWrH/5afXNLdyddz8g87yKjS10wFj r0SkK8Tnh1J06JsM0IePVTlmlBnafOltxf0F/kAUSB2g5AcmsT213PJLrVUPIKf8VwnW NgskGY+pOQzJXOEZ+UqBw57DUt922JPln40rBS1UVmkXEhwmBM/2+wVbLhCPi32fnKkk MZ2g== Received: by 10.220.214.8 with SMTP id gy8mr1313140vcb.45.1339606909831; Wed, 13 Jun 2012 10:01:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.214.8 with SMTP id gy8mr1313133vcb.45.1339606909645; Wed, 13 Jun 2012 10:01:49 -0700 (PDT) Received: by 10.52.161.199 with HTTP; Wed, 13 Jun 2012 10:01:49 -0700 (PDT) In-Reply-To: References: <1338665528-5932-1-git-send-email-sergiodj@redhat.com> <1338665528-5932-11-git-send-email-sergiodj@redhat.com> Date: Wed, 13 Jun 2012 17:02:00 -0000 Message-ID: Subject: Re: [PATCH 10/10] Go programming language From: Doug Evans To: Sergio Durigan Junior Cc: GDB Patches , Tom Tromey Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQmqSW50JCOk8InS2a/Yfuhq9xmsg8svIi20iYe+wKWVdt49Vrx1TfP+iHiD7JzQGD9OSNuULiTANtwdHZJGHMmVK2xzllkmd3duJJ/zXwjswFAdznuVHWYXDtfPAi7HrKUAOuNQbOvyV1n73zmPqGssPViCJw== 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: 2012-06/txt/msg00424.txt.bz2 On Tue, Jun 12, 2012 at 9:57 PM, Sergio Durigan Junior wrote: > On Saturday, June 02 2012, I wrote: > >> Patch for the Go programming language. =A0Similar to the C language one. > > Ping. > > Doug, since you have put this code in, would you like to take a look > just to be safe? Righto. There's some indentation issues with parameters. If it's because they would otherwise exceed 80 cols, I'm not sure what the convention is. @@ -317,9 +322,10 @@ exp : exp '(' being accumulated by an outer function call. */ { start_arglist (); } arglist ')' %prec LEFT_ARROW - { write_exp_elt_opcode (OP_FUNCALL); - write_exp_elt_longcst ((LONGEST) end_arglist ()); - write_exp_elt_opcode (OP_FUNCALL); } + { write_exp_elt_opcode (pstate, OP_FUNCALL); + write_exp_elt_longcst (pstate, + (LONGEST) end_arglist ()); + write_exp_elt_opcode (pstate, OP_FUNCALL); } ; lcurly : '{' There's also the thought of making sure pstate is reset to NULL. @@ -1587,14 +1603,20 @@ yylex (void) popping =3D 1; yylval =3D current.value; - return classify_name (expression_context_block); + return classify_name (pstate, expression_context_block); } int -go_parse (void) +go_parse (struct parser_state *par_state) { int result; - struct cleanup *back_to =3D make_cleanup (null_cleanup, NULL); + struct cleanup *back_to; + + /* Setting up the parser state. */ + gdb_assert (par_state !=3D NULL); + pstate =3D par_state; + + back_to =3D make_cleanup (null_cleanup, NULL); make_cleanup_restore_integer (&yydebug); yydebug =3D parser_debug; Other than that LGTM.