This is the mail archive of the gdb@sourceware.org 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: PATCH: PR tui/2173: Arrow keys no longer works in breakpoint command list


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


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