Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>
Cc: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Propagate record_print_flags
Date: Thu, 01 Mar 2018 15:49:00 -0000	[thread overview]
Message-ID: <e2bf4368d05f39059d6be3a8e19967c2@polymtl.ca> (raw)
In-Reply-To: <A78C989F6D9628469189715575E55B236964E835@IRSMSX104.ger.corp.intel.com>

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) <target_call_history>: 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


      reply	other threads:[~2018-03-01 15:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 13:48 Simon Marchi
2018-03-01 14:30 ` Metzger, Markus T
2018-03-01 15:49   ` Simon Marchi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2bf4368d05f39059d6be3a8e19967c2@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@intel.com \
    --cc=simon.marchi@ericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox