diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:04:10 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:04:10 +0000 |
| commit | 74a628f776edb588bff8f8f5cc16eac947c9d631 (patch) | |
| tree | dc32e010ac4902621e5a279bfeb48628f7f0e166 /source/Interpreter/OptionGroupFormat.cpp | |
| parent | afed7be32164a598f8172282c249af7266c48b46 (diff) | |
Diffstat (limited to 'source/Interpreter/OptionGroupFormat.cpp')
| -rw-r--r-- | source/Interpreter/OptionGroupFormat.cpp | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/source/Interpreter/OptionGroupFormat.cpp b/source/Interpreter/OptionGroupFormat.cpp index c97d16ad9865..df5e2b3cd346 100644 --- a/source/Interpreter/OptionGroupFormat.cpp +++ b/source/Interpreter/OptionGroupFormat.cpp @@ -14,10 +14,10 @@ // Other libraries and framework includes // Project includes #include "lldb/Core/ArchSpec.h" +#include "lldb/Host/OptionParser.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Target/Target.h" -#include "lldb/Utility/Utils.h" using namespace lldb; using namespace lldb_private; @@ -235,32 +235,36 @@ bool OptionGroupFormat::ParserGDBFormatLetter( m_prev_gdb_format = format_letter; return true; - // Size isn't used for printing instructions, so if a size is specified, and - // the previous format was - // 'i', then we should reset it to the default ('x'). Otherwise we'll - // continue to print as instructions, - // which isn't expected. case 'b': - byte_size = 1; - LLVM_FALLTHROUGH; case 'h': - byte_size = 2; - LLVM_FALLTHROUGH; case 'w': - byte_size = 4; - LLVM_FALLTHROUGH; case 'g': - byte_size = 8; - - m_prev_gdb_size = format_letter; - if (m_prev_gdb_format == 'i') - m_prev_gdb_format = 'x'; - return true; + { + // Size isn't used for printing instructions, so if a size is specified, and + // the previous format was + // 'i', then we should reset it to the default ('x'). Otherwise we'll + // continue to print as instructions, + // which isn't expected. + if (format_letter == 'b') + byte_size = 1; + else if (format_letter == 'h') + byte_size = 2; + else if (format_letter == 'w') + byte_size = 4; + else if (format_letter == 'g') + byte_size = 8; + m_prev_gdb_size = format_letter; + if (m_prev_gdb_format == 'i') + m_prev_gdb_format = 'x'; + return true; + } break; default: break; } + + return false; } |
