This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/17507] New: GDB-MI interpreter should use "console-stream" records for monitor command results


https://sourceware.org/bugzilla/show_bug.cgi?id=17507

            Bug ID: 17507
           Summary: GDB-MI interpreter should use "console-stream" records
                    for monitor command results
           Product: gdb
           Version: 7.6
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: teodor.madan at freescale dot com

When executing "monitor help", reply from gdbserver is reported as
"target-stream" thus it will be routed to console/tty associated with debugged
application. It is expected to be printed to console-stream being a result of
CLI command.
A gdb/mi frontend (e.g. eclipse) will route stream records to different console
views depending on the record type. 

The undesirable effect in this situation: user will enter a gdb command in gdb
shell console and will see result in a totally different console. 

In low-level GDB jtag debugging user has to interact often with "monitor"
commands due to a lot of very specialized extensions. 

---------------steps to reproduce -------------
1. start "gdbserver  -multi :2345"
2. start gdb with mi interpretter: "gdb --interpretter=mi"

(gdb)
target extended-remote :2345
&"target extended-remote :2345\n"
~"Remote debugging using :2345\n"
=tsv-created,name="trace_timestamp",initial="0"\n
^done
(gdb)
mon set debug-hw-points 1
&"mon set debug-hw-points 1\n"
@"H/W point debugging output enabled.\n"
^done
(gdb)

Inspect result of the command. It does start with "@" as a sign of a stdout
activity of debugged application, not "~" that would mean that it is a string
dedicated to be displayed to whoever sent that command.

-------------

According to chapter "27.5.2 gdb/mi Output Syntax",

"console-stream-output is output that should be displayed as is in the console.
It is the textual response to a CLI command. All the console output is prefixed
by â~â."

"target-stream-output is the output produced by the target program. All the
target output is prefixed by â@â."

An optional gdb set subcommand would work as well. e.g. "set remoteshell 1"

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]