diff options
author | Stella Stamenova <stilis@microsoft.com> | 2022-08-16 18:11:28 -0700 |
---|---|---|
committer | Stella Stamenova <stilis@microsoft.com> | 2022-08-16 18:11:28 -0700 |
commit | 0cbaed3e14448de4b9ed32b7f531471bc6d4347f (patch) | |
tree | 71f63a0ea99312ce774eec3aa1e139dc8e2578af /lldb/source/Commands/CommandObjectThread.cpp | |
parent | b706f56133a77f9d7c55270ac24ff59e6fce3fa4 (diff) | |
download | llvm-0cbaed3e14448de4b9ed32b7f531471bc6d4347f.zip llvm-0cbaed3e14448de4b9ed32b7f531471bc6d4347f.tar.gz llvm-0cbaed3e14448de4b9ed32b7f531471bc6d4347f.tar.bz2 |
Revert "[LLDB][NFC] Fix optons parsing and misc. reliability in CommandObjectThread"
This very much non-NFC change broke the windows lldb bot: https://lab.llvm.org/buildbot/#/builders/83/builds/22557
This reverts commit 461b410159426fdc6da77e0fb653737e04e0ebe9.
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectThread.cpp | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/lldb/source/Commands/CommandObjectThread.cpp b/lldb/source/Commands/CommandObjectThread.cpp index 1e317d8..5d7f3c1 100644 --- a/lldb/source/Commands/CommandObjectThread.cpp +++ b/lldb/source/Commands/CommandObjectThread.cpp @@ -62,13 +62,15 @@ public: const int short_option = m_getopt_table[option_idx].val; switch (short_option) { - case 'c': - if (option_arg.getAsInteger(0, m_count) || (m_count < 0)) { + case 'c': { + int32_t input_count = 0; + if (option_arg.getAsInteger(0, m_count)) { m_count = UINT32_MAX; error.SetErrorStringWithFormat( "invalid integer value for option '%c'", short_option); - } - break; + } else if (input_count < 0) + m_count = UINT32_MAX; + } break; case 's': if (option_arg.getAsInteger(0, m_start)) error.SetErrorStringWithFormat( @@ -1002,15 +1004,8 @@ protected: AddressRange fun_addr_range = sc.function->GetAddressRange(); Address fun_start_addr = fun_addr_range.GetBaseAddress(); - - if (!line_table->FindLineEntryByAddress(fun_start_addr, function_start, - &index_ptr)) { - result.AppendErrorWithFormat( - "Failed to find line entry by address for " - "frame %u of thread id %" PRIu64 ".\n", - m_options.m_frame_idx, thread->GetID()); - return false; - } + line_table->FindLineEntryByAddress(fun_start_addr, function_start, + &index_ptr); Address fun_end_addr(fun_start_addr.GetSection(), fun_start_addr.GetOffset() + @@ -1018,14 +1013,8 @@ protected: bool all_in_function = true; - if (!line_table->FindLineEntryByAddress(fun_end_addr, function_start, - &end_ptr)) { - result.AppendErrorWithFormat( - "Failed to find line entry by address for " - "frame %u of thread id %" PRIu64 ".\n", - m_options.m_frame_idx, thread->GetID()); - return false; - } + line_table->FindLineEntryByAddress(fun_end_addr, function_start, + &end_ptr); // Since not all source lines will contribute code, check if we are // setting the breakpoint on the exact line number or the nearest |