Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322691

Summary: Extraneous console spew for GDB "monitor" commands
Product: [Tools] CDT Reporter: Bruce Griffith <Bruce.Griffith>
Component: cdt-debug-cdi-gdbAssignee: Project Inbox <cdt-debug-cdi-gdb-inbox>
Status: RESOLVED WONTFIX QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: Bruce.Griffith, marc.khouzam, pawel.1.piech
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=220959
Whiteboard:

Description Bruce Griffith CLA 2010-08-13 17:24:36 EDT
Build Identifier: 20100617-1415

Per discussion on the CDT developer's forum:

Extraneous target communication output is appearing in the console window when verbose mode is off.  Will attach a one line patch shortly.

Related to Bug #220959.

________________________________________
From: cdt-dev-bounces@eclipse.org [mailto:cdt-dev-bounces@eclipse.org] On Behalf Of Steve Goodrich
Sent: Thursday, 22 July 2010 7:40 PM
To: 'CDT General developers list.'
Subject: RE: [cdt-dev] RxThread.processMIOOBRecord - undesired console I/O?

Thanks, Marc.  I’ll have a look.  I suspect the easiest and least invasive way is to add the check for isEnableConsole(), but I’ll look over the fixes before recommending a change.
            -- Steve G.
________________________________________
From: cdt-dev-bounces@eclipse.org [mailto:cdt-dev-bounces@eclipse.org] On Behalf Of Marc Khouzam
Sent: Thursday, July 22, 2010 10:17 AM
To: 'CDT General developers list.'
Subject: RE: [cdt-dev] RxThread.processMIOOBRecord - undesired console I/O?

If it helps, I believe we had the same (or very similar) problem in DSF-GDB which we
solved with https://bugs.eclipse.org/bugs/show_bug.cgi?id=220959

________________________________________
From: cdt-dev-bounces@eclipse.org [mailto:cdt-dev-bounces@eclipse.org] On Behalf Of Steve Goodrich
Sent: Thursday, July 22, 2010 9:38 AM
To: 'CDT General developers list.'
Subject: [cdt-dev] RxThread.processMIOOBRecord - undesired console I/O?
I’m working in Helios using CDI (GDB).  I’m sending “monitor” commands to GDB, and I’m seeing the output from the commands in the console window.  I’ve disabled the console programmatically, but I’m still getting the “noise” on the output.

Looking at processMIOOBRecord(MIStreamRecord) in org.eclipse.cdt.debug.mi.core.RxThread, I see the following (note that the middle case ignores isEnableConsole()):

            if (stream instanceof MIConsoleStreamOutput) {
                        // ...
                        if (str != null && isEnableConsole()) {
                        // ...
            } else if (stream instanceof MITargetStreamOutput) {
                        // ...
                        if (str != null) {
                        // ...
            } else if (stream instanceof MILogStreamOutput) {
                        // ...
                        if (str != null && isEnableConsole()) {

Question: Is this desired, or could the middle case be changed to respect isEnableConsole?

Thanks,
            -- Steve G.


Reproducible: Always

Steps to Reproduce:
1. Start a remote debug session
2. Ensure "verbose console mode" is not checked
3. Issue a gdb "monitor" command.
Comment 1 Jonah Graham CLA 2017-10-23 13:42:01 EDT
(this is part of a batch change)

The CDI debug implementation has been removed in CDT 9.0. Please see bug 484900 and the entry on the New and Noteworthy page https://wiki.eclipse.org/CDT/User/NewIn90#API_modifications