Re: [Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-06 Thread Pavel Labath via lldb-commits
On 5 December 2017 at 17:44, Greg Clayton wrote: > Didn't someone recently submit a patch to allow relocation of .o files? That > should have taken care of the issue, no? > I take it you mean D38142. This made sure that the memory we store the object file in is writable, which makes sure that we

Re: [Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-05 Thread Greg Clayton via lldb-commits
Didn't someone recently submit a patch to allow relocation of .o files? That should have taken care of the issue, no? > On Dec 4, 2017, at 5:01 AM, Pavel Labath via lldb-commits > wrote: > > The reason you hit the assert there, is because you're running lldb on > an un-linked object file. When

[Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-05 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. One really nice way we can get a lot of testing of the DWARF to clang::ASTContext conversion is to: 1 - compile a source file with clang and dumps the AST for a specific type as the compiler knows it 2 - using the .o file with debug info from step 1, load it into LLDB a

Re: [Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-04 Thread Pavel Labath via lldb-commits
The reason you hit the assert there, is because you're running lldb on an un-linked object file. When you link the file, the linker will resolve these relocations and they will disappear. This is also the reason you got those errors after removing the assert (you were trying to parse unrelocated d

Re: [Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-01 Thread Zachary Turner via lldb-commits
On Fri, Dec 1, 2017 at 3:50 PM Jim Ingham via Phabricator < revi...@reviews.llvm.org> wrote: > jingham added a comment. > > Cool. We do need to make sure people don't start writing tests against it > yet, however. That would be wasted effort. > I don't think it follows that it would be a wasted

[Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-01 Thread Zachary Turner via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL319599: Add a symbols subcommand to lldb-test. (authored by zturner). Changed prior to commit: https://reviews.llvm.org/D40745?vs=125197&id=125239#toc Repository: rL LLVM https://reviews.llvm.org/D4

[Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-01 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. Cool. We do need to make sure people don't start writing tests against it yet, however. That would be wasted effort. https://reviews.llvm.org/D40745 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.l

[Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-01 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. In https://reviews.llvm.org/D40745#942913, @jingham wrote: > I'm sure this is just a "quick and dirty implementation" thing, but depending > on the output of Dump functions doesn't seem like a great idea for long term > stable testing. > > Those functions are meant to b

[Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-01 Thread Jim Ingham via Phabricator via lldb-commits
jingham added a comment. I'm sure this is just an "quick and dirty implementation" thing, but depending on the output of Dump functions doesn't seem like a great idea for long term stable testing. Those functions are meant to be useful for debugging lldb, and gathering data when you can't get

[Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-01 Thread Vedant Kumar via Phabricator via lldb-commits
vsk added a comment. The general approach sgtm, and the patch itself looks reasonable. https://reviews.llvm.org/D40745 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-01 Thread Davide Italiano via Phabricator via lldb-commits
davide added inline comments. Comment at: lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:2764-2765 switch (reloc_type(rel)) { case R_386_32: case R_386_PC32: default: It's unclear to me why PC-rel and 32-bit abs rel are not handl

[Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-01 Thread Davide Italiano via Phabricator via lldb-commits
davide added subscribers: vsk, aprantl. davide added a comment. I really like this approach. I think it's going to expose a large amount of bugs, and probably facilitate the transition in case we want to move to the LLVM readers for this. @aprantl / @vsk , what do you think? https://reviews.ll

[Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-01 Thread Zachary Turner via Phabricator via lldb-commits
zturner added a comment. If I remove that assert, I get this output: D:\src\llvmbuild\lldb>bin\lldb-test.exe clang-ast foo.o error: foo.o {0x003b}: unhandled type tag 0x0005 (DW_TAG_formal_parameter), please file a bug and attach the file at the start of this error message error: foo.

[Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

2017-12-01 Thread Zachary Turner via Phabricator via lldb-commits
zturner created this revision. Herald added a subscriber: emaste. This is the bare minimum needed to dump `ClangASTContext`s via `lldb-test`. Within the first 10 seconds of using this, I already found a bug. A `FIXME` note and repro is included in the comments in this patch. With this, it shou