Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: PATCH: PR tui/2173: Arrow keys no longer works in breakpoint command list
@ 2007-06-03 22:54 Nick Roberts
  2007-06-03 23:10 ` Andreas Schwab
  2007-06-04  1:06 ` Daniel Jacobowitz
  0 siblings, 2 replies; 7+ messages in thread
From: Nick Roberts @ 2007-06-03 22:54 UTC (permalink / raw)
  To: gdb


This change breaks the behaviour of annotations with commands that span
multiple lines, like if, while, etc:

2007-01-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Daniel Jacobowitz  <dan@codesourcery.com>

	* Makefile.in (top.o): Update.
	* top.c (gdb_readline_wrapper_done, gdb_readline_wrapper_result)
	(saved_after_char_processing_hook, gdb_readline_wrapper_line)
	(struct gdb_readline_wrapper_cleanup, gdb_readline_wrapper_cleanup):
	New.
	(gdb_readline_wrapper): Rewrite to use asynchronous readline.


To see this compare the output of GDB in CVS with that of 6.6 for the simple
construct:

(gdb) if
 >end
(gdb)

With 6.6, omitting ^Z^Z, (gdb -ann=3):

  pre-prompt
(gdb) 
  prompt
if 1

  post-prompt

  pre-commands
 >
  commands
end

  post-commands

  pre-prompt
(gdb) 
  prompt


With GDB in CVS:


  pre-prompt
(gdb) 
  prompt
if 1

  post-prompt

  pre-commands

  pre-prompt
 >
  commands

  prompt
end

  pre-prompt
 >
  commands

  prompt

  post-commands

  pre-prompt
(gdb) 
  prompt


where superfluous pre-prompt,prompt and commands annotations are output
(and an extra ">").

-- 
Nick                                           http://www.inet.net.nz/~nickrob


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: PR tui/2173: Arrow keys no longer works in breakpoint command list
  2007-06-03 22:54 PATCH: PR tui/2173: Arrow keys no longer works in breakpoint command list Nick Roberts
@ 2007-06-03 23:10 ` Andreas Schwab
  2007-06-03 23:13   ` Andreas Schwab
  2007-06-04  1:06 ` Daniel Jacobowitz
  1 sibling, 1 reply; 7+ messages in thread
From: Andreas Schwab @ 2007-06-03 23:10 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb

Nick Roberts <nickrob@snap.net.nz> writes:

> (and an extra ">").

It's not extra, it's the prompt.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: PR tui/2173: Arrow keys no longer works in breakpoint command list
  2007-06-03 23:10 ` Andreas Schwab
@ 2007-06-03 23:13   ` Andreas Schwab
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2007-06-03 23:13 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb

Andreas Schwab <schwab@suse.de> writes:

> Nick Roberts <nickrob@snap.net.nz> writes:
>
>> (and an extra ">").
>
> It's not extra, it's the prompt.

Please ignore that.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: PR tui/2173: Arrow keys no longer works in breakpoint  command list
  2007-06-03 22:54 PATCH: PR tui/2173: Arrow keys no longer works in breakpoint command list Nick Roberts
  2007-06-03 23:10 ` Andreas Schwab
@ 2007-06-04  1:06 ` Daniel Jacobowitz
  2007-06-04  2:09   ` Nick Roberts
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2007-06-04  1:06 UTC (permalink / raw)
  To: Nick Roberts; +Cc: gdb

On Mon, Jun 04, 2007 at 10:54:25AM +1200, Nick Roberts wrote:
> 
> This change breaks the behaviour of annotations with commands that span
> multiple lines, like if, while, etc:

