Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Evaluating the output of gdb monitor commands

Hi Mikhail,

I thought you might pick this one up ... thank you

> Correct me if I'm wrong, but the records prefixed by @ represent the output 
from the program being debugged. Why would gdb print something to this 
stream?

Our idea was to use a gdb "monitor" command and evaluate the output. "monitor" 
commands are mapped to a serial protocol's qRcmd packet. And here is the 
documentation for qRcmd from "Debugging with gdb", Ninth Edition, for gdb 
version 6.3.50.20050712:

===================================
qRcmd,command — remote command
         command (hex encoded) is passed to the local interpreter for 
execution. [...] Before the final result  packet, the target may also respond 
with a number of intermediate Ooutput console output packets. Implementors 
should note that providing access to a stubs’s interpreter may have security 
implications.
===================================

Since the documentation explicitly mentions using "O" response packets that's 
what we did. And gdb in turn prints them with a preceding "@", which is 
assigned to the console stream, and is not collected by MIInfo.

Hence my question whether there would be any harm in collecting console stream 
records also. What do you think?

Thanks,


Norbert


Back to the top