Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: gdb-patches@sources.redhat.com
Subject: Re: RFC: MI output during program execution
Date: Mon, 19 Sep 2005 10:30:00 -0000	[thread overview]
Message-ID: <17198.37622.443418.520082@farnswood.snap.net.nz> (raw)
In-Reply-To: <17188.60739.749026.738477@farnswood.snap.net.nz>

[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 2705 bytes --]

 > I've started a merge on current CVS (for some reason gdb-413 seemed to
 > include everything except the GDB source).  Getting MI output during
 > program execution seems to be closely related to making GDB asynchronous.
 > I couldn't attempt such a task on my own but, using the Apple code as a
 > prototype, it doesn't look too difficult.  When I have something working
 > perhaps I could put it on a branch.

I now have something that works for GNU/Linux (probably under limited
conditions).  With MI it now picks up mi_exec_async_cli_cmd_continuation to
print the *stopped record, even with CLI commands like "run":

(gdb)
-break-insert main
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x080484c5",func="main",file="myprog.c",line="55",times="0"}
(gdb)
-interpreter-exec console run
Switching to interpreter "console".
(gdb) Starting program: /home/nickrob/myprog
^running
(gdb)
*stopped,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x080484c5",func="main",args=[{name="argc",value="1"},{name="argv",value="0xfee72c74"}],file="myprog.c",fullname="/home/nickrob/myprog.c",line="55"}
(gdb)
-exec-next
^running
(gdb)
*stopped,reason="end-stepping-range",thread-id="0",frame={addr="0x080484d7",func="main",args=[{name="argc",value="1"},{name="argv",value="0xfee72c74"}],file="myprog.c",fullname="/home/nickrob/myprog.c",line="56"}

Such asynchronous behaviour should also help with event notification which
Apple's code also has, but which I have not tried to merge for the moment.

I've changed the files:

cli-interp.c         infcmd.c	          mi-interp.c
defs.h		     inf-loop.c	 	  mi-main.c  
event-loop.c	     inf-ptrace.c	  mi-main.h  
event-loop.h	     infrun.c	 	  target.c   
event-top.c	     interps.c	 	  target.h   
event-top.h	     interps.h	 	  top.c	   
exec.c		     linux-nat.c	  tui-hooks.c
i386-linux-nat.c     linux-thread-db.c	  wrapper.h  
inf-child.c	     Makefile.in      

and added four new ones:

async-nat-inferior.c
async-nat-inferior.h
async-nat-sigthread.c
async-nat-sigthread.h

derived from their macosx-*-*.* counterparts.

Some files had to be changed e.g event-loop.c, event-top.c, inf-loop.c.
Others should probably have been changed elsewhere with different target
methods e.g i386-linux-nat.c linux-thread-db.c.  This is just a starting
point.

I attach the new files and a set of diffs against HEAD from about 20:00 NZST
(+12 GMT) Sept 19 2005, for anyone who might like to test the functionality.
If I am given approval to commit these changes to a branch then I will create
ChangeLog entries (attributed to Apple).

I presume there is more freedom to committing on a non-release branch.  What
are the rules?

Nick


