summaryrefslogtreecommitdiff
path: root/debuginfod/debuginfod-find.c
diff options
context:
space:
mode:
Diffstat (limited to 'debuginfod/debuginfod-find.c')
-rw-r--r--debuginfod/debuginfod-find.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/debuginfod/debuginfod-find.c b/debuginfod/debuginfod-find.c
index 778fb09b..30731098 100644
--- a/debuginfod/debuginfod-find.c
+++ b/debuginfod/debuginfod-find.c
@@ -48,7 +48,9 @@ static const char args_doc[] = N_("debuginfo BUILDID\n"
"executable BUILDID\n"
"executable PATH\n"
"source BUILDID /FILENAME\n"
- "source PATH /FILENAME\n");
+ "source PATH /FILENAME\n"
+ "section BUILDID SECTION-NAME\n"
+ "section PATH SECTION-NAME\n");
/* Definitions of arguments for argp functions. */
@@ -208,6 +210,17 @@ main(int argc, char** argv)
build_id, build_id_len,
argv[remaining+2], &cache_name);
}
+ else if (strcmp(argv[remaining], "section") == 0)
+ {
+ if (remaining+2 >= argc)
+ {
+ fprintf(stderr,
+ "If FILETYPE is \"section\" then a section name must be given\n");
+ return 1;
+ }
+ rc = debuginfod_find_section(client, build_id, build_id_len,
+ argv[remaining+2], &cache_name);
+ }
else
{
argp_help (&argp, stderr, ARGP_HELP_USAGE, argv[0]);