aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-04-25 01:27:42 +0100
committerPedro Alves <palves@redhat.com>2017-04-25 01:45:21 +0100
commit16c4d54a71d8052988ed9c8005a03a7f934245f4 (patch)
tree218c66f316f190d3158922a9ab60c70db55a90a5 /gdb/breakpoint.c
parentb5c3668253b909fd1f5b011893a35bb8dfd3be9b (diff)
downloadgdb-16c4d54a71d8052988ed9c8005a03a7f934245f4.zip
gdb-16c4d54a71d8052988ed9c8005a03a7f934245f4.tar.gz
gdb-16c4d54a71d8052988ed9c8005a03a7f934245f4.tar.bz2
Don't memset non-POD types: struct breakpoint
Eh, struct breakpoint was made non-POD just today, with commit d28cd78ad820e3 ("Change breakpoint event locations to event_location_up"). :-) src/gdb/breakpoint.c: In function ‘void init_raw_breakpoint_without_location(breakpoint*, gdbarch*, bptype, const breakpoint_ops*)’: src/gdb/breakpoint.c:7447:28: error: use of deleted function ‘void* memset(T*, int, size_t) [with T = breakpoint; <template-parameter-1-2> = void; size_t = long unsigned int]’ memset (b, 0, sizeof (*b)); ^ In file included from src/gdb/common/common-defs.h:85:0, from src/gdb/defs.h:28, from src/gdb/breakpoint.c:20: src/gdb/common/poison.h:56:7: note: declared here void *memset (T *s, int c, size_t n) = delete; ^ gdb/ChangeLog: 2017-04-25 Pedro Alves <palves@redhat.com> * breakpoint.h (struct breakpoint): In-class initialize all fields. Make boolean fields "bool". * breakpoint.c (init_raw_breakpoint_without_location): Remove memset call and initializations no longer necessary.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 4db32ab..67d5988 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -7428,8 +7428,6 @@ init_raw_breakpoint_without_location (struct breakpoint *b,
enum bptype bptype,
const struct breakpoint_ops *ops)
{
- memset (b, 0, sizeof (*b));
-
gdb_assert (ops != NULL);
b->ops = ops;
@@ -7437,17 +7435,7 @@ init_raw_breakpoint_without_location (struct breakpoint *b,
b->gdbarch = gdbarch;
b->language = current_language->la_language;
b->input_radix = input_radix;
- b->thread = -1;
- b->enable_state = bp_enabled;
- b->next = 0;
- b->silent = 0;
- b->ignore_count = 0;
- b->commands = NULL;
- b->frame_id = null_frame_id;
- b->condition_not_parsed = 0;
- b->py_bp_object = NULL;
b->related_breakpoint = b;
- b->location = NULL;
}
/* Helper to set_raw_breakpoint below. Creates a breakpoint