llvm-project/lldb
Raphael Isemann 9bc34636a5
[lldb] Add support for escaping fish arguments
LLDB supports having globbing regexes in the process launch arguments
that will be resolved using the user's shell. This requires that we pass
the launch args to the shell and then read back the expanded arguments
using LLDB's argdumper utility.

As the shell will not just expand the globbing regexes but all special
characters, we need to escape all non-globbing charcters such as $, &,
<, >, etc. as those otherwise are interpreted and removed in the step
where we expand the globbing characters. Also because the special
characters are shell-specific, LLDB needs to maintain a list of all the
characters that need to be escaped for each specific shell.

This patch adds the list of special characters that need to be escaped
for fish. Without this patch on systems where fish is the user's shell
having any of these special characters in your arguments or path to
the binary will cause the process launch to fail. E.g., `lldb -- ./calc
1<2` is failing without this patch. The same happens if the absolute
path to calc is in a directory that contains for example parentheses
or other special characters.

Differential revision: https://reviews.llvm.org/D104635
2022-07-11 16:44:46 -07:00
..
bindings Add LoadTraceFromFile to SBDebugger and SBTrace 2022-06-20 11:54:47 -07:00
cmake [lldb] Disable modules in Apple-lldb-base 2022-05-24 17:17:14 -07:00
docs [lldb] Delete more mydir references (NFC) 2022-07-10 18:56:06 -07:00
examples [lldb/crashlog] Show help when the command is called without any argument 2022-06-10 13:44:43 -07:00
include/lldb Revert "[LLDB][NFC] Decouple dwarf location table from DWARFExpression." 2022-07-07 16:36:10 -07:00
packages/Python/lldbsuite [lldb] Use the just-built libc++ for testing the LLDB data formatters 2022-07-11 14:49:24 -07:00
resources
scripts Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
source [lldb] Add support for escaping fish arguments 2022-07-11 16:44:46 -07:00
test [lldb] Use the just-built libc++ for testing the LLDB data formatters 2022-07-11 14:49:24 -07:00
third_party/Python/module [lldb][NFC] Inclusive language: replace master/slave names for ptys 2021-11-12 10:54:18 -06:00
tools Revert "jGetLoadedDynamicLibrariesInfos can inspect machos not yet loaded" 2022-07-11 09:25:14 -07:00
unittests [lldb] Add support for escaping fish arguments 2022-07-11 16:44:46 -07:00
utils [lldb] Match test dependencies name to other LLVM projects. 2021-05-21 00:10:27 -07:00
.clang-format
.clang-tidy [LLDB] Applying clang-tidy modernize-use-override over LLDB 2022-04-22 13:29:47 -07:00
.gitignore
CMakeLists.txt [cmake] Make include(GNUInstallDirs) always below project(..) 2022-01-20 18:59:17 +00:00
CODE_OWNERS.txt [CODE OWNERS] Add wallace as code owner 2022-01-12 12:36:30 -08:00
LICENSE.TXT
use_lldb_suite_root.py