From: Luis Machado <lgustavo@codesourcery.com>
To: Simon Marchi <simon.marchi@polymtl.ca>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Introduce and use disassembly_flags
Date: Mon, 13 Feb 2017 20:03:00 -0000 [thread overview]
Message-ID: <e6bf8ab2-df83-5db2-4f8b-6a07ed09655a@codesourcery.com> (raw)
In-Reply-To: <20170211031207.4682-1-simon.marchi@polymtl.ca>
On 02/10/2017 09:12 PM, Simon Marchi wrote:
> diff --git a/gdb/disasm.h b/gdb/disasm.h
> index 42c1f3af6d..bb7a7a0d5c 100644
> --- a/gdb/disasm.h
> +++ b/gdb/disasm.h
> @@ -21,13 +21,17 @@
>
> #include "dis-asm.h"
>
> -#define DISASSEMBLY_SOURCE_DEPRECATED (0x1 << 0)
> -#define DISASSEMBLY_RAW_INSN (0x1 << 1)
> -#define DISASSEMBLY_OMIT_FNAME (0x1 << 2)
> -#define DISASSEMBLY_FILENAME (0x1 << 3)
> -#define DISASSEMBLY_OMIT_PC (0x1 << 4)
> -#define DISASSEMBLY_SOURCE (0x1 << 5)
> -#define DISASSEMBLY_SPECULATIVE (0x1 << 6)
> +enum disassembly_flag {
> + DISASSEMBLY_SOURCE_DEPRECATED = (1 << 0),
> + DISASSEMBLY_RAW_INSN = (1 << 1),
> + DISASSEMBLY_OMIT_FNAME = (1 << 2),
> + DISASSEMBLY_FILENAME = (1 << 3),
> + DISASSEMBLY_OMIT_PC = (1 << 4),
> + DISASSEMBLY_SOURCE = (1 << 5),
> + DISASSEMBLY_SPECULATIVE = (1 << 6),
> +};
Since we're touching this already, wouldn't it be slightly better to
have all of the above in lowercase instead of uppercase? They look like
#defined-ed constants otherwise.
Also, should we consider converting DISASSEMBLY_SOURCE_DEPRECATED or
should we let it go? It was introduced in 2015.
Otherwise looks good to me.
next prev parent reply other threads:[~2017-02-13 20:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-11 3:12 Simon Marchi
2017-02-12 22:35 ` Yao Qi
2017-02-18 19:20 ` Simon Marchi
2017-02-18 19:30 ` Yao Qi
2017-02-13 20:03 ` Luis Machado [this message]
2017-02-18 19:23 ` Simon Marchi
2017-02-20 20:23 ` Luis Machado
2017-02-20 20:37 ` Simon Marchi
2017-02-20 20:40 ` Luis Machado
2017-02-15 11:15 ` Pedro Alves
2017-02-18 19:27 ` Simon Marchi
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=e6bf8ab2-df83-5db2-4f8b-6a07ed09655a@codesourcery.com \
--to=lgustavo@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).