diff options
author | Pedro Alves <palves@redhat.com> | 2017-04-25 01:27:42 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-04-25 01:43:52 +0100 |
commit | b5c3668253b909fd1f5b011893a35bb8dfd3be9b (patch) | |
tree | 275bdb3bfc05da8c32368d95313c0df74f669f76 /gdb/ChangeLog | |
parent | 5625a2864147f4d92b22edfeeab7600818988be2 (diff) | |
download | gdb-b5c3668253b909fd1f5b011893a35bb8dfd3be9b.zip gdb-b5c3668253b909fd1f5b011893a35bb8dfd3be9b.tar.gz gdb-b5c3668253b909fd1f5b011893a35bb8dfd3be9b.tar.bz2 |
Don't memset non-POD types: struct btrace_insn
struct btrace_insn is not a POD [1] so we shouldn't be using memset to
initialize it [2].
Use list-initialization instead, wrapped in a "pt insn to btrace insn"
function, which looks like just begging to be added next to the
existing pt_reclassify_insn/pt_btrace_insn_flags functions.
[1] - because its field "flags" is not POD, because enum_flags has a
non-trivial default ctor.
gdb/ChangeLog:
2017-04-25 Pedro Alves <palves@redhat.com>
* btrace.c (pt_btrace_insn_flags): Change parameter type to
reference.
(pt_btrace_insn): New function.
(ftrace_add_pt): Remove memset call and use pt_btrace_insn.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5df4a96..1b983b9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2017-04-25 Pedro Alves <palves@redhat.com> + * btrace.c (pt_btrace_insn_flags): Change parameter type to + reference. + (pt_btrace_insn): New function. + (ftrace_add_pt): Remove memset call and use pt_btrace_insn. + +2017-04-25 Pedro Alves <palves@redhat.com> + * ada-lang.c (ada_catchpoint_location): Now a "class". Remove "base" field and inherit from "bp_location" instead. Add non-default ctor. |