summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>2020-03-23 15:33:56 -0400
committerFrank Ch. Eigler <fche@redhat.com>2020-03-26 10:35:38 -0400
commitd63a809da467e646480c273b8eb276401679d2bb (patch)
treebc880511d67177f17cc179750c7968e089bce8be /doc
parent439641e52a3258ddfa66661f5de8bbcdb1530fc1 (diff)
downloadelfutils-d63a809da467e646480c273b8eb276401679d2bb.tar.gz
PR25548: support canonicalized source-path names in debuginfod webapi
Programs are sometimes compiled with source path names containing noise like /./ or // or /foo/../, and these survive into DWARF. This code allows either raw or canonicalized pathnames in the webapi, by letting the client pass things verbatim, and letting the server store/accept both raw and canonicalized path names for source files. Tests included & docs updated. Signed-off-by: Frank Ch. Eigler <fche@redhat.com> Reported-by: Eli Schwartz <eschwartz@archlinux.org> Tested-by: Eli Schwartz <eschwartz@archlinux.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/ChangeLog5
-rw-r--r--doc/debuginfod-find.19
-rw-r--r--doc/debuginfod.89
-rw-r--r--doc/debuginfod_find_debuginfo.39
4 files changed, 20 insertions, 12 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 59809ea8..564644f4 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-24 Frank Ch. Eigler <fche@redhat.com>
+
+ * debuginfod-find.1, debuginfod_find_debuginfo.3: Document
+ source path canonicalization.
+
2020-03-22 Frank Ch. Eigler <fche@redhat.com>
* debuginfod_get_url.3: New function, documented ...
diff --git a/doc/debuginfod-find.1 b/doc/debuginfod-find.1
index e71ca29b..a861a48e 100644
--- a/doc/debuginfod-find.1
+++ b/doc/debuginfod-find.1
@@ -78,10 +78,11 @@ is made up of multiple CUs. Therefore, to disambiguate, debuginfod
expects source queries to prefix relative path names with the CU
compilation-directory, followed by a mandatory "/".
-Note: the user should not elide \fB../\fP or \fB/./\fP or extraneous
-\fB///\fP sorts of path components in the directory names, because if
-this is how those names appear in the DWARF files, that is what
-debuginfod needs to see too.
+Note: the caller may or may not elide \fB../\fP or \fB/./\fP or extraneous
+\fB///\fP sorts of path components in the directory names. debuginfod
+accepts both forms. Specifically, debuginfod canonicalizes path names
+according to RFC3986 section 5.2.4 (Remove Dot Segments), plus reducing
+any \fB//\fP to \fB/\fP in the path.
For example:
.TS
diff --git a/doc/debuginfod.8 b/doc/debuginfod.8
index 39d1904e..64795c24 100644
--- a/doc/debuginfod.8
+++ b/doc/debuginfod.8
@@ -265,10 +265,11 @@ is made up of multiple CUs. Therefore, to disambiguate, debuginfod
expects source queries to prefix relative path names with the CU
compilation-directory, followed by a mandatory "/".
-Note: contrary to RFC 3986, the client should not elide \fB../\fP or
-\fB/./\fP or extraneous \fB///\fP sorts of path components in the
-directory names, because if this is how those names appear in the
-DWARF files, that is what debuginfod needs to see too.
+Note: the caller may or may not elide \fB../\fP or \fB/./\fP or extraneous
+\fB///\fP sorts of path components in the directory names. debuginfod
+accepts both forms. Specifically, debuginfod canonicalizes path names
+according to RFC3986 section 5.2.4 (Remove Dot Segments), plus reducing
+any \fB//\fP to \fB/\fP in the path.
For example:
.TS
diff --git a/doc/debuginfod_find_debuginfo.3 b/doc/debuginfod_find_debuginfo.3
index f7ec6cc1..42f2265b 100644
--- a/doc/debuginfod_find_debuginfo.3
+++ b/doc/debuginfod_find_debuginfo.3
@@ -87,10 +87,11 @@ paths, and yet an executable is made up of multiple CUs. Therefore, to
disambiguate, debuginfod expects source queries to prefix relative path
names with the CU compilation-directory, followed by a mandatory "/".
-Note: the caller should not elide \fB../\fP or \fB/./\fP or extraneous
-\fB///\fP sorts of path components in the directory names, because if
-this is how those names appear in the DWARF files, that is what
-debuginfod needs to see too.
+Note: the caller may or may not elide \fB../\fP or \fB/./\fP or extraneous
+\fB///\fP sorts of path components in the directory names. debuginfod
+accepts both forms. Specifically, debuginfod canonicalizes path names
+according to RFC3986 section 5.2.4 (Remove Dot Segments), plus reducing
+any \fB//\fP to \fB/\fP in the path.
If \fIpath\fP is not NULL and the query is successful, \fIpath\fP is set
to the path of the file in the cache. The caller must \fBfree\fP() this value.