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: async operation


--- Andrew Cagney <cagney@gnu.org> wrote:
> > No response on this - so I am going to change GDB
> so that it will correctly handle an "interrupt"
> command to stop the inferior when in async mode.
> 
> Well you did post on a Saturday ;-)

Sorry - contract is coming to an end - again. 

> 
> > I tried using the "stop" command which makes it
> through the async filtering in top.c - however stop
> simply says it is not a valid command.  There is
> logic in here for cleanly stopping when a break
> occurs (?) but I can't find any to allow the
> operator to stop the target?
> 
> I think the description for "stop" explains why that
> does nothing:
> 
>    if (!dbx_commands)
>      stop_command =
>        add_cmd ("stop", class_obscure,
> not_just_help_class_command, 
> "There is no
> `stop' command, but you can set a hook on `stop'.\n\
> This allows you to set a list of commands to be run
> each time execution\n\
> of the program stops.", &cmdlist);
> 

I don't mean to sound dumb but could you clarify what
"you can set a hook on `stop'" means?

I want to allow an engineer to (for example) be able
to stop a running async process and set additional
tracepoints.  The engineer would then be able to "cont
&" to continue the process.

> > I add'ed "interrupt" to the filtering but it does
> not clear the target_executing flag.
> 
> You should see "fetch_inferior_event" clear that
> flag after it's 
> received notification that the target really has
> stopped.
> 

I see that and am working it now in conjunction with
the interrupt command - unless the stop command(?)
will do what I am looking for.  GDBserver does not
properly respond when in async and an "interrupt" is
issued.


> Andrew
> 
> 


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