Page MenuHomePhabricator
Feed Advanced Search

Jun 17 2019

labath committed rL363528: DWARF: Avoid storing DIERefs in long-lived containers.
DWARF: Avoid storing DIERefs in long-lived containers
Jun 17 2019, 12:31 AM
labath closed D63322: DWARF: Avoid storing DIERefs in long-lived containers.
Jun 17 2019, 12:31 AM · Restricted Project
labath added inline comments to D63322: DWARF: Avoid storing DIERefs in long-lived containers.
Jun 17 2019, 12:29 AM · Restricted Project
labath accepted D62503: Add ReadCStringFromMemory for faster string reads.

LGTM, modulo the inline comments.

Jun 17 2019, 12:10 AM · Restricted Project, Restricted Project

Jun 16 2019

labath added a comment to D63380: [lldb] [test] Skip watchpoint tests on NetBSD if userdbregs is disabled.

This definitely aren't all of our watchpoint tests. What's the reason for picking this particular bunch? Are they the only ones enabled on NetBSD right now?

Jun 16 2019, 11:54 PM · Restricted Project
labath added a comment to D63363: [Signals] Create a plugin directory just for signals.

Although this is technically correct and pretty consistent with our other "plugins", I can't help but feel that it's incredibly wasteful. Each of the XXXSignals.cpp files is less than a 100 lines long (with the licence header and all bolierplate) and it's unlikely to ever grow beyond that. And essentially, all these files do is define a single enum. The reason they are this long is because the UnixSignals class is already over-engineered (e.g. I don't see why LinuxSignals needs to be a separate class, or why it needs to repeat the descriptions/default stop values for each of the signals). Making this a plugin would just add another chunk of boilerplate on top of that.

Jun 16 2019, 11:44 PM

Jun 14 2019

labath committed rG2dd0053d3adc: EditlineTest: Improve error message (authored by labath).
EditlineTest: Improve error message
Jun 14 2019, 7:31 AM
labath committed rL363404: EditlineTest: Improve error message.
EditlineTest: Improve error message
Jun 14 2019, 7:30 AM
labath committed rG00e3968b8a41: DWARF: port debug_ranges/rnglists over to DWARFContext (authored by labath).
DWARF: port debug_ranges/rnglists over to DWARFContext
Jun 14 2019, 7:10 AM
labath committed rL363400: DWARF: port debug_ranges/rnglists over to DWARFContext.
DWARF: port debug_ranges/rnglists over to DWARFContext
Jun 14 2019, 7:09 AM
labath committed rGfe79fbc99dbb: DWARF: Remove unused includes from DWARFDebugAranges.h/cpp (authored by labath).
DWARF: Remove unused includes from DWARFDebugAranges.h/cpp
Jun 14 2019, 6:20 AM
labath committed rL363382: DWARF: Remove unused includes from DWARFDebugAranges.h/cpp.
DWARF: Remove unused includes from DWARFDebugAranges.h/cpp
Jun 14 2019, 6:18 AM
labath committed rG6a2eb3671018: Have DWARFUnit store a *reference* to SymbolFileDWARF (authored by labath).
Have DWARFUnit store a *reference* to SymbolFileDWARF
Jun 14 2019, 5:59 AM
labath committed rL363381: Have DWARFUnit store a *reference* to SymbolFileDWARF.
Have DWARFUnit store a *reference* to SymbolFileDWARF
Jun 14 2019, 5:58 AM
labath committed rG78b2cf71f5f2: DWARFIndex: s/ReportInvalidDIEOffset/ReportInvalidDIERef (authored by labath).
DWARFIndex: s/ReportInvalidDIEOffset/ReportInvalidDIERef
Jun 14 2019, 4:59 AM
labath committed rL363373: DWARFIndex: s/ReportInvalidDIEOffset/ReportInvalidDIERef.
DWARFIndex: s/ReportInvalidDIEOffset/ReportInvalidDIERef
Jun 14 2019, 4:58 AM
labath created D63322: DWARF: Avoid storing DIERefs in long-lived containers.
Jun 14 2019, 1:11 AM · Restricted Project

Jun 13 2019

