[Lldb-commits] [PATCH] D146779: Fix handling of backticks in CommandObjectParsed commands

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 23 18:23:13 PDT 2023


jingham created this revision.
jingham added reviewers: JDevlieghere, bulbazord, kastiglione.
Herald added a project: All.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

A while back I reworked the way that backticks are handled to make backticks in aliases work, but I made two bad assumptions and broke the handling for parsed commands.  The bad assumptions were:

1. There was testing for backticks in regular commands (turns out the extant tests were all for raw commands)
2. That the extant function that was supposed to handle backtick options did the thing you do with backtick options

2 is me not reading closely enough.  The function called was m_interpreter.ProcessEmbeddedScriptCommands so I really should have seen this wasn't doing the right thing.  Apparently at some point we were going to add the ability to invoke a script command and insert its text in place of the option.  That's not a bad idea, but it was never actually implemented, and anyway, you can't use backticks as the demarcation - that's already taken for expression substitution.

This patch repairs that breakage, and adds some more tests for backticks in raw commands, in the arguments of parsed commands and in the option values for parsed commands.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146779

Files:
  lldb/include/lldb/Interpreter/CommandInterpreter.h
  lldb/source/Interpreter/CommandInterpreter.cpp
  lldb/source/Interpreter/CommandObject.cpp
  lldb/test/API/commands/command/backticks/TestBackticksInAlias.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146779.507933.patch
Type: text/x-patch
Size: 14226 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230324/a899573e/attachment-0001.bin>


More information about the lldb-commits mailing list