Hi Frank, On Mon, Oct 24, 2022 at 2:38 PM Frank Ch. Eigler <f...@redhat.com> wrote: > - use of write(2) to put files onto disk is not quite right; write(2) can > be partial, so you need a loop (or a macro wrapping a loop)
Fixed. > - not sure I understand why the code worries about dots in or not in > section names. Why not just pass them verbatim throughout the code > base, and not worry about whether or not there's a dot? Does the > ELF standard even require a dot? Fair point. The motivation for providing a general section query API as opposed to an API for specific indices was to be flexible and accommodate a wide range of use cases. Insisting on the dot is contrary to this goal. > - not sure whether/why the I queries require a new _query_i view, as > opposed to running the _query_d & _query_e views union'd together. > I see an ORDER BY that's different here but not sure why bother; > if anything, the server could prefer one or the other type, based > on the same section-name heuristic as the client The idea here was to prevent cases where a section would be extracted from the executable on one server and from the debuginfo on another server. Granted this is only relevant when the file mtimes differ between servers and for sections that differ between debuginfo and executable. This situation seems unlikely and these particular sections aren't of much interest (ex. .shstrtab). I will remove this view and just use the existing ones. > - don't really see a need for the X-DEBUGINFOD-SECTION response > header, which simply echoes back the very same parameter the client > just requested; the other X-DEBUGINFOD-* headers are novel metadata > > - re. verbose logging in the section vs non-section case, suggest > just keeping the code simple (even if it makes the logs more verbose), > i.e., not duplicating if (...) clog << STUFF else clog << STUFF; > no biggie tho > > - the webapi docs in debuginfod.8 should document the new query type Fixed. Aaron