labath committed rGd8aca8886ff3: Make UniqueCStringMap work with non-default-constructible types and other… (authored by labath).
Make UniqueCStringMap work with non-default-constructible types and other…
Jun 13 2019, 11:34 PM
labath committed rL363357: Make UniqueCStringMap work with non-default-constructible types and other….
Make UniqueCStringMap work with non-default-constructible types and other…
Jun 13 2019, 11:30 PM
labath closed D63268: Make UniqueCStringMap work with non-default-constructible types and other improvements/cleanups.
Jun 13 2019, 11:30 PM · Restricted Project
labath added inline comments to D62503: Add ReadCStringFromMemory for faster string reads.
Jun 13 2019, 12:01 PM · Restricted Project, Restricted Project
labath added inline comments to D63268: Make UniqueCStringMap work with non-default-constructible types and other improvements/cleanups.
Jun 13 2019, 8:27 AM · Restricted Project
labath created D63268: Make UniqueCStringMap work with non-default-constructible types and other improvements/cleanups.
Jun 13 2019, 7:39 AM · Restricted Project
labath committed rGad17e289f0e2: DWARF: Don't create lldb CompileUnits for DWARF type units (authored by labath).
DWARF: Don't create lldb CompileUnits for DWARF type units
Jun 13 2019, 4:21 AM
labath committed rL363250: DWARF: Don't create lldb CompileUnits for DWARF type units.
DWARF: Don't create lldb CompileUnits for DWARF type units
Jun 13 2019, 4:20 AM
labath closed D63005: DWARF: Don't create lldb CompileUnits for DWARF type units.
Jun 13 2019, 4:20 AM · Restricted Project
labath accepted D62502: Implement xfer:libraries-svr4:read packet.

LGTM, with the following comment taken into account.

Jun 13 2019, 1:29 AM · Restricted Project, Restricted Project
labath added a comment to D62503: Add ReadCStringFromMemory for faster string reads.

Yeah, that's a good question and I did think about it at the time I wrote D62715. Here's my rationale:
Regarding the chunk reading in the ReadMemory I was not sure because I don't know how common that is and it is faster to read the entire size without chunking (the code is also less complex this way). I'd imagine that in the common case we usually know what we're reading? (e.g.: reading the entire function assembly code)
That's why I thought about the string "extraction" as a special case for memory reading. However, even if we had a ReadMemory that did chunking I'd still want to do chunking in the ReadCStringFromMemory. Otherwise we'd be reading much more than needed for a string because there is no way for the ReadMemory to know it could stop (after finding a '\0') so it might end up reading say 2KB word by word with ptrace. (I did think for 5s to pass an optional stop character to ReadMemory but that would be shoehorning an edge case into a generic and simple function, it would be better to put the chunk reading logic into a separate thing that both ReadMemory and ReadCStringFromMemory could reuse).

Jun 13 2019, 1:21 AM · Restricted Project, Restricted Project
labath added a reviewer for D63240: [Core] Generalize ValueObject::IsRuntimeSupportValue: aprantl.

+ Adrian, as I believe we touched this code recently...

Jun 13 2019, 12:20 AM · Restricted Project

Jun 12 2019

labath added inline comments to D63166: Move common functionality from processwindows into processdebugger.
Jun 12 2019, 11:31 PM · Restricted Project
labath committed rGad805ef95a75: Recognise debug_types.dwo as a debug info section (authored by labath).
Recognise debug_types.dwo as a debug info section
Jun 12 2019, 4:41 AM
labath committed rL363146: Recognise debug_types.dwo as a debug info section.
Recognise debug_types.dwo as a debug info section
Jun 12 2019, 4:39 AM
labath committed rGca9c3de17e58: DWARF: Share line tables of type units (authored by labath).
DWARF: Share line tables of type units
Jun 12 2019, 4:30 AM
labath committed rL363143: DWARF: Share line tables of type units.
DWARF: Share line tables of type units
Jun 12 2019, 4:27 AM
labath closed D62894: DWARF: Share line tables of type units.
Jun 12 2019, 4:27 AM · Restricted Project
labath added a comment to D62756: Be consistent when adding names and mangled names to the index.

