From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OiSjOmb/8l9uFwAAWB0awg (envelope-from ) for ; Mon, 04 Jan 2021 06:43:34 -0500 Received: by simark.ca (Postfix, from userid 112) id E27661F0AA; Mon, 4 Jan 2021 06:43:34 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 182BD1E99A for ; Mon, 4 Jan 2021 06:43:34 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7F1EB3857805; Mon, 4 Jan 2021 11:43:33 +0000 (GMT) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id 3EC4A3857805 for ; Mon, 4 Jan 2021 11:43:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3EC4A3857805 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wm1-x334.google.com with SMTP id c133so18173711wme.4 for ; Mon, 04 Jan 2021 03:43:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ILzpILRvWepvEno01a9aExkqSBpvB5I9/ZAeagGXKhQ=; b=AQdcsmuptmTv41fjt5yapxR+qr4CSIm10lTxxM3twBLF1Il08ca+NZ7z1TjH2k1giM d+Ew59s6u/Ljgqe9wgaE9GfTDPDL6Rjoo0NrBuwgDBuBXrkU9BXxJjDmb+YpZbC2nGDj qMMB6PHSshmevQBPt4JW5r/aRhV0UmFK42J9uZGOETaXXxLl8Tyo55NvTrHHyqM9zsd5 2K6HzwM7jxBgiOw6lItVQ0MBNTZzWodUyd0/AoZPLNMCV24el9W1QqGtQPGekz0nsFtc NJtzZybqMyabeFdIXwu3M0f8P1L74FVtOV8mmw/IUgDVostcOwzMYEfBm3YJXJR7UmgB MUBg== 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:in-reply-to; bh=ILzpILRvWepvEno01a9aExkqSBpvB5I9/ZAeagGXKhQ=; b=PQzIhLRj0iaUm+AzfO0Sa/5gLqfFHbSHQPTwMJy/O+674YvfQSnWfPtg1bDr61TI3I x58HKoPcBL1s/sdzChTpJCfb5uZYtJ1pdoRsSgHlcXSeeUVDD2FH+9F/1Oncb1nbbpr8 VRrSEc00QiQEOD1PBggt2LjtyLd9fFPn+QH3BNRFnWyeH2cvhjsi2BGn+ekxXLeagtvA 7Jgzxjk2smUOafjvlkFF5f7iInQtaPOMfEXd0NPNvzq58OH5PQZLhMNQKnFNmY9yDbqg bAWVBE3zlVcle94SRmGqVXJdBHBnkquEf7ld1Ihcg8hEThPWp3jiTk2DUlqyPMo3ilsN AzQg== X-Gm-Message-State: AOAM531xbYqAQ63EAFihO15pTZNtH7WAYTSJnjy/NzVADr0dPmGeHOhM 9zXjunMhnoF1tx/yYIqTOHIhA428EMf3NA== X-Google-Smtp-Source: ABdhPJx92ZR1fxzswpOJAMlD2EhSGSP7L2a6SoZ0Ki4MHcsrBt0kb/2N4k+uGQoKhn6OXxQkWO/0yQ== X-Received: by 2002:a7b:cc16:: with SMTP id f22mr25719696wmh.131.1609760608433; Mon, 04 Jan 2021 03:43:28 -0800 (PST) Received: from localhost (host86-188-49-102.range86-188.btcentralplus.com. [86.188.49.102]) by smtp.gmail.com with ESMTPSA id r13sm91122042wrs.6.2021.01.04.03.43.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jan 2021 03:43:27 -0800 (PST) Date: Mon, 4 Jan 2021 11:43:26 +0000 From: Andrew Burgess To: Tom Tromey Subject: Re: [PATCH 003/203] Split out eval_op_var_msym_value Message-ID: <20210104114326.GW2945@embecosm.com> References: <20210101214723.1784144-1-tom@tromey.com> <20210101214723.1784144-4-tom@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210101214723.1784144-4-tom@tromey.com> X-Operating-System: Linux/5.8.13-100.fc31.x86_64 (x86_64) X-Uptime: 11:41:27 up 26 days, 16:25, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" * Tom Tromey [2021-01-01 14:44:03 -0700]: > This splits OP_VAR_MSYM_VALUE into a new function for future use. > > gdb/ChangeLog > 2021-01-01 Tom Tromey > > * eval.c (eval_op_var_msym_value): New function. > (evaluate_subexp_standard): Use it. > --- > gdb/ChangeLog | 5 +++++ > gdb/eval.c | 26 +++++++++++++++++--------- > 2 files changed, 22 insertions(+), 9 deletions(-) > > diff --git a/gdb/eval.c b/gdb/eval.c > index 745333d31f9..e896baa3dec 100644 > --- a/gdb/eval.c > +++ b/gdb/eval.c > @@ -1215,6 +1215,20 @@ eval_op_var_entry_value (struct type *expect_type, struct expression *exp, > return SYMBOL_COMPUTED_OPS (sym)->read_variable_at_entry (sym, frame); > } > > +static struct value * > +eval_op_var_msym_value (struct type *expect_type, struct expression *exp, > + enum noside noside, > + minimal_symbol *msymbol, struct objfile *objfile) The first couple of patches included a header comment for these new helper functions. Starting from this patch these header comments are hit and miss. Maybe these should be added? I haven't commented on each patch where this is an issue, that didn't feel very helpful. Thanks, Andrew > +{ > + value *val = evaluate_var_msym_value (noside, objfile, msymbol); > + > + struct type *type = value_type (val); > + if (type->code () == TYPE_CODE_ERROR > + && (noside != EVAL_AVOID_SIDE_EFFECTS || pc != 0)) > + error_unknown_type (msymbol->print_name ()); > + return val; > +} > + > struct value * > evaluate_subexp_standard (struct type *expect_type, > struct expression *exp, int *pos, > @@ -1277,15 +1291,9 @@ evaluate_subexp_standard (struct type *expect_type, > (*pos) += 3; > > minimal_symbol *msymbol = exp->elts[pc + 2].msymbol; > - value *val = evaluate_var_msym_value (noside, > - exp->elts[pc + 1].objfile, > - msymbol); > - > - type = value_type (val); > - if (type->code () == TYPE_CODE_ERROR > - && (noside != EVAL_AVOID_SIDE_EFFECTS || pc != 0)) > - error_unknown_type (msymbol->print_name ()); > - return val; > + return eval_op_var_msym_value (expect_type, exp, noside, > + msymbol, > + exp->elts[pc + 1].objfile); > } > > case OP_VAR_ENTRY_VALUE: > -- > 2.26.2 >