This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Make interrupting tab-completion safe.
- From: Sterling Augustine <saugustine at google dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 11 Jul 2011 11:42:23 -0700
- Subject: Re: [PATCH] Make interrupting tab-completion safe.
- References: <BANLkTikW2qaihdZ2zGxx6K+4q8eGzFZOr3mcbPdZsJ+2Ra=YXQ@mail.gmail.com> <20110612121158.GA10611@host1.jankratochvil.net> <BANLkTik1Z5GoCjNP9enPJeLThVk=g9Aj5ZF6zeDULburd2w=bw@mail.gmail.com>
On Mon, Jun 13, 2011 at 10:44 AM, Sterling Augustine
<saugustine@google.com> wrote:
> On Sun, Jun 12, 2011 at 5:11 AM, Jan Kratochvil
> <jan.kratochvil@redhat.com> wrote:
> The race is between the conversion from psymtab to full symtab and you
> hitting ctrl-c. Some of this time is also spent handling filename
> completion, which doesn't have the problem. You need to be sure to
> interrupt c_type_print_args, when called from dwarf2read.c:5049.
>
>> It would be good to have a testcase for regressions anyway.
>
> Is there an existing test-case I can model this one on? (One that
> sends an asynchronous sigint to gdb is probably enough.) I can't seem
> to find any, but my deja-gnu foo is weak.
(Ping on this patch)
Writing a generic reproducible test-case for this is pretty hard.
Calling QUIT from dwarf2read.c:5049 is necessary, but not sufficient.
Counting QUITs is not a good solution, because recompiling the target
program can change the counts.
If I modify the source such that dwarf2read.c:5049 is the only place
that calls QUIT, reproducing it is easy, but that clearly isn't a good
way of writing a test case.
My understanding is that dwarf reading is not expected to be
interruptable, so I would expect something like this to be acceptable
without a new test.
Is there some other approach--short of rewriting all the *type_print*
stuff--that would be acceptable? I'd love to close out this problem.
Sterling