Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Access to Full Gdb Console input

On 10/03/2016 03:43 PM, Flynn, Stephen wrote:

>> (gdb) help info line
>> Core addresses of the code for a source line.
>> Line can be specified as
>>   LINENUM, to list around that line in current file,
>>   FILE:LINENUM, to list around that line in that file,
>>   FUNCTION, to list around beginning of that function,
>>   FILE:FUNCTION, to distinguish among like-named static functions.
>> Default is to describe the last source line that was listed.
>>                            ^^^^^^^^^^^^^^^^
>>
>> So I think a =current-source-line-changed or some such new MI event may
>> be acceptable.
> 
> Would this require creating an MI equivalent command for info line?

No, it would not.  All sorts of CLI commands end up emitting MI
events, exactly so that MI is aware of state changes caused by the
CLI user.  E.g., "break foo" on the command line ends up
generating a =breakpoint-created event on the MI channel.

A few MI events are missing, and we're adding them to gdb.  E.g.,
"thread N" on the command line (switch selected thread) should emit
a =thread-selected event on the MI channel (there's a gdb patch
pending to fix it; should be in master/7.12 soon).  The
"current source line" case in question seems similar.

Thanks,
Pedro Alves



Back to the top