Being consistent definitely sounds like a good idea. Since this does change behavior somewhat, I'm wondering whether it would make sense to add a test here. The thing that's not clear to me is whether this change in behavior is only theoretical, or if it can also happen in a real-world scenario. We can always hand-construct an DIE which will have a linkage name, but no "normal" name, but I don't see how would this ever happen in practice. How did you initially discover this inconsistency?

I added asserts in the else clause if code like:

if (name) {
  ...
} else {
  assert(mangled_str == nullptr);
}

And I got the assert. So this is a real issue.

Jun 12 2019, 4:16 AM
labath added a comment to D63181: [Target] Decouple ObjCLanguageRuntime from LanguageRuntime.

Moving BreakpointPrecondition to a forward-declarable place sounds good to me.

Jun 12 2019, 4:02 AM · Restricted Project
labath added a comment to D63171: Don't try to parse ObjC method if CU isn't ObjC.

I suppose one could compile Objective-C code on Linux using GCC.

Will GCC not set the language to ObjC or ObjC++?

This was intended as a reply to:

One question I have is all Darwin compilers currently support the apple DWARF indexes, so do we even need the objective C parsing code here?

Jun 12 2019, 3:46 AM · Restricted Project
labath added a reviewer for D63165: Initial support for native debugging of x86/x64 Windows processes: amccarth.

I take it that D63166 is a prerequisite for this patch. Is that all, or is there something else that we ought to look at first?

Jun 12 2019, 3:07 AM · Restricted Project
labath added a reviewer for D63166: Move common functionality from processwindows into processdebugger: amccarth.

Given that you're just moving code around, this should be fine, but I am including @amccarth, as I believe he is more familiar with this code.

Jun 12 2019, 2:23 AM · Restricted Project

Jun 11 2019

labath updated the diff for D62894: DWARF: Share line tables of type units.
  • add DWARFUnit::GetFile helper function
Jun 11 2019, 2:40 AM · Restricted Project
labath added inline comments to D62894: DWARF: Share line tables of type units.
Jun 11 2019, 2:38 AM · Restricted Project
labath added a comment to D62852: Ignore DIEs in the skeleton unit in a DWO scenario.
In D62852#1537529, @kwk wrote:

This patch fixes a couple of existing tests,

@labath can you please tell which tests are fixed by this commit exactly? I try to reproduce an issue with a test that (potentially under load) used tp sometimes hang. Now it does no longer do that and I wonder if your change has anything to do with that.

Here's the test call I'm talking about:

cd ~/llvm/lldb/test/
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/llvm-builds/relwithdebinfo-ninja-clang-gold-ccache-distcc/lib python dotest.py \
  -v \
  --executable ~/llvm-builds/relwithdebinfo-ninja-clang-gold-ccache-distcc/bin/lldb \
  -f TestVSCode_setBreakpoints.test_functionality \
  ../../lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint
Jun 11 2019, 1:24 AM · Restricted Project
labath added a comment to D62503: Add ReadCStringFromMemory for faster string reads.

Given that you're improving the linux implementation (which is the only one that benefits from chunked reads) of ReadMemory in https://reviews.llvm.org/D62715, does it make sense to do the chunking here? After all, if an implementation (like NetBSD) has an efficient ptrace interface for reading memory, then the chunked reads might actually be pessimizing it. Theoretically, the linux implementation could be improved further to use the chunking ("If I am using ptrace, and have just crossed a page boundary, try process_vm_readv again in case the new page happens to be readable"), but I'm not sure if that is really necessary.

Jun 11 2019, 1:15 AM · Restricted Project, Restricted Project
labath added a comment to D62502: Implement xfer:libraries-svr4:read packet.

Ok, so given that both NetBSD and FreeBSD implement this feature (and the current DynamicLoaderPOSIXDYLD plugin reads it), I think we should move this bit of code into NativeProcessELF -- after all, that's what we've created it for.

Jun 11 2019, 12:43 AM · Restricted Project, Restricted Project

Jun 10 2019

labath added inline comments to D63052: [Target] Remove Process::GetObjCLanguageRuntime.
Jun 10 2019, 12:25 PM · Restricted Project
labath added a comment to D63005: DWARF: Don't create lldb CompileUnits for DWARF type units.

