gdb: introduce debuginfod_client_up type
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 15 Sep 2020 02:28:42 +0000 (22:28 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 15 Sep 2020 02:28:42 +0000 (22:28 -0400)
commitd2b31b672955162463cd47bdb28baf2687bebe28
tree42ae1f1000d747df74b0b2e64bb98f80c39b407d
parent3246bd8ec50fa312403a8629bcad798a1dbbbc0f
gdb: introduce debuginfod_client_up type

Introduce and use a unique pointer specialization for the
debuginfod_client type.  The deleter calls debuginfod_end to free the
client.

gdb/ChangeLog:

* debuginfod-support.c (debuginfod_client_deleter): New.
(debuginfod_client_up): New.
(debuginfod_init): Return debuginfod_client_up.
(debuginfod_source_query): Adjust.
(debuginfod_debuginfo_query): Adjust.

Change-Id: Ie56441e123ab80b78e5311c824c162cd804f68c0
gdb/ChangeLog
gdb/debuginfod-support.c