summaryrefslogtreecommitdiff
path: root/gdb/debuginfod-support.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/debuginfod-support.h')
-rw-r--r--gdb/debuginfod-support.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/debuginfod-support.h b/gdb/debuginfod-support.h
index 29e361bb76f..5b1c1cb91f4 100644
--- a/gdb/debuginfod-support.h
+++ b/gdb/debuginfod-support.h
@@ -61,4 +61,21 @@ debuginfod_debuginfo_query (const unsigned char *build_id,
const char *filename,
gdb::unique_xmalloc_ptr<char> *destname);
+/* Query debuginfod servers for an executable file with BUILD_ID.
+ BUILD_ID can be given as a binary blob or a null-terminated string.
+ If given as a binary blob, BUILD_ID_LEN should be the number of bytes.
+ If given as a null-terminated string, BUILD_ID_LEN should be 0.
+
+ FILENAME should be the name or path associated with the executable.
+ It is used for printing messages to the user.
+
+ If the file is successfully retrieved, its path on the local machine
+ is stored in DESTNAME. If GDB is not built with debuginfod, this
+ function returns -ENOSYS. */
+
+extern scoped_fd debuginfod_exec_query (const unsigned char *build_id,
+ int build_id_len,
+ const char *filename,
+ gdb::unique_xmalloc_ptr<char>
+ *destname);
#endif /* DEBUGINFOD_SUPPORT_H */