llvm-project/lldb/source/Commands
Raphael Isemann b58af8d254 [lldb] Improve error message when --func-regex parameter for the breakpoint command is invalid
Summary:
Currently the breakpoint command is prompting the user to file a bug report if the provided regex is invalid:
```
(lldb) rbreak *foo
error: Function name regular expression could not be compiled: "Inconvertible error value. An error has occurred that could not be converted to a known std::error_code. Please file a bug. repetition-operator operand invalid"
```

The reason is simply that we are using the wrong StringError constructor (the one with the error code as the first parameter
is also printing the string version of the error code, and the inconvertible error code is just an invalid place holder code with
that description). Switching the StringError constructor parameters will only print the error message we get from the regex
engine when we convert the error into a string.

I checked the rest of the code base and I couldn't find the same issue anywhere else.

Fixes rdar://62233561

Reviewers: JDevlieghere

Reviewed By: JDevlieghere

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D78808
2020-04-27 09:55:06 +02:00
..
CMakeLists.txt Remove `bugreport` command 2019-09-05 21:43:32 +00:00
CommandCompletions.cpp [lldb][NFC] Move common_completions mapping out of CommandCompletions header. 2020-02-12 09:48:51 +01:00
CommandObjectApropos.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
CommandObjectApropos.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectBreakpoint.cpp [lldb] Improve error message when --func-regex parameter for the breakpoint command is invalid 2020-04-27 09:55:06 +02:00
CommandObjectBreakpoint.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectBreakpointCommand.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CommandObjectBreakpointCommand.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectCommands.cpp Convert CommandObjectCommands functions to return StringRefs 2020-03-26 11:20:38 +01:00
CommandObjectCommands.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectDisassemble.cpp [lldb] Break up CommandObjectDisassemble::DoExecute 2020-03-10 14:03:16 +01:00
CommandObjectDisassemble.h [lldb] Break up CommandObjectDisassemble::DoExecute 2020-03-10 14:03:16 +01:00
CommandObjectExpression.cpp [lldb] Add option to retry Fix-Its multiple times to failed expressions 2020-04-06 11:25:36 +02:00
CommandObjectExpression.h [lldb] Mark expressions that couldn't be parsed or executed as failed expressions 2020-03-23 15:28:17 +01:00
CommandObjectFrame.cpp [lldb/Target] Support more than 2 symbols in StackFrameRecognizer 2020-03-18 14:15:58 +01:00
CommandObjectFrame.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectGUI.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
CommandObjectGUI.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectHelp.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CommandObjectHelp.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectLanguage.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
CommandObjectLanguage.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectLog.cpp [lldb] Fixing the bug that the "log timer" has no tab completion 2020-04-09 08:58:52 +02:00
CommandObjectLog.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectMemory.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
CommandObjectMemory.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectMultiword.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CommandObjectPlatform.cpp [lldb/Utility] Replace ProcessInstanceInfoList with std::vector. (NFCI) 2020-03-12 14:10:25 -07:00
CommandObjectPlatform.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectPlugin.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
CommandObjectPlugin.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectProcess.cpp [lldb/Utility] Replace ProcessInstanceInfoList with std::vector. (NFCI) 2020-03-12 14:10:25 -07:00
CommandObjectProcess.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectQuit.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
CommandObjectQuit.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectRegister.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
CommandObjectRegister.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectReproducer.cpp [lldb/Reproducers] Intercept the FindProcesses API 2020-03-13 09:31:35 -07:00
CommandObjectReproducer.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectSettings.cpp Convert for loops to entry-based iteration 2020-04-02 18:56:29 +02:00
CommandObjectSettings.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectSource.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CommandObjectSource.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectStats.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
CommandObjectStats.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectTarget.cpp Convert for loops to entry-based iteration 2020-04-02 18:56:29 +02:00
CommandObjectTarget.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectThread.cpp Fix unused variable, format, and format string warnings. 2020-04-03 17:58:59 -07:00
CommandObjectThread.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectType.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CommandObjectType.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectVersion.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
CommandObjectVersion.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectWatchpoint.cpp [lldb][NFC] Fix typo in 'watchpoint delete' error message 2020-04-07 16:11:32 +02:00
CommandObjectWatchpoint.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CommandObjectWatchpointCommand.cpp Correct copy-pasteo in lua script language description 2020-04-02 00:12:24 -04:00
CommandObjectWatchpointCommand.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
Options.td [lldb] Fix typo in breakpoint set -r description 2020-04-23 12:06:27 +02:00
OptionsBase.td [lldb] Don't dynamically allocate the posix option validator. 2019-07-26 11:46:21 +00:00