To test this I created a crashing program and ran it from /tmp then moved it to <cwd>/foo/. If I saw symbols in the backtrace I assumed it had found the program file. I assume that roughly models your use case.
I could get symbols and bt with above steps.
Thanks DavidSpickett!
Got few more queries:
(A) When libs are in sub-dirs – /tmp/dir1/, /tmp/dir2, /tmp/dir3, then just specifying
–one-line-before-file “settings append target.exec-search-paths “/tmp” “/home/david.spickett/build-llvm-aarch64/foo””
“/tmp” in above line didn’t work.
To make it work I need to pass /tmp/dir1, /tmp/dir2 etc.
Do we have any alternatives?
(B) Is there a plan to make it one-to-one command mapping with GDB ?
Or at least aliases?
(C) Any guidance on migrating from GDB to LLDB, specific to historical-core-analysis, is welcome
At a glance, it does not search folders within folders only path + filename. Unlike the source path substitutions which do work as you expected.
Not sure if they should be doing a deeper search, I haven’t done enough of this to say. I suppose the use case if supplying sysroot/lib/ where all the libs are in a flat folder.
Alternatives, not to my knowledge.
Can you raise an issue for this? (Issues · llvm/llvm-project · GitHub) At least we can get the justification for the current behavior on record.
No plans to achieve one to one but there are some existing aliases like p that accept the GDB style formatting arguments.
Raise an issue/propose a patch (Contributing to LLVM — LLVM 16.0.0git documentation) /post here again if you have some ideas. If some commands act almost the same it seems like a decent thing to do. If we have to emulate a whole new command style, then no.
Not from me unfortunately, the Apple folks will have more practical experience I think. Keep asking questions here you might catch their attention