Page MenuHomePhabricator
Feed Advanced Search

Yesterday

labath added a comment to D55142: Minidump debugging using the native PDB reader.

This looks fine to me. The test is a bit more coarse-grained than I'd like, though I can't think of a substantially better approach right now. One of the pdb folks should ok this too.

Mon, Dec 10, 11:23 AM · Restricted Project
labath added a comment to D55434: ObjectFileBreakpad: Implement sections.

Ok. Check out my changes that parse region info:
https://reviews.llvm.org/D55522

It parses the memory region info from the linux maps info if it is available. In breakpad generated minidumps, this will give us enough info to correctly create sections for all object files in case #3!

Mon, Dec 10, 10:56 AM
labath added a comment to D55522: Cache memory regions in ProcessMinidump and use the linux maps as the source of the information if available..

This patch certainly provides a more comprehensive treatment of memory region information in minidump. However, there might be some value in removing the excessive shared_ptrs in the other patch. I think that should be evaluated separately.

Mon, Dec 10, 10:49 AM
labath committed rLLDB348780: Fix r348773.
Fix r348773
Mon, Dec 10, 10:21 AM
labath committed rL348780: Fix r348773.
Fix r348773
Mon, Dec 10, 10:21 AM
labath added a comment to D55434: ObjectFileBreakpad: Implement sections.

If you plan on not making the breakpad file ever stand alone, then you will need to take any addresses and look them up in the module section list and use the other sections. I don't see why the breakpad file can't be stand alone though. It won't be as accurate, but it sure would be nice to be able to load a bunch of them into LLDB without needing to find the original executable and just symbolicate no?

Mon, Dec 10, 10:16 AM
labath committed rLLDB348773: Re-commit "Introduce ObjectFileBreakpad".
Re-commit "Introduce ObjectFileBreakpad"
Mon, Dec 10, 9:21 AM
labath committed rL348773: Re-commit "Introduce ObjectFileBreakpad".
Re-commit "Introduce ObjectFileBreakpad"
Mon, Dec 10, 9:21 AM
labath accepted D55457: Do not use PATH_MAX with SmallString.
Mon, Dec 10, 9:05 AM
labath added a comment to D55384: [NativePDB] Reconstruct FunctionDecl AST nodes from PDB debug info.

I considered this, and we actually have a test that does (see s_constant.s). The reason I didn't do it here because my experience writing s_constant.s taught me just how difficult it is to write these assembly files.

However, now I have a new idea. We can teach llvm-pdbutil to dump its output exactly in llvm assembly format, so the output can just be copy-pasted into a .s file. Then, we can build something with MSVC, dump it to .s format, and paste individual records into a test and mix and match them as necessary to create all the interesting cases.

For the purposes of this test, we don't even need to run the program, so it actually doesn't even matter if the addresses in the debug info records are correct. All we care about is that the AST is reconstructed correctly. I'll add this to my todo list because I think it would be a really useful feature.

Mon, Dec 10, 9:05 AM
labath added a comment to D55472: Speadup memory regions handling and cleanup related code.

Woohoo for speedups.

Mon, Dec 10, 9:00 AM · Restricted Project
labath accepted D55013: [CMake] Streamline code signing for debugserver #2.

This looks much better. Thanks.

Mon, Dec 10, 7:55 AM

Fri, Dec 7

labath added inline comments to D55328: [CMake] Revised LLDB.framework builds.
Fri, Dec 7, 10:40 AM
labath added a comment to D55434: ObjectFileBreakpad: Implement sections.

I guess I should elaborate more on the direction where I am going with this. I am trying to model these breakpad files as a debug-info-only object file, like something you would get by running say strip --only-keep-debug. This object file will contain a bunch of sections, but none of them will be real loadable sections. They will basically just be containers for data (DWARF, most likely). Like the .debug_*** sections, my sections also have vm_size set to 0, so there no notion of them being in memory or being slid around. The idea is that this file will never be used as the main object file for a module (*), but rather an object file that a symbol vendor uses to add symbol information to the module.

Fri, Dec 7, 10:29 AM
labath added a comment to D55328: [CMake] Revised LLDB.framework builds.

Printing the warning would definitely be nice.

