[PATCH] D114415: [llvm] [Support] Add HTTP Server Support library.

Noah Shutty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 30 15:22:20 PST 2021


noajshu added a comment.

In D114415#3159995 <https://reviews.llvm.org/D114415#3159995>, @dblaikie wrote:

> In D114415#3159988 <https://reviews.llvm.org/D114415#3159988>, @phosek wrote:
>
>> In D114415#3159905 <https://reviews.llvm.org/D114415#3159905>, @dblaikie wrote:
>>
>>> What's the ultimate use intended for this? For testing the debuginfod client functionality (the llvm-symbolizer functionality is tested with a smaller(?) python http server - perhaps that could be used more & we could avoid having this C++ HTTP server implementation?)?
>>
>> It's for the server part of the LLVM debuginfod implementation. elfutils debuginfod has two parts: (1) `debuginfod-find` client and the corresponding library that could be integrated into other tools and (2) `debuginfod` which is a small daemon that periodically scans a set of directories, indexes any debugging information it finds and serves it over the builtin HTTP server using the debuginfod protocol. We have been focusing on #1 so far but we would also like to implement #2 which is really important for local development. https://groups.google.com/g/llvm-dev/c/jFdq0qYtKqM/m/1dLcYUGBBAAJ has more details.
>
> Oh, fair enough - just checking it wasn't only being implemented for testing. Would the python script from the llvm-symbolizer test be adequate for the production/local developer scenarios you have in mind? (I don't mind the C++ too much, but just trying to understand the landscape, tradeoffs, etc)

The python script used in D113717 <https://reviews.llvm.org/D113717> (which might also get used to test D112759 <https://reviews.llvm.org/D112759>) only takes care of the HTTP static file serving needed for debuginfod. There is another component, which is to search the filesystem for debug binaries and assemble the collection of artifacts to serve. I'll be publishing a diff shortly which implements this functionality using LLVM's object parsing and filesystem utilities. Then we will have all the pieces needed for a basic C++ debuginfod in LLVM.

There are workarounds we could use to get a simple debuginfod server working without this LLVM HTTP server. E.g., we could use CGI and FastCGI, or we could create symlinks / copies to the discovered debug data in a single static file serving path. These workarounds came with trade offs, and there are other tools in LLVM that could take advantage of a cross-platform HTTP server such as bisectd (D113030 <https://reviews.llvm.org/D113030>). This is what led to the goal of getting an HTTP server in LLVM's supporting libraries. (A side benefit is that we can now thoroughly unit test the HTTP client by letting it communicate with the server, but this isn't the motivation :) .)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114415/new/

https://reviews.llvm.org/D114415



More information about the llvm-commits mailing list