I saw some weird formatting, but I assume you run clang-format before landing anyway. LGTM.

Jun 10 2019, 9:29 AM · Restricted Project
labath updated the diff for D62894: DWARF: Share line tables of type units.
  • address code review comments
Jun 10 2019, 9:28 AM · Restricted Project
labath added inline comments to D62894: DWARF: Share line tables of type units.
Jun 10 2019, 9:25 AM · Restricted Project
labath committed rG5e173dc5eadf: Breakpad: Add support for the arm64e "architecture" (authored by labath).
Breakpad: Add support for the arm64e "architecture"
Jun 10 2019, 9:19 AM
labath committed rL362960: Breakpad: Add support for the arm64e "architecture".
Breakpad: Add support for the arm64e "architecture"
Jun 10 2019, 9:18 AM
labath committed rGc573032ded90: Add "REQUIRES: x86" to DWARF assembly tests (authored by labath).
Add "REQUIRES: x86" to DWARF assembly tests
Jun 10 2019, 8:06 AM
labath committed rL362948: Add "REQUIRES: x86" to DWARF assembly tests.
Add "REQUIRES: x86" to DWARF assembly tests
Jun 10 2019, 8:05 AM
labath updated the diff for D63005: DWARF: Don't create lldb CompileUnits for DWARF type units.
  • Also implement Adrians suggestion.
Jun 10 2019, 7:24 AM · Restricted Project
labath updated the diff for D63005: DWARF: Don't create lldb CompileUnits for DWARF type units.
  • account for the fact that D62943 was a dud. Instead, set the correct ID of the compile unit so that the DWARF unit can be found via the regular logic.
  • add a test for the situation where the dwarf and lldb compile unit indexes do not match
Jun 10 2019, 7:19 AM · Restricted Project
labath added inline comments to D62894: DWARF: Share line tables of type units.
Jun 10 2019, 3:05 AM · Restricted Project
labath updated the diff for D62894: DWARF: Share line tables of type units.
  • Implement code review suggestions (except the Die::GetName, and return {})
  • Add a test for the error message which is printed when we encounter an incomplete class (this is motivated by the bug in the printing of the name of the compile unit)
Jun 10 2019, 3:05 AM · Restricted Project
labath added a comment to D62943: DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnit.

Thanks for reverting this. It seems I did not take into account here the fact that SymbolFileDWARFDebugMap creates CompileUnits without setting the the UserData to point to the relevant dwarf compile unit.

Jun 10 2019, 2:14 AM · Restricted Project
labath added inline comments to D63052: [Target] Remove Process::GetObjCLanguageRuntime.
Jun 10 2019, 12:14 AM · Restricted Project

Jun 9 2019

labath updated subscribers of D62502: Implement xfer:libraries-svr4:read packet.

This looks mostly good. The thing I'm wondering about is whether this part of the code is really linux specific (in which case we should rename ELFLinkMap into LinuxLinkMap), or if it can be useful on other platforms (in which case this should go into the newly-created NativeProcessELF). @mgorny , @krytarowski, what do you think?

Jun 9 2019, 11:27 PM · Restricted Project, Restricted Project
labath accepted D62501: Implement GetSharedLibraryInfoAddress.

BTW, I see you still haven't submitted the previous two changes in the stack. Are you planning to submit all of them together or what? It's usually better to avoid batch submitting a bunch of dependent changes, as that way, if any problem shows up with the first one, the whole stack needs to be reverted

Jun 9 2019, 11:12 PM · Restricted Project, Restricted Project

Jun 7 2019

labath accepted D62934: [LanguageRuntime] Introdce LLVM-style casts.

lgtm

Jun 7 2019, 9:33 AM · Restricted Project
labath abandoned D62395: WIP: Dont vend lldb_private::CompileUnits for DWARFTypeUnits.

Obsoleted by https://reviews.llvm.org/D63005.

Jun 7 2019, 4:30 AM
labath added a parent revision for D63005: DWARF: Don't create lldb CompileUnits for DWARF type units: D62894: DWARF: Share line tables of type units.
Jun 7 2019, 4:30 AM · Restricted Project
labath added a child revision for D62894: DWARF: Share line tables of type units: D63005: DWARF: Don't create lldb CompileUnits for DWARF type units.
Jun 7 2019, 4:30 AM · Restricted Project
labath created D63005: DWARF: Don't create lldb CompileUnits for DWARF type units.
Jun 7 2019, 4:30 AM · Restricted Project
labath planned changes to D62948: lit/Register: Avoid stdio in register write tests.