Fri, Dec 7, 7:29 AM
labath updated the diff for D55361: Move Broadcaster+Listener+Event combo from Core into Utility.

Thanks for the review.

Fri, Dec 7, 7:25 AM
labath created D55434: ObjectFileBreakpad: Implement sections.
Fri, Dec 7, 7:08 AM
labath committed rLLDB348592: Introduce ObjectFileBreakpad.
Introduce ObjectFileBreakpad
Fri, Dec 7, 6:24 AM
labath committed rL348592: Introduce ObjectFileBreakpad.
Introduce ObjectFileBreakpad
Fri, Dec 7, 6:23 AM
labath closed D55214: Introduce ObjectFileBreakpad.
Fri, Dec 7, 6:23 AM
labath created D55430: build.py: Implement "gcc" builder.
Fri, Dec 7, 5:59 AM
labath planned changes to D55356: Add a method to get the "base" file address of an object file.

This is already available with:

virtual lldb_private::Address ObjectFile::GetHeaderAddress();

It return a lldb_private::Address which is section offset, but nothing stopping us from returning a lldb_private::Address with no section and just the file address. For mach-o the mach header is in the __TEXT segment, but not true for other file formats. I am ok if we need to rename "GetHeaderAddress()" to something else.

Fri, Dec 7, 3:26 AM
labath added a comment to D55422: Rename ObjectFile::GetHeaderAddress to GetBaseAddress.

Adding a bunch of people to make sure this makes sense for all object formats (I am particularly oblivious to how COFF works). If this makes sense, I'll implement this function in ObjectFilePECOFF and ELF to return the "image base" and "base address" respectively.

Fri, Dec 7, 3:23 AM
labath created D55422: Rename ObjectFile::GetHeaderAddress to GetBaseAddress.
Fri, Dec 7, 3:14 AM
labath added a comment to D55384: [NativePDB] Reconstruct FunctionDecl AST nodes from PDB debug info.

Clang-cl emits S_LOCAL symbols while MSVC emits S_REGREL32 and S_REGISTER symbols. So, to get more test coverage, I added an MSVC test as well.

Fri, Dec 7, 1:17 AM
labath added a comment to D55383: Implement basic DidAttach for DynamicLoaderWindowsDYLD for use with ds2.

I am afraid I know know much about windows, or ds2. The thing I noticed is that this only seems to set the address of the main executable. Don't you also need to set the load address of loaded shared libraries (if any)?

Fri, Dec 7, 12:53 AM
labath added a comment to D55328: [CMake] Revised LLDB.framework builds.

This looks fine to me. I don't know much about frameworks, but I think it makes things cleaner by grouping all the framework-related code together.

Fri, Dec 7, 12:25 AM

Thu, Dec 6

labath updated the diff for D55361: Move Broadcaster+Listener+Event combo from Core into Utility.

That's a good point, thanks for reminding me.

Thu, Dec 6, 3:27 AM
labath created D55361: Move Broadcaster+Listener+Event combo from Core into Utility.
Thu, Dec 6, 3:06 AM
labath committed rL348479: Make scripts/analyzer-project-deps compatible with python3.
Make scripts/analyzer-project-deps compatible with python3
Thu, Dec 6, 2:30 AM
labath committed rLLDB348479: Make scripts/analyzer-project-deps compatible with python3.
Make scripts/analyzer-project-deps compatible with python3
Thu, Dec 6, 2:30 AM
labath committed rLLDB348476: Remove REQUIRES: darwin from a couple of MachO tests.
Remove REQUIRES: darwin from a couple of MachO tests
Thu, Dec 6, 1:45 AM
labath committed rL348476: Remove REQUIRES: darwin from a couple of MachO tests.
Remove REQUIRES: darwin from a couple of MachO tests
Thu, Dec 6, 1:44 AM
labath committed rLLDB348474: disable toolchain-clang-cl.test on non-windows.
disable toolchain-clang-cl.test on non-windows
Thu, Dec 6, 1:42 AM
labath committed rL348474: disable toolchain-clang-cl.test on non-windows.
disable toolchain-clang-cl.test on non-windows
Thu, Dec 6, 1:42 AM
labath created D55356: Add a method to get the "base" file address of an object file.
Thu, Dec 6, 1:32 AM
labath added a comment to D55142: Minidump debugging using the native PDB reader.

