This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Make to_traceframe_info return a unique_ptr
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Sat, 14 Oct 2017 10:19:58 -0400
- Subject: [binutils-gdb] Make to_traceframe_info return a unique_ptr
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 2098b39391a5ade9ed308d76f2dfc7ceedd2d9a3 ***
Author: Simon Marchi <simon.marchi@polymtl.ca>
Branch: master
Commit: 2098b39391a5ade9ed308d76f2dfc7ceedd2d9a3
Make to_traceframe_info return a unique_ptr
Since this target method returns an allocated object, return a
unique_ptr. It allows getting rid a some cleanups here and there.
I had to shuffle the includes around. First, target.h now needs to
include tracepoint.h, to get the definition of traceframe_info_up.
However, the definition of enum trace_find_type was later in target, so
I had to move it to tracepoint.h, so that the declaration of tfind_1
could know about it. I then had to remove the include of target.h from
tracepoint.h, which caused a circular dependency (it was probably
included to get enum trace_find_type in the first place anyway).
Regression tested on the buildbot.
gdb/ChangeLog:
* target.h: Include tracepoint.h.
(enum trace_find_type): Move to tracepoint.h.
(struct target_ops) <to_traceframe_info>: Return a unique ptr.
* tracepoint.h: Don't include target.h
(enum trace_find_type): Move from target.h.
(parse_traceframe_info): Return a unique ptr.
* tracepoint.c (current_traceframe_info): Change type to unique
ptr.
(free_traceframe_info): Remove.
(clear_traceframe_info): Don't manually free
current_traceframe_info.
(free_result): Remove.
(parse_traceframe_info): Return a unique ptr.
(get_traceframe_info): Adjust to unique ptr.
* ctf.c (ctf_traceframe_info): Return a unique ptr.
* remote.c (remote_traceframe_info): Return a unique ptr.
* tracefile-tfile.c (tfile_traceframe_info): Return a unique
ptr.
* target-debug.h (target_debug_print_traceframe_info_up): New
macro.
* target-delegates.c: Regenerate.
- Follow-Ups:
- *** COMPILATION FAILED *** Failures on Ubuntu-AArch64-native-gdbserver-m64, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Ubuntu-AArch64-m64, branch master *** BREAKAGE ***
- Failures on Fedora-s390x-m64, branch master
- *** COMPILATION FAILED *** Failures on Ubuntu-AArch32-m32, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master *** BREAKAGE ***
- *** COMPILATION FAILED *** Failures on Ubuntu-AArch32-native-gdbserver-m32, branch master *** BREAKAGE ***
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-i686, branch master