This is the mail archive of the gdb@sources.redhat.com 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]

Re: fullname descriptor with -break-list


 > >>-exec-run
 > >>^running
 > >>(gdb) 
 > >>*stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x080486e2",func="myprint",args=[{name="i",value="0"},{name="j",value="0"}],file="myprint.c",line="5"}
 ...
 > The way that message is generated is a massive kludge - so the 
 > underlying code could do with a cleanup - separate the code determining 
 > why the process stopped from the code printing the stop reason.

Just a short note for the future:

As *stopped is asynchronous output and not that of a specific MI command, I
also think this output should appear even if a CLI command has been invoked.

Currently a GDB session might look like:

&"b main\n"
~"Breakpoint 1 at 0x80484cf: file myprog.c, line 48.\n"
^done
(gdb) 
run
&"run\n"
~"Starting program: /home/nick/myprog \n"
~"\n"
~"Breakpoint 1, main (argc=1, argv=0xbffff794) at myprog.c:48\n"
~"48\t  int i, n, m[10]={0,1,4,9,16,25,36,49,64,81};\n"
^done
(gdb) 

but I think it should look something like:


&"b main\n"
~"Breakpoint 1 at 0x80484cf: file myprog.c, line 48.\n"
^done
(gdb) 
run
&"run\n"
~"Starting program: /home/nick/myprog \n"
~"\n"
~"Breakpoint 1, main (argc=1, argv=0xbffff794) at myprog.c:48\n"
~"48\t  int i, n, m[10]={0,1,4,9,16,25,36,49,64,81};\n"
^done
(gdb) 
*stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x080484cf",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbffff794"}],file="myprog.c",line="48"}
(gdb) 


or with "-interpreter-exec console run" if direct CLI is going to be removed.

>From Emacs point of view, this would mean the CLI commands could be entered in
the GUD buffer.


Nick


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