Convert probes to type-safe registry API
authorTom Tromey <tom@tromey.com>
Wed, 1 May 2019 05:47:54 +0000 (23:47 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 8 May 2019 22:01:51 +0000 (16:01 -0600)
commit814cf43a1f16157fcbe2c662f567d064393a0fcb
tree66d0d0c948fdf020cd7a31849db9edc26ea138ac
parent02dc647ed65b1429b9af4986ed467f90fbe0c33b
Convert probes to type-safe registry API

This changes the probes code in elfread.c to use the type-safe
registry API.  While doing this, I saw that the caller of get_probes
owns the probes, so I went through the code and changed the vectors to
store unique_ptrs, making the ownership relationship more clear.

gdb/ChangeLog
2019-05-08  Tom Tromey  <tom@tromey.com>

* symfile.h (struct sym_probe_fns) <sym_get_probes>: Change type.
* symfile-debug.c (debug_sym_get_probes): Change type.
* stap-probe.c (handle_stap_probe):
(stap_static_probe_ops::get_probes): Change type.
* probe.h (class static_probe_ops) <get_probes>: Change type.
* probe.c (class any_static_probe_ops) <get_probes>: Change type.
(parse_probes_in_pspace): Update.
(find_probes_in_objfile, find_probe_by_pc, collect_probes):
Update.
(any_static_probe_ops::get_probes): Change type.
* elfread.c (elfread_data): New typedef.
(probe_key): Change type.
(elf_get_probes): Likewise.  Update.
(probe_key_free): Remove.
(_initialize_elfread): Update.
* dtrace-probe.c (class dtrace_static_probe_ops) <get_probes>:
Change type.
(dtrace_process_dof_probe, dtrace_process_dof)
(dtrace_static_probe_ops::get_probe): Change type.
gdb/ChangeLog
gdb/dtrace-probe.c
gdb/elfread.c
gdb/probe.c
gdb/probe.h
gdb/stap-probe.c
gdb/symfile-debug.c
gdb/symfile.h
This page took 0.02519 seconds and 4 git commands to generate.