Bug 391075 - Incorrect parsing of console commands in CLIEventProcessor*
Summary: Incorrect parsing of console commands in CLIEventProcessor*
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 8.1.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-03 18:28 EDT by Nobody - feel free to take it CLA
Modified: 2020-09-04 15:24 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nobody - feel free to take it CLA 2012-10-03 18:28:46 EDT
In the following code from 'CLIEventProcessor*'

private void processSettingChanges(MIInterpreterExecConsole<?> exec) {
    String[] operations = exec.getParameters();
    if (operations != null && operations.length > 0) {
    	// In refactoring we are no longer generating the token id as
        // part of the command. It is passed here and stored away  and
        // then never really used. So it has just been changed to 0.
        processSettingChanges(exec.getContext(), 0, operations[0]);
    }
}

operations[0] passed to 'processSettingChanges()' is always "console" for console commands. As a result the parsing of the command always fails and no events are dispatched.

I would suggest adding the following methods to MIInterpreterExec:
1. getInterpreter()
2. getCommand()
and use the latter in 'processSettingChanges()'.
Comment 1 Marc Khouzam CLA 2012-10-04 10:53:33 EDT
(In reply to comment #0)

> I would suggest adding the following methods to MIInterpreterExec:
> 1. getInterpreter()
> 2. getCommand()
> and use the latter in 'processSettingChanges()'.

Nice.  +1