[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-24 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk updated this revision to Diff 252353. kwk added a comment. - Add documentation for workaround on rejecting special build UUIDs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75750/new/ https://reviews.llvm.org/D75750 Files: lldb/cmake/modules

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-24 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. The code mostly fine for me, but this should be reviewed by properly by more people, once you're ready to take down the WIP tag. I am still not happy with the test case. Comment at: lldb/source/Host/common/DebugInfoD.cpp:43 + buildID.GetBytes().si

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-23 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk updated this revision to Diff 252059. kwk added a comment. - Adjust buildID verification Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75750/new/ https://reviews.llvm.org/D75750 Files: lldb/cmake/modules/FindDebuginfod.cmake lldb/cmake/mod

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-23 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk updated this revision to Diff 252054. kwk marked 2 inline comments as done. kwk added a comment. - Remove commented out code - Remove lldb/packages/Python/lldbsuite/test/httpserver.py in favor of lit test - Removed commented out left-over code Repository: rG LLVM Github Monorepo CHANGES S

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-23 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added inline comments. Comment at: lldb/source/Host/common/DebugInfoD.cpp:43 + buildID.GetBytes().size() == + sizeof(llvm::support::ulittle32_t)) // .gnu_debuglink crc32 +return llvm::createStringError(llvm::inconvertibleErrorCode(), --

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-23 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk added a comment. @labath @fche2 @jankratochvil I've implemented the logic to ignore invalid UUIDs and the ones that are too short. Can you have another look please? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75750/new/ https://reviews.llvm.

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-23 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk updated this revision to Diff 252026. kwk added a comment. - check for valid UUID - less verbose mkdir and rm output - More explicit test and documentation - fixup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75750/new/ https://reviews.llvm.or

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-20 Thread Frank Ch. Eigler via Phabricator via lldb-commits
fche2 added inline comments. Comment at: lldb/source/Host/common/DebugInfoD.cpp:59 + char *cache_path = nullptr; + int rc = debuginfod_find_source(client, buildID.GetBytes().data(), + buildID.GetBytes().size(), path.c_str(), jan

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-20 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added inline comments. Comment at: lldb/source/Host/common/DebugInfoD.cpp:59 + char *cache_path = nullptr; + int rc = debuginfod_find_source(client, buildID.GetBytes().data(), + buildID.GetBytes().size(), path.c_str(),

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-20 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/source/Host/common/DebugInfoD.cpp:59 + char *cache_path = nullptr; + int rc = debuginfod_find_source(client, buildID.GetBytes().data(), + buildID.GetBytes().size(), path.c_str(), fc

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-19 Thread Frank Ch. Eigler via Phabricator via lldb-commits
fche2 added inline comments. Comment at: lldb/source/Host/common/DebugInfoD.cpp:59 + char *cache_path = nullptr; + int rc = debuginfod_find_source(client, buildID.GetBytes().data(), + buildID.GetBytes().size(), path.c_str(), jan

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-19 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added inline comments. Comment at: lldb/source/Host/common/DebugInfoD.cpp:39 + +llvm::Expected findSource(UUID buildID, const std::string &path) { + if (!buildID.IsValid()) `const UUID &buildID` as it is even bigger (40 bytes) than `std::string` (3

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-19 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added inline comments. Comment at: lldb/source/Core/SourceManager.cpp:422 if (num_matches > 1) { -SymbolContext sc; +// SymbolContext sc; CompileUnit *test_cu = nullptr; This comment should not stay th

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-19 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk updated this revision to Diff 251383. kwk added a comment. - Validate that the server received the request from debuginfod client Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75750/new/ https://reviews.llvm.org/D75750 Files: lldb/cmake/modu

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-19 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk updated this revision to Diff 251376. kwk marked 6 inline comments as done. kwk added a comment. - Removed not needed forward decl - Format comments for better readability in my test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75750/new/ http

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-19 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk added a comment. @labath I've improved my test file for readability. Comment at: lldb/include/lldb/Host/DebugInfoD.h:26 + +llvm::Error findSource(UUID buildID, const std::string &path, + std::string &result_path); labath wrote: > Expec

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-19 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D75750#1929124 , @kwk wrote: > @labath I've updated my patch and would love to hear your opinion on it. So > far I've only written the python `ServeDirectoryWithHTTP()` function with > proper doctest and documentation but since

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-19 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk updated this revision to Diff 251297. kwk added a comment. - Fix NameError: name 'TRUE' is not defined Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75750/new/ https://reviews.llvm.org/D75750 Files: lldb/cmake/modules/FindDebuginfod.cmake

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-19 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk planned changes to this revision. kwk added a comment. In D75750#1929967 , @jankratochvil wrote: > On Fedora 31 x86_64 with LLDB using python3 I got: > > llvm-lit: .../llvm-monorepo2/llvm/utils/lit/lit/TestingConfig.py:102: > fatal: unable to parse

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-18 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil added a comment. On Fedora 31 x86_64 with LLDB using python3 I got: llvm-lit: .../llvm-monorepo2/llvm/utils/lit/lit/TestingConfig.py:102: fatal: unable to parse config file '.../llvm-monorepo2-clangassert/tools/lldb/test/Shell/lit.site.cfg.py', traceback: Traceback (most recent

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-18 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk added a comment. @labath I've updated my patch and would love to hear your opinion on it. So far I've only written the python `ServeDirectoryWithHTTP()` function with proper doctest and documentation but since you mentioned the `0` port thingy I've tried that on the command line when using

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-18 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk updated this revision to Diff 251086. kwk added a comment. Herald added a reviewer: jdoerfert. - Added debuginfod2.py - after running: autopep8 --in-place --aggressive --aggressive debuginfod2.py - exponential backoff implemented - Added http.py with doctests - autopep8 --in-place --aggressiv

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-09 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk updated this revision to Diff 249096. kwk added a comment. - Fix include ordering based on clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75750/new/ https://reviews.llvm.org/D75750 Files: lldb/cmake/modules/FindDebuginfod.cmake

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-09 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk marked an inline comment as done. kwk added a comment. @labath thank you for your early feedback. It was helpful even though this is still a work in progress. Comment at: lldb/source/Host/common/DebugInfoD.cpp:43-67 +UUID getBuildIDFromModule(const ModuleSP &module) { + U

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-09 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk updated this revision to Diff 249047. kwk marked 3 inline comments as done. kwk added a comment. Changes suggested by elfutils maintainers: - Silently ignore error when no DEBUGINFOD_URLS was given as an environment variable (ENOSYS). - Silently ignore error when the build ID could not be fo

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-09 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/include/lldb/Host/DebugInfoD.h:26 + +llvm::Error findSource(UUID buildID, const std::string &path, + std::string &result_path); Expected ? Comment at: lldb/source/Host/common/

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-06 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk updated this revision to Diff 248746. kwk added a comment. - Simplified return type of getBuildIDFromModule - fixed typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75750/new/ https://reviews.llvm.org/D75750 Files: lldb/cmake/modules/FindD

[Lldb-commits] [PATCH] D75750: WIP: [lldb] integrate debuginfod

2020-03-06 Thread Konrad Wilhelm Kleine via Phabricator via lldb-commits
kwk created this revision. Herald added subscribers: lldb-commits, mgorny. Herald added a project: LLDB. kwk planned changes to this revision. This first patch does the heavy lifting of bootstrapping debuginfod with CMake and integrating it to find a source file using debuginfod when using `(lldb)