This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH 4/5] Don't memset non-POD types: struct btrace_insn
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Pedro Alves <palves at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 13 Apr 2017 07:53:21 +0000
- Subject: RE: [PATCH 4/5] Don't memset non-POD types: struct btrace_insn
- Authentication-results: sourceware.org; auth=none
- Dlp-product: dlpe-windows
- Dlp-reaction: no-action
- Dlp-version: 10.0.102.7
- References: <1492050475-9238-1-git-send-email-palves@redhat.com> <1492050475-9238-5-git-send-email-palves@redhat.com>
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Pedro Alves
> Sent: Thursday, April 13, 2017 4:28 AM
> To: gdb-patches@sourceware.org
> Subject: [PATCH 4/5] Don't memset non-POD types: struct btrace_insn
Hello Pedro,
> +/* Return the btrace instruction for INSN. */
> +
> +static btrace_insn
> +pt_btrace_insn (const struct pt_insn &insn)
> +{
> + return {(CORE_ADDR) insn.ip, (gdb_byte) insn.size,
> + pt_reclassify_insn (insn.iclass),
> + pt_btrace_insn_flags (&insn)};
> +}
This is the only user of pt_btrace_insn_flags. If you want, you may
change it to take a const & instead of a const *.
The patch looks good to me.
Regards,
Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928