I agree with both comments. The intention is to add some tests but I wanted to get the review out early to surface concerns, if any. I also needed more time to investigate a few complex failures uncovered by this change (ex. https://bugs.llvm.org/show_bug.cgi?id=39882 and https://bugs.llvm.org/show_bug.cgi?id=39897)

Yes, this change can also be split in three parts: the reason it's bundled up in this review is that all three parts are required to enable the basic functionality (and overall it's a relatively small change). Maybe it was better if I sent out the parts separately, but right now I'd like to preserve the continuity in the review comments.
I'm about to send out a new revision and once this review satisfies all the comments I'll split it out and send individual reviews.

Thu, Dec 6, 1:05 AM · Restricted Project
labath added a comment to D55318: [Expressions] Add support of expressions evaluation in some object's context.

Sounds like an interesting feature to me.

Thu, Dec 6, 12:05 AM · Restricted Project

Wed, Dec 5

labath added inline comments to D55214: Introduce ObjectFileBreakpad.
Wed, Dec 5, 7:26 AM
labath added inline comments to D55214: Introduce ObjectFileBreakpad.
Wed, Dec 5, 3:06 AM
labath updated the diff for D55214: Introduce ObjectFileBreakpad.

Updated according to review comments.

Wed, Dec 5, 3:05 AM

Tue, Dec 4

labath added a reviewer for D55214: Introduce ObjectFileBreakpad: markmentovai.
Tue, Dec 4, 6:15 AM
labath updated the diff for D55214: Introduce ObjectFileBreakpad.
  • implement the module_id/code_id logic suggested by Mark Mentovai
  • fix module_id endianness handling to make sure the UUID matches the one we get from the minidump files
Tue, Dec 4, 6:10 AM
labath committed rLLDB348261: Fix lldb-server unit tests for the MonitoringProcessLauncher refactor.
Fix lldb-server unit tests for the MonitoringProcessLauncher refactor
Tue, Dec 4, 6:07 AM
labath committed rL348261: Fix lldb-server unit tests for the MonitoringProcessLauncher refactor.
Fix lldb-server unit tests for the MonitoringProcessLauncher refactor
Tue, Dec 4, 6:07 AM
labath added a comment to D55122: [PDB] Fix location retrieval for function local variables and arguments that are stored relative to VFRAME.

Is this true? Is it not possible for a program to depend on a value of a register which will be defined later?

I am not totally sure about this, but all valid fpo programs that I've seen in existing pdb support this invariant.
So I think that we can assume that every assignment depends only to precedent statements.

Tue, Dec 4, 4:41 AM · Restricted Project
labath added a comment to D55122: [PDB] Fix location retrieval for function local variables and arguments that are stored relative to VFRAME.

Thank you. I like the tests a lot. I think I'll steal the implementation of this when I get around to parsing breakpad unwind instructions. ;)

Tue, Dec 4, 3:19 AM · Restricted Project
labath accepted D55240: [FileSystem] Migrate CommandCompletions.

Looks good, modulo the filesystem copy comment.

Tue, Dec 4, 2:41 AM · Restricted Project

Mon, Dec 3

labath added inline comments to D55214: Introduce ObjectFileBreakpad.
Mon, Dec 3, 5:56 AM
labath created D55214: Introduce ObjectFileBreakpad.
Mon, Dec 3, 5:27 AM
labath accepted D55038: [Reproducers] Change how reproducers are initialized..

I think the canonical way to do that would be to define a new feature in lit, which gets set when the target supports remote debugging and then use that feature in the REQUIRES directive.

I've changed the check to non-windows (as it wouldn't compile there anyway). Is there anything not covered by this that would warrant this new feature?

Mon, Dec 3, 1:23 AM · Restricted Project
labath added a comment to D55142: Minidump debugging using the native PDB reader.

I don't see any tests :(.

Mon, Dec 3, 1:08 AM · Restricted Project
labath accepted D53094: [pecoff] Implement ObjectFilePECOFF::GetDependedModules().

Thanks for adding the test. looks good to me.

