Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sources.redhat.com
Subject: Re: [remote protocol] Allow qSymbol response to continue packets
Date: Thu, 11 Mar 2004 23:21:00 -0000	[thread overview]
Message-ID: <4050F435.1040906@gnu.org> (raw)
In-Reply-To: <20040311214033.GA29430@nevyn.them.org>


>>>> >Could you explain why you this is necessary?
>>
>>> 
>>
>>>> >I'm guessing in the File I/O case this handles the user hitting C-c
>>>> >while the client is processing a request, and there is considerable
>>>> >complexity involved in reporting whether the I/O has completed.  But
>>>> >using errno doesn't make any sense in the symbol lookup context and it
>>>> >seems to me easier to make GDB delay sending the C-c to the target
>>>> >until the qSymbol has been processed:
>>>> >  -> c
>>>> >  <- qSymbol:AAAAAAAAAAAAA
>>>> >  Control-C
>>>> >  -> qSymbol:AAAAAAAAAAAAA:012131312
>>>> >  -> \003
>>
>>> 
>>> Here's the problem:
> 
> 
> I did read the manual when you referenced it, you don't need to paste
> the whole thing :)

I quoted the relevant section of the manual as it hopefully explained 
why it was necessary.  If that doesn't answer the question then we've a 
bug in the manual.

>>> A user trying to cntrl-c GDB while GDB is taking its time looking up a 
>>> symbol isn't theory.  There needs to be an error/abort mechanism and 
>>> adopting "F" provides that.
>>> 
>>> The alternative is to specify some sort of customized q packet semantics 
>>> - giving two callbacks and two different behaviors  - I'm really not 
>>> interested in going there.
> 
> 
> Perhaps you've noticed that we have hashed minimal symbol table
> lookups?  There is no excuse for symbol table lookups to take long
> enough for there to need to be an abort mechanism.  This is in contrast
> to file I/O which can block.

Protocol's can't make such assumptions.

> I don't think we need to use the heavy-weight mechanism which supports
> interruption for operations that don't need to be interrupted, and I
> can't see a reason to support interruption of this lookup.  If you do,
> please enlighten me.

I think we'll have to disagree on our definitions of heavy weight (if F 
it is too heavy weight then perhaphs we need to remove a few things from 
it).

The protocol needs to specify the failure states, the F packet provides 
that for free.  As I said, I'm really not interested in cooking up 
another callback packet with a different set of failure states.  One is 
enough.

>>> You need to handle such race conditions anyway.
>>> 
>>> -> c
>>> <- qSymbol | cntrl-c ->
> 
> 
> That's a different problem, and it is already correctly handled by
> gdbserver.  We'll write out the qSymbol, read in the Ctrl-C, signal the
> inferior, look again for an ACK, eventually get the ACK.  Then we'd
> wait for and get a qSymbol reply, resume the suspended thread that made
> the lookup request, wait for it, and see the SIGINT we created.

If you've code to handle that you've code to handle a packet containing:

- <retry><cntrl-C>
- <symbol><cntrl-C>

Andrew



  reply	other threads:[~2004-03-11 23:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-06 23:52 Daniel Jacobowitz
2004-03-07  5:45 ` Eli Zaretskii
2004-03-11 20:06 ` Andrew Cagney
2004-03-11 20:16   ` Daniel Jacobowitz
2004-03-11 21:27     ` Andrew Cagney
2004-03-11 21:40       ` Daniel Jacobowitz
2004-03-11 23:21         ` Andrew Cagney [this message]
2004-03-11 23:38           ` Daniel Jacobowitz
2004-03-12 19:45             ` Daniel Jacobowitz
2004-03-17 16:07             ` 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=4050F435.1040906@gnu.org \
    --to=cagney@gnu.org \
    --cc=drow@false.org \
    --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