Sorry, I didn't even know we had special annotations for this (and the
testsuite must not cover it).  I'm not sure how to fix it, either -
the patch you cited was very tricky to come up with already :-(

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: PR tui/2173: Arrow keys no longer works in breakpoint  command list
  2007-06-04  1:06 ` Daniel Jacobowitz
@ 2007-06-04  2:09   ` Nick Roberts
  2007-06-09 19:29     ` Jan Kratochvil
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Roberts @ 2007-06-04  2:09 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

 > > This change breaks the behaviour of annotations with commands that span
 > > multiple lines, like if, while, etc:
 > 
 > Sorry, I didn't even know we had special annotations for this (and the
 > testsuite must not cover it).  I'm not sure how to fix it, either -
 > the patch you cited was very tricky to come up with already :-(

I've not read the thread (it looked quite long) but the problem the patch
fixes (which seems to be for CLI, not TUI) doesn't seem important enough
to justify such an invasive change (apologies, if it fixed further problems).

For now, could you please just revert it?  From my point of view, it creates
a bigger problem than it fixes.  Emacs 22 has just been released (but not
announced).  The plan is to migrate fully to MI, at which point, annotations
could be removed altogether.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: PR tui/2173: Arrow keys no longer works in breakpoint  command list
  2007-06-04  2:09   ` Nick Roberts
@ 2007-06-09 19:29     ` Jan Kratochvil
  2007-06-10  1:02       ` Asynchronous Gdb [was Re: PATCH: PR tui/2173: Arrow keys no longer works in breakpoint command list] Nick Roberts
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kratochvil @ 2007-06-09 19:29 UTC (permalink / raw)
  To: Nick Roberts; +Cc: Daniel Jacobowitz, gdb

On Mon, 04 Jun 2007 04:09:19 +0200, Nick Roberts wrote:
...
> > I'm not sure how to fix it, either -
> > the patch you cited was very tricky to come up with already :-(

The whole reason why the patch was so tricky was giving up on using the
synchronous readline () call.  Replacing it with the other callbacked
possibilities is not going to be backward compatible as readline () behavior is
too complex.

Going to provide a libreadline patch #2 but unfortunately only later.


> I've not read the thread (it looked quite long) but the problem the patch
> fixes (which seems to be for CLI, not TUI) doesn't seem important enough
> to justify such an invasive change (apologies, if it fixed further problems).
> 
> For now, could you please just revert it?

Voting for its temporary removal (and it is going to be done for Red Hat GDB).


Regards,
Jan


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Asynchronous Gdb [was Re: PATCH: PR tui/2173: Arrow keys no longer works in breakpoint command list]
  2007-06-09 19:29     ` Jan Kratochvil
@ 2007-06-10  1:02       ` Nick Roberts
  0 siblings, 0 replies; 7+ messages in thread
From: Nick Roberts @ 2007-06-10  1:02 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Daniel Jacobowitz, gdb

 > > > I'm not sure how to fix it, either -
 > > > the patch you cited was very tricky to come up with already :-(
 > 
 > The whole reason why the patch was so tricky was giving up on using the
 > synchronous readline () call.  Replacing it with the other callbacked
 > possibilities is not going to be backward compatible as readline () behavior
 > is too complex.
 > 
 > Going to provide a libreadline patch #2 but unfortunately only later.

Does this mean that you're interested in getting gdb to work asynchronously?  I
have submitted a patch to go some way towards doing this
(http://sourceware.org/ml/gdb-patches/2006-11/msg00225.html) and would like to
help with that work, but admit that I don't fully understand the issues.

The impression I get is that asynchronous operation of Gdb was a large project
that Red Hat (and possibly Apple) started but never finished.  I think Elena
Zannoni did much of the work and I realise it is unlikely that she will
continue with it.  However, it would be helpful if Red Hat could document the
underlying logic of these changes in the GDB Internals manual.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-06-10  1:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-03 22:54 PATCH: PR tui/2173: Arrow keys no longer works in breakpoint command list Nick Roberts
2007-06-03 23:10 ` Andreas Schwab
2007-06-03 23:13   ` Andreas Schwab
2007-06-04  1:06 ` Daniel Jacobowitz
2007-06-04  2:09   ` Nick Roberts
2007-06-09 19:29     ` Jan Kratochvil
2007-06-10  1:02       ` Asynchronous Gdb [was Re: PATCH: PR tui/2173: Arrow keys no longer works in breakpoint command list] Nick Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox