This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] btrace: Store btrace_insn in an std::vector


Hi Simon,

> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Simon Marchi
> Sent: Sunday, September 3, 2017 11:06 AM
> To: gdb-patches@sourceware.org
> Cc: Metzger, Markus T <markus.t.metzger@intel.com>; Wiederhake, Tim
> <tim.wiederhake@intel.com>; Simon Marchi <simon.marchi@ericsson.com>
> Subject: [PATCH] btrace: Store btrace_insn in an std::vector
> 
> Because it contains a non-POD type field (flags), the type btrace_insn
> should be new'ed/delete'd.  Replace the VEC (btrace_insn_s) in
> btrace_function with an std::vector.
> 
> gdb/ChangeLog:
> 
> 	* btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
> 	(btrace_function) <insn>: Change type to use std::vector.
> 	* btrace.c (ftrace_debug, ftrace_call_num_insn,
> 	ftrace_find_call, ftrace_new_gap, ftrace_update_function,
> 	ftrace_update_insns, ftrace_compute_global_level_offset,
> 	btrace_stitch_bts, btrace_clear, btrace_insn_get,
> 	btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
> 	change to std::vector.
> 	(ftrace_update_insns): Adjust to change to std::vector, change
> 	type of INSN parameter.
> 	(btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
> 	* record-btrace.c (btrace_call_history_insn_range,
> 	btrace_compute_src_line_range,
> 	record_btrace_frame_prev_register): Adjust to change to
> 	std::vector.
> 	* python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
> 	to change to std::vector.

Looks good to me -- but I don't have approval power.

Regards,
Tim
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]