It looks like this problem is more widespread than we originally thought (a bunch of other tests are affected too). I'll need to think whether we can come up with a more general solution.

Jun 7 2019, 2:47 AM
labath committed rG15fec3a69cc0: Fix some signed/unsigned comparison warnings (authored by labath).
Fix some signed/unsigned comparison warnings
Jun 7 2019, 2:41 AM
labath committed rG62c905a2e6e3: DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnit (authored by labath).
DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnit
Jun 7 2019, 2:41 AM
labath committed rL362784: Fix some signed/unsigned comparison warnings.
Fix some signed/unsigned comparison warnings
Jun 7 2019, 2:40 AM
labath committed rL362783: DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnit.
DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnit
Jun 7 2019, 2:40 AM
labath closed D62943: DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnit.
Jun 7 2019, 2:40 AM · Restricted Project
labath added a comment to D62502: Implement xfer:libraries-svr4:read packet.

@labath that's a really good point. I've talked with @clayborg and @xiaobai about this and we decided it would be fine to do it manually as well so I added a XMLEncodeAttributeValue function to make it happen. I'm not 100% sure about its implementation.. Should I use a StreamString instead?

Jun 7 2019, 2:28 AM · Restricted Project, Restricted Project
labath added a comment to D62501: Implement GetSharedLibraryInfoAddress.

I think this is pretty good now. The only concern I have is about the placement NativeProcessTestUtils. The way you're including it now looks weird. I think we should put that in a separate place, as per the inline coment.

Jun 7 2019, 2:14 AM · Restricted Project, Restricted Project

Jun 6 2019

labath added a comment to D62501: Implement GetSharedLibraryInfoAddress.

Ok, makes sense, I'm happy that you've considered the dynamic loader sharing tradeoffs already. Let's go with the NativeProcessELF thingy then.

Jun 6 2019, 9:10 AM · Restricted Project, Restricted Project
labath updated the diff for D62948: lit/Register: Avoid stdio in register write tests.

revert the 32-on-64-bit part

Jun 6 2019, 8:47 AM
labath added a comment to D62948: lit/Register: Avoid stdio in register write tests.

Update other tests too. I also forgot to mention that this enables the 32-bit
tests to run on 64-bit platforms too by explicitly compiling for 32-bit (-m32).

I'm not sure if this is a good idea. I was thinking about it originally but I suspected it might cause failures on non-multilib systems.

Jun 6 2019, 8:36 AM
labath updated the diff for D62948: lit/Register: Avoid stdio in register write tests.

Update other tests too. I also forgot to mention that this enables the 32-bit
tests to run on 64-bit platforms too by explicitly compiling for 32-bit (-m32).

Jun 6 2019, 8:10 AM
labath added inline comments to D62948: lit/Register: Avoid stdio in register write tests.
Jun 6 2019, 6:27 AM
labath created D62948: lit/Register: Avoid stdio in register write tests.
Jun 6 2019, 6:11 AM
labath created D62943: DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnit.
Jun 6 2019, 1:40 AM · Restricted Project
labath added a comment to D62934: [LanguageRuntime] Introdce LLVM-style casts.

Implementing classof via an enum is the simplest and most common solution, but it is not the only thing possible. The central enum thingy is fine when all the subclasses are also defined centrally, but for a more distributed scenario like this one, it begins to smell, as now the LanguageRuntime class suddenly needs to be aware of all of its subclasses.

Jun 6 2019, 12:53 AM · Restricted Project

Jun 5 2019

labath added a comment to D62501: Implement GetSharedLibraryInfoAddress.

@labath while working on this I had to also move the GetAuxValue function into the NativeProcessELF, which I think it's fine. However, this means this class now depends on the AuxValue class defined in the PluginUtility. Initially I was going to put the NativeProcessELF in the lldbHost but it feels weird that this will now depend on a plugin, even if it's the utility one. Should I create a new ELF plugin just for this?

