From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87009 invoked by alias); 5 Sep 2017 09:43:22 -0000 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 Received: (qmail 87000 invoked by uid 89); 5 Sep 2017 09:43:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*r:sk:static., HContent-Transfer-Encoding:8bit X-HELO: mail-io0-f177.google.com Received: from mail-io0-f177.google.com (HELO mail-io0-f177.google.com) (209.85.223.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Sep 2017 09:43:17 +0000 Received: by mail-io0-f177.google.com with SMTP id j141so9255325ioj.4 for ; Tue, 05 Sep 2017 02:43:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=U2Go2VGpKwi53Ib2Nxu5xfvAFKdyKt7gKfOmNMfe8y8=; b=MHbg+MQ47EGHthY3y9YFhb5J/x9qVBxw/JTl4h6ZHSmzFSC96M957jaJ1yTh2j9seo ZaTl8gEmZBfaCpBL8XuHySZUYl7z6sy1DJ66p2zvt/MARarD2lzzWTFPTzuHFUvuK/UZ P93xQk/VgQgMOelO6SMOZGjPboe1d5uBduc3S5ruFhnnAMxXkTRMX6Jbr7qmgFQIGc2X jDP2ZxP9Wd0+JuDbgmSYnye9i/HavE9oltCpbVPCcGxbcMoHddMAgonJpQIolEJK8NyS 2EYPFtYvu2PEAGUSm0ePdAfz++gtTurCQWfsizZy/6d/Vfqk2TVq++BSYVylfn641CLg xPtw== X-Gm-Message-State: AHPjjUieAEkMGL7Eh44Ts6SX4RFXnZjJvc/z4iPeA/w2v4qYOdYWfnCZ WYsT57tvjGNY6g== X-Google-Smtp-Source: ADKCNb7QIl7JilEx9SDObIXthFcOZsKPknWuHA9X5VGJwUvKnNDqA2I+GZcn9ShR4HxGaRQKpkgAiQ== X-Received: by 10.36.173.82 with SMTP id a18mr3641286itj.165.1504604595562; Tue, 05 Sep 2017 02:43:15 -0700 (PDT) Received: from 1170ee0b50d5 (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id j193sm26980itb.26.2017.09.05.02.43.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Sep 2017 02:43:15 -0700 (PDT) Date: Tue, 05 Sep 2017 09:43:00 -0000 From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] eval.c:evaluate_subexp_standard: Factor out function call handling Message-ID: <20170905094312.GC8425@1170ee0b50d5> References: <1504563210-2521-1-git-send-email-palves@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1504563210-2521-1-git-send-email-palves@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00079.txt.bz2 On 17-09-04 23:13:30, Pedro Alves wrote: > While working on the no-debug-info debugging improvements, I found > evaluate_subexp_standard's function call code unnecessarily long and > hard to navigate and debug. The use of goto doesn't help either. It is good to shorten the long function. Patch looks good to me. > +/* Evaluate a function call. The function to be called is in > + argvec[0]. FUNCTION_NAME is the name of the function, if known. s/argvec/ARGVEC/ ? and better to document that argvec[1] - argvec[nargs] are arguments passed to the function. -- Yao (齐尧)