[Lldb-commits] [lldb] [LLDB] Add a target.launch-working-dir setting (PR #113521)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 30 02:59:48 PDT 2024


DavidSpickett wrote:

`launch-working-dir` sounds like `working-dir` to me. Do we need the `launch` prefix? Should this be `target.process` not `target`?

This issue could be re-stated as "a process launched with -w does not use the same working dir if run again". Which I think is certainly unexpected behaviour as a user. Did you look into making `run` of the process just re-use the working dir that was set up front?

The way I see it this splits in two:
* One use case is saying "I'm running lldb from X but I want to launch all processes as if they were in Y" - where that might be the same program or many different programs across a single session.
  * Which you could also automate with `cd <workingdir> && <path-to>/lldb/`. Would that work in your system?
* `process launch -w`'d processes should not forget their initial working dir when re-run.

Feels like you are solving one problem using the solution of a different problem.

https://github.com/llvm/llvm-project/pull/113521


More information about the lldb-commits mailing list