From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15273 invoked by alias); 1 Mar 2018 15:49:35 -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 15262 invoked by uid 89); 1 Mar 2018 15:49:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Mar 2018 15:49:33 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w21FnQv0010947 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 1 Mar 2018 10:49:31 -0500 Received: by simark.ca (Postfix, from userid 112) id 7A68E1F429; Thu, 1 Mar 2018 10:49:26 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id BABE71E584; Thu, 1 Mar 2018 10:49:25 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 01 Mar 2018 15:49:00 -0000 From: Simon Marchi To: "Metzger, Markus T" Cc: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH] Propagate record_print_flags In-Reply-To: References: <1519912053-26118-1-git-send-email-simon.marchi@ericsson.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.4 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 1 Mar 2018 15:49:26 +0000 X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00026.txt.bz2 On 2018-03-01 09:30, Metzger, Markus T wrote: > Hello Simon, > >> These flags are returned as an int by get_call_history_modifiers, and >> get cast back to record_print_flags in the btrace code. Instead, we >> can >> make the arguments of that type from start to end. >> >> gdb/ChangeLog: >> >> * record.c (get_call_history_modifiers): Return a >> record_print_flags. >> (cmd_record_call_history): Adjust. >> * record-btrace.c (record_btrace_call_history): Adjust. >> (record_btrace_call_history_range): Adjust. >> (record_btrace_call_history_from): Adjust. >> * target-debug.h (target_debug_print_record_print_flags): New. >> * target-delegates.c: Re-generate. >> * target.c (target_call_history): Change flags type. >> (target_call_history_from): Likewise. >> (target_call_history_range): Likewise. >> * target.h (struct target_ops) : Likewise. >> (target_call_history_from): Likewise. >> (target_call_history_range): Likewise. > > Looks good to me. Thanks for checking. >> @@ -172,6 +172,8 @@ >> target_debug_do_print (host_address_to_string (X.data ())) >> #define target_debug_print_inferior_p(inf) \ >> target_debug_do_print (host_address_to_string (inf)) >> +#define target_debug_print_record_print_flags(X) \ >> + target_debug_do_print (plongest (X)) > > Should we print them as hex? It would be even better to print them as flags (VALUE_A | VALUE_B). I'll push this patch as-is and suggest something that will cover this and the other target_debug_print that deal with flags. Simon