Mon, Dec 3, 1:01 AM

Fri, Nov 30

labath added a comment to D55122: [PDB] Fix location retrieval for function local variables and arguments that are stored relative to VFRAME.

I like how you've separated out the conversion function doing the actual conversion. That should make it easy to write unit tests for it (including tests for malformed input). Can you add something like that? I am particularly interested in what will the merging code do when it encounters reference loops.

Fri, Nov 30, 9:22 AM · Restricted Project
labath added a comment to D55038: [Reproducers] Change how reproducers are initialized..

Test didn't run. Is there a way to REQUIRE either darwin or linux?

Fri, Nov 30, 4:06 AM · Restricted Project

Thu, Nov 29

labath added a comment to D53368: [Symbol] Search symbols with name and type in a symbol file.

On 29/11/2018 21:29, Leonard Mosescu wrote:

Hi Aleksandr, yes, no objections to this patch.

I was responding to Pavel's comments, which I also assume are
forward-looking as well, not strictly related to this patch.

Thu, Nov 29, 12:40 PM · Restricted Project
labath added a comment to D53368: [Symbol] Search symbols with name and type in a symbol file.

Great observations Pavel! I think it's really important to have
orthogonal/composable abstractions here: the symbols should be decoupled
from the container format IMO.

You know more about the ObjectFile than me so I can't say if
ObjectFileBreakpad is the best interface, but here are my initial
observations (in a somewhat random order):

Even though it doesn't sound like that, ironically, Breakpad might be now better of as an ObjectFile rather than a SymbolFile. The main three pieces of information contained in breakpad files are:

  • list of symbols
  • unwind information
  • line tables

Of these, the first two are presently vended by object files, and only the line table is done by symbol files. The auxiliary pieces of information in the breakpad files (architecture, OS, UUID), are also a property of object files in lldb.

Thu, Nov 29, 12:30 PM · Restricted Project
labath added a comment to D53368: [Symbol] Search symbols with name and type in a symbol file.

I've recently started looking at adding a new symbol file format (breakpad symbols). While researching the best way to achieve that, I started comparing the operation of PDB and DWARF symbol files. I noticed a very important difference there, and I think that is the cause of our problems here. In the DWARF implementation, a symbol file is an overlay on top of an object file - it takes the data contained by the object file and presents it in a more structured way.

However, that is not the case with PDB (both implementations). These take the debug information from a completely different file, which is not backed by an ObjectFile instance, and then present that. Since the SymbolFile interface requires them to be backed by an object file, they both pretend they are backed by the original EXE file, but in reality the data comes from elsewhere.

Don't DWARF DWP files work this way as well? How is support for this implemented in LLDB?

