Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: thomson@ca.ibm.com
To: gdb@sources.redhat.com
Subject: Re: [MI] Synchronous event notification
Date: Fri, 24 May 2002 14:52:00 -0000	[thread overview]
Message-ID: <OF90A649BA.6CAC8AFF-ON85256BC2.0062B9AF@torolab.ibm.com> (raw)

Keith Seitz wrote:

>The example above shows that Apple has added a syntax like:
>
>  result ==>
>     stuff [ "," event-list ]
>  event-list ==>
>     "MI_HOOK_RESULT=[" event ( "," event )* "]"
>

Keith, what I see is more like

   result ==>
      stuff  ( "," event ) *
   event ==>
      "MI_HOOK_RESULT=[HOOK_TYPE=" event-name [ event-data ] "]"

which you can verify, e.g. by running a user defined command that
creates 2 breakpoints, you get two MI_HOOK_RESULTs.

In Apple's (old) code these hooks are only enabled for the duration of an
-interpreter-exec console command.  That means there are several
ways a UI is notified of breakpoint creation

after -break-insert, you get
     ^done,bkpt=[number="1",type="breakpoint", ...]

after -interpreter-exec console "break ...", or
using -interpreter-exec to run a user defined command
or script that creates breakpoints, you are proposing
     ^done,event=[name="breakpoint_create", ...]

from a breakpoint command list (e.g. enable bkpt 2
after bkpt 1 is hit 100 times) ...
hmm, when MI is enabled these commands don't run
unless you also use --noasync, maybe bpstat_do_actions()
is not called from the event loop?
Anyway, when I do get them to run, there is no notification
at all.

As consumers, we would prefer to have one notification
that is reliable and consistent.


Are you also looking at the other, non-event hooks
Apple introduced?

query hook - always answers "y" to a "y or n" query
(seems a little scary)

read one line hook - If a console
command needs multiline input (e.g."define", "document",
"if", or "while), prompt with
     =read-one-line,prompt="prompt"
so the UI can know not to prepend "-interpreter-exec console"
to the next input line.

resume hook - if a console command attempts to run the target,
don't do it, instead send the notification
      =rerun
back to the UI, I guess so it can get out of "CLI mode" first.


Brian Thomson
IBM


             reply	other threads:[~2002-05-24 21:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-24 14:52 thomson [this message]
2002-05-24 15:31 ` Keith Seitz
  -- strict thread matches above, loose matches on Subject: below --
2002-05-15 11:23 Keith Seitz
2002-05-24 13:41 ` Andrew Cagney
2002-05-24 15:26   ` Keith Seitz
2002-06-01 15:25     ` Andrew Cagney

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=OF90A649BA.6CAC8AFF-ON85256BC2.0062B9AF@torolab.ibm.com \
    --to=thomson@ca.ibm.com \
    --cc=gdb@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