Skip to content

Commit 35c664d

Browse files
authored
Move checking m_dummy_target to after raw-plus-option parsing. (#170888)
CommandObjectBreakpointAddPattern is a raw command. I was adjusting the patch for changes to handle the dummy target changes done while the patch was in review, and I copied the lines to the beginning of the DoExecute, but in the case of raw commands, you have to do the option parsing by hand, and this was before the parsing was done so the state wasn't determined yet.
1 parent 85e7860 commit 35c664d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lldb/source/Commands/CommandObjectBreakpoint.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,8 +1255,6 @@ class CommandObjectBreakpointAddPattern : public CommandObjectRaw {
12551255
CommandReturnObject &result) override {
12561256
const bool internal = false;
12571257
ExecutionContext exe_ctx = GetCommandInterpreter().GetExecutionContext();
1258-
Target &target =
1259-
m_dummy_options.m_use_dummy ? GetDummyTarget() : GetTarget();
12601258
m_all_options.NotifyOptionParsingStarting(&exe_ctx);
12611259

12621260
if (command.empty()) {
@@ -1279,6 +1277,9 @@ class CommandObjectBreakpointAddPattern : public CommandObjectRaw {
12791277
}
12801278
printf("Pattern: '%s'\n", pattern.str().c_str());
12811279

1280+
Target &target =
1281+
m_dummy_options.m_use_dummy ? GetDummyTarget() : GetTarget();
1282+
12821283
BreakpointSP bp_sp;
12831284
const size_t num_files = m_options.m_files.GetSize();
12841285

0 commit comments

Comments
 (0)