[all-commits] [llvm/llvm-project] 82093e: [lldb/Driver] Fix handling on positional arguments

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Mon May 18 18:52:35 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 82093e8fb7d65486ff450d33bf386aabd0d194f7
      https://github.com/llvm/llvm-project/commit/82093e8fb7d65486ff450d33bf386aabd0d194f7
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-05-18 (Mon, 18 May 2020)

  Changed paths:
    M lldb/docs/man/lldb.rst
    M lldb/test/Shell/Driver/TestNoUseColor.test
    A lldb/test/Shell/Driver/TestPositionalArgs.test
    M lldb/tools/driver/Driver.cpp

  Log Message:
  -----------
  [lldb/Driver] Fix handling on positional arguments

Before the transition to libOption it was possible to specify arguments
for the inferior without -- as long as they didn't start with a dash.

For example, the following invocations should all behave the same:

  $ lldb inferior inferior-arg
  $ lldb inferior -- inferior-arg
  $ lldb -- inferior inferior-arg

This patch fixes that behavior, documents it and adds a test to cover
the different combinations.

Differential revision: https://reviews.llvm.org/D80165




More information about the All-commits mailing list