llvm-project/lldb/source/Utility
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
..
ARM64_DWARF_Registers.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
ARM64_ehframe_Registers.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
ARM_DWARF_Registers.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
ARM_ehframe_Registers.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
ArchSpec.cpp [lldb] Add YAML traits for ArchSpec and ProcessInstanceInfo 2020-03-12 14:38:37 -07:00
Args.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Baton.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Broadcaster.cpp [lldb/Utility] Use emplace_back instead of push_back (NFC) 2020-03-02 15:54:00 -08:00
CMakeLists.txt Remap the target (Xcode) SDK directory to the host SDK directory. 2020-04-06 15:51:30 -07:00
CompletionRequest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Connection.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ConstString.cpp [lldb/Utility] Add YAML traits for ConstString and FileSpec. 2020-03-12 10:28:21 -07:00
DataBufferHeap.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
DataBufferLLVM.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
DataEncoder.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
DataExtractor.cpp [LLDB] Let DataExtractor deal with two-byte addresses 2020-02-25 16:27:38 +01:00
Environment.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Event.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
FileSpec.cpp [lldb/Utility] Add YAML traits for ConstString and FileSpec. 2020-03-12 10:28:21 -07:00
GDBRemote.cpp [lldb/Utility] YAML validation should be orthogonal to packet semantics. 2020-01-03 14:23:42 -08:00
IOObject.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
LLDBAssert.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Listener.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Log.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Logging.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
NameMatches.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
PPC64LE_DWARF_Registers.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
PPC64_DWARF_Registers.h [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
ProcessInfo.cpp [lldb/Reproducers] Intercept the FindProcesses API 2020-03-13 09:31:35 -07:00
RegisterValue.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
RegularExpression.cpp [lldb] Improve error message when --func-regex parameter for the breakpoint command is invalid 2020-04-27 09:55:06 +02:00
Reproducer.cpp [lldb/Reproducers] Support new replay mode: passive replay 2020-04-20 09:41:40 -07:00
ReproducerInstrumentation.cpp [lldb/Reproducers] Support new replay mode: passive replay 2020-04-20 09:41:40 -07:00
Scalar.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
SelectHelper.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
State.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Status.cpp [lldb/Utility] Improve error_code->Status conversion 2020-04-23 16:12:41 +02:00
Stream.cpp [lldb/Utility] Fix unspecified behavior. 2020-02-24 21:25:55 -08:00
StreamCallback.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StreamString.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StringExtractor.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StringExtractorGDBRemote.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StringLexer.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StringList.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
StructuredData.cpp [lldb][NFC] Remove several inefficient ConstString -> const char * -> StringRef conversions 2020-02-11 09:14:41 +01:00
TildeExpressionResolver.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Timer.cpp Remove unneeded Compiler.h and DataTypes.h includes, NFC 2020-02-26 10:36:17 -08:00
UUID.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
UriParser.cpp [LLDB] Fix parsing of IPv6 host:port inside brackets 2020-03-26 11:35:54 +01:00
UserID.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
UserIDResolver.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
UuidCompatibility.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VASprintf.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
VMRange.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
XcodeSDK.cpp Fix a dangling-gsl warning and avoid transitively including string. 2020-04-24 16:03:17 -07:00