Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <vladimir@codesourcery.com>
To: Marc Khouzam <marc.khouzam@ericsson.com>
Cc: "'gdb@sources.redhat.com'" <gdb@sources.redhat.com>
Subject: Re: [MI] -exec-return or CLI 'return' do not trigger MI events
Date: Fri, 12 Feb 2010 15:37:00 -0000	[thread overview]
Message-ID: <201002121837.11704.vladimir@codesourcery.com> (raw)
In-Reply-To: <F7CE05678329534C957159168FA70DEC515FB3DB5B@EUSAACMS0703.eamcs.ericsson.se>

On Friday 12 February 2010 18:33:28 Marc Khouzam wrote:

> > -----Original Message-----
> > From: gdb-owner@sourceware.org 
> > [mailto:gdb-owner@sourceware.org] On Behalf Of Vladimir Prus
> > Sent: Friday, February 12, 2010 5:28 AM
> > To: gdb@sources.redhat.com
> > Subject: Re: [MI] -exec-return or CLI 'return' do not trigger 
> > MI events
> > 
> > Marc Khouzam wrote:
> > 
> > > Hi,
> > > 
> > > I just noticed that GDB 7.0.1 does not issue MI events
> > > *running and *stopped for the CLI 'return' command.
> > > This is the relevant output, while the whole (small)
> > > session is after.
> > > 
> > > (gdb) -exec-return
> > > 
> > ^done,frame={level="0",addr="0x08048412",func="foo",args=[],fi
> > le="a.cc",fullname="/local/lmckhou/testing/a.cc",line="6"}
> > > (gdb) return
> > > &"return\n"
> > > ~"#0  main () at a.cc:9\n"
> > > ~"9\t    return 0;\n"
> > > ^done
> > > 
> > > Do you want me to write a bug?
> > 
> > For all I can tell, the 'return' command does not actually 
> > resume the target.
> > It just pops the stack.
> 
> Ok, but how does the frontend know the stack has been poped
> and the editor should show a new line?

I think it has to special-case the '-exec-return' command. Note that
the new stack is reported as the result.

> When we use GDB 7.0 we only listen for MI events to update the
> frontend data.
> 
> I'll have to fix this for '-exec-return' anyway to support
> GDB 7.0, but with respect to GDB itself, aren't we missing
> some MI event then?

I don't know any other command like that, so special-casing
-exec-return is just as good as a new notification -- that
frontend has to specially support just as well.

- Volodya


      reply	other threads:[~2010-02-12 15:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-11 19:50 Marc Khouzam
2010-02-12 10:29 ` Vladimir Prus
2010-02-12 10:54   ` Joel Brobecker
2010-02-12 15:33   ` Marc Khouzam
2010-02-12 15:37     ` Vladimir Prus [this message]

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=201002121837.11704.vladimir@codesourcery.com \
    --to=vladimir@codesourcery.com \
    --cc=gdb@sources.redhat.com \
    --cc=marc.khouzam@ericsson.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