There are some similarities, but DWP is a bit different. The main difference is that the DWP file is still an ELF (or whatever) file, so we still have a ObjectFile sitting below the symbol file. The other difference is that in case of DWP we still have a significant chunk of debug information present in the main executable (mainly various offsets that need to be applied to the unlinked debug info in the dwo/dwp files), so you can still very well say that the symbol file is reading information from the main executable. What DWARF does in this case is it creates a main SymbolFileDWARF for reading data from the main object file, and then a bunch of inner SymbolFileDWARFDwo/Dwp instances which read data from the other files. There are plenty of things to not like here as well, but at least this maintains the property that each symbol file sits on top of the object file from which it reads the data from. (and symtab doesn't go into the dwp file, so there are no issues with that).

Thu, Nov 29, 12:09 PM · Restricted Project
labath added a comment to D53368: [Symbol] Search symbols with name and type in a symbol file.

I've recently started looking at adding a new symbol file format (breakpad symbols). While researching the best way to achieve that, I started comparing the operation of PDB and DWARF symbol files. I noticed a very important difference there, and I think that is the cause of our problems here. In the DWARF implementation, a symbol file is an overlay on top of an object file - it takes the data contained by the object file and presents it in a more structured way.

Thu, Nov 29, 10:55 AM · Restricted Project
labath committed rLLDB347855: Fix windows build broken by r347846.
Fix windows build broken by r347846
Thu, Nov 29, 3:56 AM
labath committed rL347855: Fix windows build broken by r347846.
Fix windows build broken by r347846
Thu, Nov 29, 3:56 AM
labath added a comment to D54914: Add a generic build script for building test inferiors.

I think it would be good to use the way dotest works as a starting point. You can specify --arch, and then you can run the test on multiple arches this way by running dotest several times in succession, each with different arch flags.

I think a --triple option could be useful in limited scenarios, but I think that most of the use cases will not need it. Most tests will probably want to specify nothing at all and let the lit configuration pass the correct information through. Actually, I think this is the same with the --arch flag though. Because as soon as you specify something, then it limits the ability of the test to run over and over with different parameters.

Thu, Nov 29, 3:02 AM
labath committed rL347846: Remove getopt includes from the driver.
Remove getopt includes from the driver
Thu, Nov 29, 2:48 AM
labath committed rLLDB347846: Remove getopt includes from the driver.
Remove getopt includes from the driver
Thu, Nov 29, 2:48 AM
labath added a comment to D55038: [Reproducers] Change how reproducers are initialized..

I have a lot of comments, but I think they're mostly cosmetic. I think the general idea here is good.

Thu, Nov 29, 2:21 AM · Restricted Project

Wed, Nov 28

labath added a comment to D54914: Add a generic build script for building test inferiors.

I would like to ask a general question that I (indirectly) also asked in D54731: Why do we want to implement support for building inferiors in LIT-based tests? IMHO, if we need to support for dealing with specific compilers, we should implement that once in Makefile.rules (which is in a declarative domain-specific-language for describing build logic) and write a dotest.py-style test instead. I'm assuming here that we need the support in Makefile.rules anyway to support the bulk of the tests. Having this support in two places increases the maintenance effort and cognitive load.

Wed, Nov 28, 5:00 AM
labath added a comment to D54914: Add a generic build script for building test inferiors.

I didn't look at the code in detail, as most of it deals with windows stuff, and I don't know much about those anyway. However, the interesting question for me would be how to make this useful for cross-compiling. Right now that sort of works for NativePDB tests because --compiler=clang-cl implies windows, but that won't help if I want to compile say a linux arm64 binary. I think that instead --arch, we should have a --triple argument, which specifies the exact target you want to build for. That can default to "host", and we can have special pseudo-triples like "host32" and "host64", if we want to be able to say "I want to build for a 32-bit flavour of the host arch". That could also make gcc detection easier, since you could just search for $triple-gcc.

A triple is one way. I don't know much about gcc, does it support the same triple format as clang?

Gcc is different that clang in that the target triple is baked into the binary. For example, on my machine, I have a binary called x86_64-pc-linux-gnu-gcc (gcc is just a symlink to that), which always produces binaries for x86_64 linux. If I had a arm64 cross-gcc installed, it would be called something like aarch64-linux-gnu-gcc and so on. So the actual mechanism to search for the compiler and invoke it will be different, but a triple is still a good starting point.

Also, are there any existing use cases for specifying a triple in the lit test suite?

You can take a look at the tests in lit/SymbolFile/DWARF. Their purpose is very similar to the NativePDB tests -- check the operation of the dwarf parser, regardless of the host platform. Since mac uses a somewhat different flavour of dwarf than other platforms, the sources are usually compiled twice, targetting linux and mac.

Wed, Nov 28, 4:41 AM

Tue, Nov 27

labath added a comment to D54616: [Reproducers] Improve reproducer API and add unit tests..

I haven't been following the reproducer work in detail, but this seems reasonable to me. Thanks for incorporating my drive-by suggestions.

Tue, Nov 27, 12:07 PM · Restricted Project
labath committed rCXXA347670: [Demangle] remove itaniumFindTypesInMangledName.
[Demangle] remove itaniumFindTypesInMangledName
Tue, Nov 27, 9:10 AM
labath committed rL347670: [Demangle] remove itaniumFindTypesInMangledName.
[Demangle] remove itaniumFindTypesInMangledName
Tue, Nov 27, 8:14 AM
labath closed D54893: [Demangle] remove itaniumFindTypesInMangledName.
Tue, Nov 27, 8:14 AM
labath added inline comments to D53759: [PDB] Support PDB-backed expressions evaluation.
Tue, Nov 27, 7:36 AM · Restricted Project
labath added a comment to D54914: Add a generic build script for building test inferiors.

I didn't look at the code in detail, as most of it deals with windows stuff, and I don't know much about those anyway. However, the interesting question for me would be how to make this useful for cross-compiling. Right now that sort of works for NativePDB tests because --compiler=clang-cl implies windows, but that won't help if I want to compile say a linux arm64 binary. I think that instead --arch, we should have a --triple argument, which specifies the exact target you want to build for. That can default to "host", and we can have special pseudo-triples like "host32" and "host64", if we want to be able to say "I want to build for a 32-bit flavour of the host arch". That could also make gcc detection easier, since you could just search for $triple-gcc.

Tue, Nov 27, 7:27 AM
labath added inline comments to D54692: [Driver] Use libOption with tablegen..
Tue, Nov 27, 6:55 AM · Restricted Project

Mon, Nov 26

labath added a comment to D54692: [Driver] Use libOption with tablegen..

Another reason for using libOption is that it is also usable as a parser for the lldb command line, whereas cl::opt is definitely not (it uses global variables). And there's value in consistency between the lldb driver and the built-in command line.

This is true too. Although I believe libOption doesn't support subcommands, which would be required in order to use it for the interactive lldb command line, but again, there would be value in adding that to libOption outside of llvm (cl::opt supports it, so it's required in order to port some remaining llvm tools to libOption)

Mon, Nov 26, 9:32 AM · Restricted Project
labath added a comment to D54692: [Driver] Use libOption with tablegen..

There’s actually been a slow push away from cl::opt. It’s less flexible
and doesn’t support some things that the TableGen approach does.
Recently there’s been a few efforts to port existing tools onto TableGen
options from cl::opt.

I don’t think cl::opt is going away anytime soon so if it works I don’t
have a strong opinion, but it’s kinda nice to standardize on “the one
true method” if that’s the direction things are heading anyway

Mon, Nov 26, 8:59 AM · Restricted Project
labath added a comment to D28305: [Host] Handle short reads and writes, take 3.

This is a stale patch which I am abandoning. I am just cleaning up my queue.

Mon, Nov 26, 7:29 AM
labath created D54893: [Demangle] remove itaniumFindTypesInMangledName.
Mon, Nov 26, 3:35 AM
labath abandoned D50599: [VERY-WIP] [ItaniumDemangle] Add ability to re-serialize the parsed AST .
Mon, Nov 26, 3:02 AM
labath abandoned D28305: [Host] Handle short reads and writes, take 3.
Mon, Nov 26, 2:59 AM
labath resigned from D40869: Optimize fake ELF section lookup while parsing symbols in ObjectFileELF.
Mon, Nov 26, 2:59 AM
labath resigned from D40930: Don't add a dependency on the backtrace library if it can't be found..
Mon, Nov 26, 2:57 AM
labath resigned from D33167: Get rid of some uses of StringConvert and reduce some indentation.
Mon, Nov 26, 2:56 AM
labath resigned from D32597: Initiate loading of shared libraries in parallel.
Mon, Nov 26, 2:54 AM
labath accepted D54863: [ASTImporter] Set MustBuildLookupTable on PrimaryContext.

The change looks pretty safe to me. Adding Greg in case he has any concerns.

Mon, Nov 26, 2:08 AM
labath added inline comments to D54843: [Expr] Check the language before ignoring Objective C keywords.
Mon, Nov 26, 2:02 AM · Restricted Project
labath added a comment to D54386: Disable for new Linux OS runs: upload test traces.

This is fine for enabling the usage of the buildbot factory for bots which do not have the same setup as the (now-mostly-unmaintained "linux cmake" buildbot). However, I would still recommend to create a new factory with a setup more similar to the other llvm bots, as this factory is very unlike any other existing llvm bots. Plus it uses a deprecated flow for running tests -- it uses dotest.py as a driver while tests are now normally run through lit.

Mon, Nov 26, 1:52 AM · Restricted Project

Wed, Nov 21

labath added a comment to D54731: [lit] Enable the use of custom user-defined lit commands.

I'd go with the "conservative" approach first. The idea of having lldb loaded inside a lit process does not excite me. One of the problems we have with dotest is that when lldb crashes during the test, it takes a part of the test driver with it which causes some tests to be skipped and the complicates the reporting of the result of the crashed test. It's not as bad right now, as there is still the main process left to report some kind of an error (back in the days when tests were run sequentially in a single process, the entire test suite would just stop), but I still think it would be nice to avoid these issues in the new framework.

Wed, Nov 21, 12:59 PM
labath added a comment to D54731: [lit] Enable the use of custom user-defined lit commands.

I think that something like this would go a long way towards solving the problems with lit tests we're having in lldb.

Wed, Nov 21, 4:52 AM

Mon, Nov 19

labath added a comment to D54617: [Reproducers] Add file provider.

I am confused by differing scopes of various objects that are interacting here. It seems you are implementing capture/replay as something that can be flicked on/off at any point during a debug session (Debugger lifetime). However, you are modifying global state (the filesystem singleton, at least), which is shared by all debug sessions. If multiple debug sessions try to enable capture/replay (or even access the filesystem concurrently, as none of this is synchronized in any way), things will break horribly. This seems like a bad starting point in implementing a feature, as I don't see any way to fix incrementally in the future.

Maybe I should've added a comment (I didn't want to litter the code with design goals) but the goal of the commands is not really to enable/disable the reproducer feature. I'm currently abusing the commands to do that, but the long term goal is that you can enable/disable part of the reproducer. For example, you could say only capture GDB packets or capture only files. It makes testing a lot easier if you can isolate a single source of information. Since there's currently only GDB packets I didn't split it up (yet).

Also I piggy-backed off this to enable/disable the feature as a whole because I needed to go through the debugger. See my reply below on why and how that'll be fixed by the next patch :-)

Mon, Nov 19, 6:23 AM · Restricted Project
labath added inline comments to D54616: [Reproducers] Improve reproducer API and add unit tests..
Mon, Nov 19, 6:01 AM · Restricted Project
labath added a comment to D54682: [Driver] Extract option parsing and option processing..

If by "it would cause errors to no longer appear in the same order as specified by the user, but in an arbitrary order specified by the driver implementation", you mean that now for a command line like:

$ new/lldb -S /tmp/sadg --file /tmp/qwr

I get

error: file specified in --file (-f) option doesn't exist: '/tmp/qwr'

instead of

error: file specified in --source (-s) option doesn't exist: '/tmp/sadg'

then that's something I really don't care about.

Mon, Nov 19, 5:46 AM · Restricted Project

Sun, Nov 18

labath added a comment to D54617: [Reproducers] Add file provider.

I am confused by differing scopes of various objects that are interacting here. It seems you are implementing capture/replay as something that can be flicked on/off at any point during a debug session (Debugger lifetime). However, you are modifying global state (the filesystem singleton, at least), which is shared by all debug sessions. If multiple debug sessions try to enable capture/replay (or even access the filesystem concurrently, as none of this is synchronized in any way), things will break horribly. This seems like a bad starting point in implementing a feature, as I don't see any way to fix incrementally in the future.

Sun, Nov 18, 10:40 AM · Restricted Project

Thu, Nov 15

labath added inline comments to D54476: [CMake] Streamline code signing for debugserver.
Thu, Nov 15, 9:09 AM

Wed, Nov 14

labath committed rL346867: Move DataExtractorTest to unittests/Utility.
Move DataExtractorTest to unittests/Utility
Wed, Nov 14, 7:01 AM
labath committed rLLDB346867: Move DataExtractorTest to unittests/Utility.
Move DataExtractorTest to unittests/Utility
Wed, Nov 14, 7:01 AM
labath committed rLLDB346849: Fix a crash when parsing incorrect DWARF.
Fix a crash when parsing incorrect DWARF
Wed, Nov 14, 3:15 AM
labath committed rL346849: Fix a crash when parsing incorrect DWARF.
Fix a crash when parsing incorrect DWARF
Wed, Nov 14, 3:15 AM
labath closed D54417: Fix a crash when parsing incorrect DWARF.
Wed, Nov 14, 3:15 AM

Mon, Nov 12

labath created D54417: Fix a crash when parsing incorrect DWARF.
Mon, Nov 12, 2:00 AM