aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2017-09-12 13:55:32 +0200
committerSimon Marchi <simon.marchi@ericsson.com>2017-09-12 13:55:32 +0200
commit1eac6bea98f41ee12ba9e750a9578bd8585011c9 (patch)
treee67896dc27ed9d5e758e5cbd4abc207cd45c0def /gdb/ChangeLog
parentaaa63a31909946c4f68da64a93662147d67630bd (diff)
downloadgdb-1eac6bea98f41ee12ba9e750a9578bd8585011c9.zip
gdb-1eac6bea98f41ee12ba9e750a9578bd8585011c9.tar.gz
gdb-1eac6bea98f41ee12ba9e750a9578bd8585011c9.tar.bz2
Make collect_probes return an std::vector
Change collect_probes so it returns an std::vector<bound_probe> instead of a VEC(bound_probe_s). This allows removing some cleanups. It also seems like enable_probes_command and disable_probes_command were not freeing that vector. The comparison function compare_probes needs to be updated to return a bool indicating whether the first parameter is "less than" the second parameter. I defined two constructors to bound_probe. The default constructor is needed, for example, so the instance in struct bp_location can be constructed without parameters. The constructor with parameters is useful so we can use emplace_back and pass the values directly. The s390 builder on the buildbot shows a weird failure that I can't explain: ../../binutils-gdb/gdb/elfread.c: In function void probe_key_free(bfd*, void*): ../../binutils-gdb/gdb/elfread.c:1346:8: error: types may not be defined in a for-range-declaration [-Werror] for (struct probe *probe : *probes) ^~~~~~ I guess it's a bug with that specific version< of the compiler, since no other gcc gives me that error. It is using: g++ (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1) Any idea about this problem? gdb/ChangeLog: * probe.h (struct bound_probe): Define constructors. * probe.c (bound_probe_s): Remove typedef. (DEF_VEC_O (bound_probe_s)): Remove VEC. (collect_probes): Change return type to std::vector, remove cleanup. (compare_probes): Return bool, change parameter type. Change semantic to "less than". (gen_ui_out_table_header_info): Change parameter to std::vector and update. (exists_probe_with_pops): Likewise. (info_probes_for_ops): Update to std::vector change. (enable_probes_command): Likewise. (disable_probes_command): Likewise.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0a54a90..b5fe2e2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,21 @@
2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
+ * probe.h (struct bound_probe): Define constructors.
+ * probe.c (bound_probe_s): Remove typedef.
+ (DEF_VEC_O (bound_probe_s)): Remove VEC.
+ (collect_probes): Change return type to std::vector, remove
+ cleanup.
+ (compare_probes): Return bool, change parameter type. Change
+ semantic to "less than".
+ (gen_ui_out_table_header_info): Change parameter to std::vector
+ and update.
+ (exists_probe_with_pops): Likewise.
+ (info_probes_for_ops): Update to std::vector change.
+ (enable_probes_command): Likewise.
+ (disable_probes_command): Likewise.
+
+2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
+
* probe.h (struct probe_ops) <get_probes>: Change parameter from
vec to std::vector.
* probe.c (parse_probes_in_pspace): Update.