Jun 5 2019, 11:48 PM · Restricted Project, Restricted Project
labath added reviewers for D62931: [lldb-server] Add setting to force 'g' packet use: clayborg, jasonmolenda.

Personally, I'm wondering whether we even need a setting for this. Running the speed test command locally (i.e. the lowest latency we can possibly get), I get results like:

(lldb) process plugin packet speed-test --count 100000 --max-receive 2048
Testing sending 100000 packets of various sizes:
...
qSpeedTest(send=      4, recv=      0) in 0.788656771 s for 126797.88 packets/s (0.007886 ms per packet) with standard deviation of 0.001604 ms
qSpeedTest(send=      4, recv=      4) in 0.770005465 s for 129869.21 packets/s (0.007700 ms per packet) with standard deviation of 0.002120 ms
qSpeedTest(send=      4, recv=      8) in 0.895460367 s for 111674.40 packets/s (0.008954 ms per packet) with standard deviation of 0.002048 ms
qSpeedTest(send=      4, recv=     16) in 0.910367966 s for 109845.70 packets/s (0.009103 ms per packet) with standard deviation of 0.001886 ms
qSpeedTest(send=      4, recv=     32) in 0.889442623 s for 112429.96 packets/s (0.008894 ms per packet) with standard deviation of 0.001705 ms
qSpeedTest(send=      4, recv=     64) in 0.945124865 s for 105806.12 packets/s (0.009451 ms per packet) with standard deviation of 0.002349 ms
qSpeedTest(send=      4, recv=    128) in 0.759995580 s for 131579.72 packets/s (0.007599 ms per packet) with standard deviation of 0.002971 ms
qSpeedTest(send=      4, recv=    256) in 0.847535312 s for 117989.19 packets/s (0.008475 ms per packet) with standard deviation of 0.002629 ms
qSpeedTest(send=      4, recv=    512) in 1.022377729 s for  97811.21 packets/s (0.010223 ms per packet) with standard deviation of 0.003248 ms
qSpeedTest(send=      4, recv=   1024) in 1.436389208 s for  69619.02 packets/s (0.014363 ms per packet) with standard deviation of 0.000688 ms
qSpeedTest(send=      4, recv=   2048) in 1.910557270 s for  52340.75 packets/s (0.019105 ms per packet) with standard deviation of 0.001194 ms
...
Jun 5 2019, 11:19 PM · Restricted Project, Restricted Project
labath added a comment to D62501: Implement GetSharedLibraryInfoAddress.

Another advantage of having this in an abstract class is that you could test this in isolation, as NativeProcessProtocol is already setup to mock memory accesses: https://github.com/llvm-mirror/lldb/blob/master/unittests/Host/NativeProcessProtocolTest.cpp.

I might be missing something here, I'm not sure how having this in a NativeProcessELF class instead of NativeProcessLinux would make things easier for testing. Like you said, NativeProcessProtocol is the one set up to mock memory access. I still need to create my own MockProcessELF, which makes me think if there's a way to somehow reuse MockProcess to create MockProcessELF?

Jun 5 2019, 11:52 AM · Restricted Project, Restricted Project
labath created D62894: DWARF: Share line tables of type units.
Jun 5 2019, 2:25 AM · Restricted Project
labath committed rGda7f033693a7: Ignore DIEs in the skeleton unit in a DWO scenario (authored by labath).
Ignore DIEs in the skeleton unit in a DWO scenario
Jun 5 2019, 12:28 AM
labath committed rL362586: Ignore DIEs in the skeleton unit in a DWO scenario.
Ignore DIEs in the skeleton unit in a DWO scenario
Jun 5 2019, 12:28 AM
labath closed D62852: Ignore DIEs in the skeleton unit in a DWO scenario.
Jun 5 2019, 12:28 AM · Restricted Project
labath added inline comments to D62501: Implement GetSharedLibraryInfoAddress.
Jun 5 2019, 12:14 AM · Restricted Project, Restricted Project

Jun 4 2019

labath added a comment to D62502: Implement xfer:libraries-svr4:read packet.

