From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25429 invoked by alias); 12 Nov 2016 00:29:33 -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 25393 invoked by uid 89); 12 Nov 2016 00:29:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1890 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 12 Nov 2016 00:29:30 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1c5MCG-0002im-NG from Luis_Gustavo@mentor.com ; Fri, 11 Nov 2016 16:29:28 -0800 Received: from [172.30.2.146] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 11 Nov 2016 16:29:25 -0800 Subject: Re: [PATCH 2/2] gdb: Simplify variable set hooks References: <1478888325-32039-1-git-send-email-andrew.burgess@embecosm.com> <1478888325-32039-3-git-send-email-andrew.burgess@embecosm.com> To: Andrew Burgess , From: Luis Machado Reply-To: Luis Machado Message-ID: Date: Sat, 12 Nov 2016 00:29:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1478888325-32039-3-git-send-email-andrew.burgess@embecosm.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00303.txt.bz2 On 11/11/2016 12:18 PM, Andrew Burgess wrote: > Now the the variable set-hook mechanism supports automatic rollback of > the variable value if the set-hook throws an error, simplify existing > cases where we manually performed roll-back within the set-hook. > > gdb/ChangeLog: > > * dcache.c (set_dcache_size): Don't change value on error path. > (set_dcache_line_size): Likewise. > * record.c (record_insn_history_size_setshow_var): Remove. > (record_call_history_size_setshow_var): Remove. > (validate_history_size): Simplify to just the error check. > (set_record_insn_history_size): Update call to > validate_history_size. > (set_record_call_history_size): Likewise. > (_initialize_record): Remove use of *_setshow_var. > * symtab.c (new_symbol_cache_size): Remove. > (symbol_cache_size): Update comment. > (set_symbol_cache_size_handler): Simplify error check. > (_initialize_symtab): Remove use of new_symbol_cache_size. > * valprint.c (input_radix_1): Remove. > (set_input_radix): Remove use of input_radix_1. > (set_input_radix_1): Likewise. > (output_radix_1): Remove. > (set_output_radix): Remove use of output_radix_1. > (set_output_radix_1): Likewise. > (_initialize_valprint): Remove use of output_radix_1 and > input_radix_1. > * value.c (set_max_value_size): Simplify error case. > > gdb/testsuite/ChangeLog: > > * gdb.base/max-value-size.exp: Update expected output. > --- > gdb/ChangeLog | 25 +++++++++++++++++++ > gdb/dcache.c | 12 +++------ > gdb/record.c | 41 ++++++------------------------- > gdb/symtab.c | 23 ++++------------- > gdb/testsuite/ChangeLog | 4 +++ > gdb/testsuite/gdb.base/max-value-size.exp | 4 +-- > gdb/valprint.c | 31 ++++++----------------- > gdb/value.c | 6 +---- > 8 files changed, 56 insertions(+), 90 deletions(-) I have no comments on this patch. Looks like a nice cleanup of convoluted code.