[-- Attachment #2: asynchronous GDB --]
[-- Type: application/octet-stream, Size: 24705 bytes --]

  parent reply	other threads:[~2005-09-19 10:30 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-08  5:20 Nick Roberts
2005-08-08 13:05 ` Daniel Jacobowitz
2005-08-08 18:23   ` Jim Ingham
2005-08-09 17:32     ` Nick Roberts
2005-08-21 22:09     ` Nick Roberts
2005-08-24  2:20       ` Stan Shebs
2005-08-24 16:59         ` Nick Roberts
2005-08-24 20:15           ` Jim Ingham
2005-08-24 20:48             ` Nick Roberts
2005-08-27 12:09           ` Stan Shebs
2005-09-12  3:20         ` Nick Roberts
2005-09-12  3:40           ` Daniel Jacobowitz
2005-09-19 10:30           ` Nick Roberts [this message]
2005-09-19 13:17             ` Daniel Jacobowitz
2005-09-19 22:12               ` Nick Roberts
2005-09-19 22:17               ` Nick Roberts
2005-09-19 22:32                 ` Daniel Jacobowitz
2005-10-03  3:20             ` Nick Roberts
2005-10-03 13:18               ` Daniel Jacobowitz
2005-10-03 20:28                 ` Nick Roberts
2005-10-03 20:31                   ` Daniel Jacobowitz
2005-10-03 21:39                     ` Stan Shebs
2005-10-03 21:50                       ` Jim Ingham
2005-10-03 21:59                         ` Daniel Jacobowitz
2005-10-03 22:01                       ` Daniel Jacobowitz
2006-03-28  0:40                 ` Nick Roberts
2006-03-28 22:12                   ` Daniel Jacobowitz
2006-03-28 22:36                     ` Nick Roberts
2006-03-28 23:13                       ` Daniel Jacobowitz
2005-08-08 21:00 ` Eli Zaretskii
2005-08-09 17:52   ` Nick Roberts
     [not found] <1123605445.30442.ezmlm@sources.redhat.com>
2005-08-09 17:24 ` Jim Ingham
2005-08-09 17:59   ` Bob Rossi
2005-08-09 18:09     ` Jim Ingham
2005-08-09 18:23       ` Bob Rossi
2005-08-09 18:40         ` Jim Ingham
2005-08-10  0:48           ` Daniel Jacobowitz
2005-08-10  0:48             ` Jim Ingham
2005-08-10  2:37               ` Daniel Jacobowitz
2005-08-09 18:13   ` Eli Zaretskii
2005-08-09 18:23     ` Bob Rossi
2005-08-09 19:39       ` Eli Zaretskii
2005-08-10  0:41         ` Bob Rossi
2005-08-10  0:42           ` Daniel Jacobowitz
2005-08-10  1:07             ` Bob Rossi
2005-08-10  2:37               ` Jim Ingham
2005-08-12  8:06                 ` Bob Rossi
2005-08-12 10:36                   ` Eli Zaretskii
2005-08-12 12:05                     ` Bob Rossi
2005-08-12 17:25                       ` Eli Zaretskii
2005-08-12 20:45                         ` Bob Rossi
2005-08-12 20:49                           ` Daniel Jacobowitz
2005-08-13  1:11                             ` Bob Rossi
2005-08-13  1:15                               ` Daniel Jacobowitz
2005-08-13 11:07                             ` Eli Zaretskii
2005-08-12 20:54                           ` Mark Kettenis
2005-08-13 15:05                             ` Bob Rossi
2005-08-12 21:01                         ` Daniel Jacobowitz
2005-08-13 11:13                           ` Eli Zaretskii
2005-08-12 17:03                   ` Jim Ingham
2005-08-13  0:33                     ` Bob Rossi
2005-08-13  0:44                       ` Jim Ingham
2005-08-13  5:04                         ` Bob Rossi
2005-08-13  6:47                           ` Daniel Jacobowitz
2005-08-13 11:06                             ` Jim Ingham
2005-08-13 14:51                               ` Bob Rossi
2005-08-13 16:55                                 ` Daniel Jacobowitz
2005-08-13 12:53                             ` Eli Zaretskii
2005-08-13 21:52                             ` Mark Kettenis
2005-08-13  0:22                   ` Daniel Jacobowitz
2005-08-11 10:10               ` Daniel Jacobowitz
2005-08-15  2:13 Nick Roberts
2005-08-15  4:26 ` Daniel Jacobowitz
2005-08-15 10:03   ` Nick Roberts
2005-08-16  0:04     ` Bob Rossi
2005-08-16  0:33       ` Nick Roberts
2005-08-16  0:43     ` Daniel Jacobowitz
2005-08-16  3:54       ` Bob Rossi
2005-08-15  2:15 Nick Roberts
     [not found] <1124238360.5670.ezmlm@sources.redhat.com>
2005-08-17  1:10 ` Jim Ingham
2005-08-17  3:18 Nick Roberts
2005-08-18 13:28 Nick Roberts
2005-08-19  0:52 ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17198.37622.443418.520082@farnswood.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox