diff options
| author | Frank Ch. Eigler <fche@redhat.com> | 2020-03-19 20:27:11 -0400 |
|---|---|---|
| committer | Frank Ch. Eigler <fche@redhat.com> | 2020-03-22 16:46:14 -0400 |
| commit | b40e25568333a80b3f1f3cb7dd2e2a2caf880dcb (patch) | |
| tree | 4224c9db7f4a0aa7932e2b7b5727a44e8ca30104 /doc | |
| parent | 2092865a7e589ff805caa47e69ac9630f34d4f2a (diff) | |
| download | platform_external_elfutils-b40e25568333a80b3f1f3cb7dd2e2a2caf880dcb.tar.gz platform_external_elfutils-b40e25568333a80b3f1f3cb7dd2e2a2caf880dcb.tar.bz2 platform_external_elfutils-b40e25568333a80b3f1f3cb7dd2e2a2caf880dcb.zip | |
debuginfod client API: add get/set user_data functions
Add a pair of functions to associate a void* parameter with a client
object. Requested by GDB team as a way to pass file names and such
user-interface data through to a progressfn callback.
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/Makefile.am | 11 | ||||
| -rw-r--r-- | doc/debuginfod_find_debuginfo.3 | 28 | ||||
| -rw-r--r-- | doc/debuginfod_get_user_data.3 | 1 | ||||
| -rw-r--r-- | doc/debuginfod_set_user_data.3 | 1 |
5 files changed, 42 insertions, 5 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 76445412..16b0e99f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2020-03-22 Frank Ch. Eigler <fche@redhat.com> + + * debuginfod_get_user.3, _set_user.3: New functions, documented ... + * debuginfod_find_debuginfo.3: ... here. + * Makefile.am (notrans_dist_*_man3): List all debuginfod .3 functions. + 2020-02-25 Frank Ch. Eigler <fche@redhat.com> * debuginfod.8: Note that -R works just like -Z.rpm . diff --git a/doc/Makefile.am b/doc/Makefile.am index b5db01ff..87d1fee0 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to create Makefile.in ## Configure input file for elfutils. ## -## Copyright (C) 1996-2001, 2002, 2005, 2019 Red Hat, Inc. +## Copyright (C) 1996-2001, 2002, 2005, 2019-2020 Red Hat, Inc. ## This file is part of elfutils. ## ## This file is free software; you can redistribute it and/or modify @@ -24,7 +24,14 @@ notrans_dist_man1_MANS= if DEBUGINFOD notrans_dist_man8_MANS += debuginfod.8 -notrans_dist_man3_MANS += debuginfod_find_debuginfo.3 debuginfod_find_source.3 debuginfod_find_executable.3 debuginfod_set_progressfn.3 +notrans_dist_man3_MANS += debuginfod_begin.3 +notrans_dist_man3_MANS += debuginfod_end.3 +notrans_dist_man3_MANS += debuginfod_find_debuginfo.3 +notrans_dist_man3_MANS += debuginfod_find_executable.3 +notrans_dist_man3_MANS += debuginfod_find_source.3 +notrans_dist_man3_MANS += debuginfod_get_user_data.3 +notrans_dist_man3_MANS += debuginfod_set_progressfn.3 +notrans_dist_man3_MANS += debuginfod_set_user_data.3 notrans_dist_man1_MANS += debuginfod-find.1 endif diff --git a/doc/debuginfod_find_debuginfo.3 b/doc/debuginfod_find_debuginfo.3 index f9e770b0..29706513 100644 --- a/doc/debuginfod_find_debuginfo.3 +++ b/doc/debuginfod_find_debuginfo.3 @@ -21,9 +21,15 @@ debuginfod_find_debuginfo \- request debuginfo from debuginfod .nf .B #include <elfutils/debuginfod.h> .PP +Link with \fB-ldebuginfod\fP. + +CONNECTION HANDLE + .BI "debuginfod_client *debuginfod_begin(void);" .BI "void debuginfod_end(debuginfod_client *" client ");" +LOOKUP FUNCTIONS + .BI "int debuginfod_find_debuginfo(debuginfod_client *" client "," .BI " const unsigned char *" build_id "," .BI " int " build_id_len "," @@ -38,12 +44,15 @@ debuginfod_find_debuginfo \- request debuginfo from debuginfod .BI " const char *" filename "," .BI " char ** " path ");" +OPTIONAL FUNCTIONS + .BI "typedef int (*debuginfod_progressfn_t)(debuginfod_client *" client "," .BI " long a, long b);" .BI "void debuginfod_set_progressfn(debuginfod_client *" client "," .BI " debuginfod_progressfn_t " progressfn ");" - -Link with \fB-ldebuginfod\fP. +.BI "void debuginfod_set_user_data(debuginfod_client *" client "," +.BI " void *" data ");" +.BI "void* debuginfod_get_user_data(debuginfod_client *" client ");" .SH DESCRIPTION @@ -102,7 +111,12 @@ to the client cache and a file descriptor to that file is returned. The caller needs to \fBclose\fP() this descriptor. Otherwise, a negative error code is returned. -.SH "PROGRESS CALLBACK" +.SH "OPTIONAL FUNCTIONS" + +A small number of optional functions are available to tune or query +the operation of the debuginfod client. + +.SS "PROGRESS CALLBACK" As the \fBdebuginfod_find_*\fP() functions may block for seconds or longer, a progress callback function is called periodically, if @@ -125,6 +139,14 @@ continue the work, or any other value to stop work as soon as possible. Consequently, the \fBdebuginfod_find_*\fP() function will likely return with an error, but might still succeed. +.SS "USER DATA POINTER" + +A single \fIvoid *\fP pointer associated with the connection handle +may be set any time via +.BR \%debuginfod_set_user_data () , +and retrieved via +.BR \%debuginfod_get_user_data () . +The value is undefined if unset. .SH "CACHE" If the query is successful, the \fBdebuginfod_find_*\fP() functions save diff --git a/doc/debuginfod_get_user_data.3 b/doc/debuginfod_get_user_data.3 new file mode 100644 index 00000000..16279936 --- /dev/null +++ b/doc/debuginfod_get_user_data.3 @@ -0,0 +1 @@ +.so man3/debuginfod_find_debuginfo.3 diff --git a/doc/debuginfod_set_user_data.3 b/doc/debuginfod_set_user_data.3 new file mode 100644 index 00000000..16279936 --- /dev/null +++ b/doc/debuginfod_set_user_data.3 @@ -0,0 +1 @@ +.so man3/debuginfod_find_debuginfo.3 |
