From: Simon Marchi <simon.marchi@polymtl.ca>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/4] Change return type of gdbarch_software_single_step to vector<CORE_ADDR>
Date: Wed, 19 Apr 2017 04:08:00 -0000 [thread overview]
Message-ID: <25ba594108d0c3c48aa9aa8c876d6ea4@polymtl.ca> (raw)
In-Reply-To: <8ccc3ab3-91e8-7121-7494-cce45d31f8b2@redhat.com>
On 2017-04-18 16:17, Pedro Alves wrote:
> On 04/16/2017 03:14 PM, Simon Marchi wrote:
>> This is a relatively straightforward patch that changes
>> gdbarch_software_single_step so it returns an std::vector<CORE_ADDR>
>> instead of a VEC (CORE_ADDR).
>
> LGTM.
>
> BTW, FYI, in general, {} initialization of vectors may not
> always be a good idea. See e.g.:
>
>
> https://akrzemi1.wordpress.com/2016/07/07/the-cost-of-stdinitializer_list/
>
> C++17 will make it better (though not fully ideal).
>
> But in this case CORE_ADDR is a scalar and it doesn't really
> matter.
Ouch, that's good to know.
From what I understand, using {} to return an empty vector has no extra
cost though, so we can use that without any problem.
Simon
next prev parent reply other threads:[~2017-04-19 4:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-16 14:14 [PATCH 0/4] Remove VEC (CORE_ADDR) Simon Marchi
2017-04-16 14:14 ` [PATCH 1/4] Change field separator in gdbarch.sh Simon Marchi
2017-04-18 20:17 ` Pedro Alves
2017-04-18 20:20 ` Pedro Alves
2017-04-19 4:03 ` Simon Marchi
2017-04-19 10:31 ` Pedro Alves
2017-04-16 14:14 ` [PATCH 3/4] Use std::vector in solib-target lm_info Simon Marchi
2017-04-18 20:18 ` Pedro Alves
2017-04-19 4:18 ` Simon Marchi
2017-04-19 4:30 ` [PATCH v2] " Simon Marchi
2017-04-30 0:35 ` [PATCH v3] Use std::vector in lm_info_target Simon Marchi
2017-04-30 0:42 ` Simon Marchi
2017-05-02 16:06 ` Pedro Alves
2017-05-02 16:12 ` Pedro Alves
2017-05-02 17:25 ` Simon Marchi
2017-05-02 17:37 ` Pedro Alves
2017-05-02 17:50 ` Simon Marchi
2017-04-16 14:14 ` [PATCH 4/4] Remove definition of VEC (CORE_ADDR) Simon Marchi
2017-04-18 20:18 ` Pedro Alves
2017-04-16 14:15 ` [PATCH 2/4] Change return type of gdbarch_software_single_step to vector<CORE_ADDR> Simon Marchi
2017-04-18 20:17 ` Pedro Alves
2017-04-19 4:08 ` Simon Marchi [this message]
2017-04-19 10:32 ` Pedro Alves
2017-05-02 17:35 ` [PATCH 0/4] Remove VEC (CORE_ADDR) 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=25ba594108d0c3c48aa9aa8c876d6ea4@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.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