Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "André Pönitz" <apoenitz@trolltech.com>
To: gdb@sourceware.org
Subject: Re: MI: "^running" issues
Date: Fri, 07 Sep 2007 05:54:00 -0000	[thread overview]
Message-ID: <200709070742.59544.apoenitz@trolltech.com> (raw)
In-Reply-To: <200709062241.01815.ghost@cs.msu.su>

On Thursday 06 September 2007 20:41:01 Vladimir Prus wrote:
> > Those are always bugs, and we fix them when we find them, but yes that  
> > did happen - hasn't happened in a while though.  What happens more  
> > often now for us is that we rely a lot on calling functions to inspect  
> > opaque data types when the target stops.  This often goes bad - people  
> > right data inspectors that can deadlock for instance...  So it's  
> > useful to have some "resync with gdb" action  that check's gdb's state  
> > and does the right thing based on what it is.
> 
> You mean, calling functions in the program? Then, presumably if they
> hang, you get to interrupt their execution and somehow restore program
> context? Why do you need to know if inferior is running, in this case?
> As soon as you call a function in program, program is running ;-)

For a while. Then it may stop. Most times you get a notice. Sometimes
you don't. Sometimes (most notably gdb/cygwin) the notice gets mangled
with whatever output the called "data dumper function" produces and
it is no more recognizable by the "result parser". Sometimes "old" output
arrives after calling into the inferior.

Some of the scenarios might point to bugs in the Gui, some might not.
In any case, there are lots of reasons why one might want a method to 
get absolute state information out of Gdb at "random" times.

> > > I presume this is only relevant when gdb is combined with some other
> > > code in the same process? Last time I've asked about this, I was
> > > told that it not supported, because gdb does fancy things with  
> > > signals, or something like that.

It works well enough for simple cases. Most troubles I have had so far
is with memory allocation and result passing on Windows. So if one 
manages to do the work without dynamic allocations and finds a way
that does not mangle "data dumper output" with ordinary gdb output,
the method is fairly robust. Most notably it also works when the data
dumper segfaults.

Of course, having a "real" interpreter within Gdb would be really nice...

Andre'


      reply	other threads:[~2007-09-07  5:43 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-04 12:53 Vladimir Prus
2007-09-05  5:24 ` Nick Roberts
2007-09-05  5:39   ` Vladimir Prus
2007-09-05  6:25     ` Nick Roberts
2007-09-05 17:27     ` Eli Zaretskii
2007-09-05 18:42       ` Vladimir Prus
2007-09-06  6:46         ` Eli Zaretskii
2007-09-06  7:20           ` Vladimir Prus
2007-09-06  8:12             ` Fabian Cenedese
2007-09-06  8:24               ` Mark Kettenis
2007-09-06 11:39                 ` Nick Roberts
2007-09-06 21:18               ` Vladimir Prus
2007-09-06 14:38             ` Bob Rossi
2007-09-06 15:06               ` Vladimir Prus
2007-09-06 19:34             ` Eli Zaretskii
2007-09-06 19:38               ` Vladimir Prus
2007-09-07  9:04                 ` Eli Zaretskii
2007-09-07  9:15                   ` Nick Roberts
2007-09-07 10:59                     ` Vladimir Prus
2007-09-07 18:06                       ` Eli Zaretskii
2007-09-07 18:18                         ` Daniel Jacobowitz
2007-09-07 18:24                           ` Eli Zaretskii
2007-09-08  0:30                             ` Daniel Jacobowitz
2007-09-08  3:45                           ` Nick Roberts
2007-09-08  7:21                             ` Daniel Jacobowitz
2007-09-09 20:10                       ` Nick Roberts
2007-09-07  8:11             ` Nick Roberts
2007-09-06 15:03         ` Jim Blandy
2007-09-06 18:08         ` Jim Ingham
2007-09-06 18:34           ` Vladimir Prus
2007-09-06 18:41             ` Jim Ingham
2007-09-06 18:48               ` Vladimir Prus
2007-09-07  5:54                 ` André Pönitz [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=200709070742.59544.apoenitz@trolltech.com \
    --to=apoenitz@trolltech.com \
    --cc=gdb@sourceware.org \
    /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