Using the libxml function for the escaping is fine, but there are a couple of caveats. I believe people expect to be able to build lldb without libxml. At least that what all the existing xml-related code assumes (you'll see it has some #ifdefs and stuff). If we don't intend to change that, then we'll need to do something similar here. It's fine if some features (like this one) don't work without libxml, but they should degrade gracefully.

Jun 4 2019, 11:57 PM · Restricted Project, Restricted Project
labath added a comment to D62859: [CMake] Add special case for processing LLDB_DOTEST_ARGS.

An even better option would be to get the llvm build to export the fact whether it was built with a multi-config generator or not. Then the user wouldn't have to provide anything, and things would "just work". :)

Jun 4 2019, 11:26 AM · Restricted Project, Restricted Project
labath added inline comments to D62852: Ignore DIEs in the skeleton unit in a DWO scenario.
Jun 4 2019, 11:01 AM · Restricted Project
labath updated the diff for D62852: Ignore DIEs in the skeleton unit in a DWO scenario.
  • avoid parsing the extra DIEs in the first place
Jun 4 2019, 10:58 AM · Restricted Project
labath created D62852: Ignore DIEs in the skeleton unit in a DWO scenario.
Jun 4 2019, 4:40 AM · Restricted Project
labath added a comment to D62634: Improve DWARF parsing and accessing by 1% to 2%.
  1. We need to figure out whether there's a bug in clang and fix it. + @dblaikie for help with that

This is intentional behavior in clang (controllable under the -f[no-]split-dwarf-inlining flag, and modified by the -f[no-]debug-info-for-profiling flag).

This extra debug info is used for online symbolication (in the absence of .dwo files) - such as for the sanitizers (accurate symbolication is necessary for correctness in msan, due to msan's necessary use of blacklisting to avoid certain false positives) and some forms of sample based profiling collection.

In the default mode, clang includes, as you noted, just the subprograms that have inlined subroutines in them in this split-dwarf-inlining data.
In -fdebug-info-for-profiling all subprograms are described in the skeleton CU with some minimal attributes (they don't need parameters, local variables/scopes, etc) necessary to do certain profile things I don't know lots about.

Chances are it's probably best for a debugger to ignore these entries.

Jun 4 2019, 4:15 AM
labath added a comment to D62755: [Target] Remove Process::GetCPPLanguageRuntime.

So, what I'd do (and what I have been doing so far, but mainly as a passtime effort) was to cut the dependencies way lower that this. Ideally, I wouldn't want to include anything from the Target library in lldb-server, possibly by moving some stuff that lldb-server does need to use (MemoryRegionInfo) out of it.

Yeah, I'd like to see this happen as well. My efforts are twofold: Remove non-plugin libraries dependencies on plugin libraries, and move things out of the core libraries into plugins (and possibly new non-plugin libraries, if it makes sense). There are many dependency issues that I'm not yet aware of. I'm hoping to uncover more as I keep decoupling.

Jun 4 2019, 3:42 AM · Restricted Project
labath added a comment to D62502: Implement xfer:libraries-svr4:read packet.

@labath

Regarding the test, I am wondering whether requiring the /proc/%d/maps and the linker rendezvous structure to match isn't too strict of a requirement. Dynamic linkers (and particularly android dynamic linkers) do a lot of crazy stuff, and trying to assert this invariant exposes us to all kinds of "optimizations" that the linkers do or may do in the future. I'm wondering if it wouldn't be better to just build an executable with one or two dependent libraries, and then just assert that their entries are present in the library list. However, I'm not completely sure on this, so I'd like to hear what you think about that..

Yeah, that was actually my first idea for the test but then realized we already had that main.c all set up and ready to use so I decide to use proc maps instead. I was not aware that things like that could happen (although I had a suspicion this might be brittle) so let me revisit this.

Jun 4 2019, 2:14 AM · Restricted Project, Restricted Project
labath updated subscribers of D62501: Implement GetSharedLibraryInfoAddress.

+@mgorny, @krytarowski in case they know anything interesting about dynamic linkers.

Jun 4 2019, 1:17 AM · Restricted Project, Restricted Project

Jun 3 2019

labath accepted D62500: Add support to read aux vector values.
Jun 3 2019, 11:13 PM · Restricted Project, Restricted Project