Loading ...
Sorry, an error occurred while loading the content.

35805RE: VimGDB future

Expand Messages
  • Xavier de Gaye
    Apr 14, 2004
      On Mon, 5 Apr 2004, Bram Moolenaar wrote:

      > [...]
      >
      > > Keeping VimGDB and Vim as *two separate processes* and removing VimGDB
      > > controlling terminal, your sketch becomes:
      > >
      > >
      > >
      > > +==============+
      > > | |
      > > | VIM window |
      > > | |
      > > +==============+
      > > | (c)
      > > |
      > > +--------------+ +--------------+
      > > | | | |
      > > | VimGDB' |---------| VIM |
      > > | | (b) | |
      > > +--------------+ +--------------+
      > > | (a)
      > > |
      > > +--------------+
      > > | |
      > > | gdb |
      > > | |
      > > +--------------+
      > >
      > > (a) gdb terminal I/O
      > > (b) NetBeans interface
      > > (c) Vim terminal I/O
      > >
      > > The NetBeans interface (b) would need to be improved so that:
      > >
      > > . a Vim |+eval| function named f_nbinput() sends all its user
      > > input to the NetBeans interface. The NetBeans interface sends
      > > these user input as NetBeans events to the external application
      > > (VimGDB in the sketch).
      >
      > I don't quite get how this works. Is this a separate mode in which
      > every typed character is send over the NetBeans interface? That sounds
      > like the user-input side of a terminal. Isn't this very similar to "Vim
      > provides a terminal window, where I/O of an external application is
      > handled"?

      No, this is used for mapping commands to key sequences.


      >
      > > . a NetBeans command allows the external application to send
      > > error and warning messages that are displayed by the NetBeans
      > > interface as Vim error and warning messages
      >
      > That is relatively simple to do.
      >
      > > . the scheme that is used by the current VimGDB implementation to
      > > pop up an input-line window can be used by the NetBeans interface.
      > > (see http://skawina.eu.org/mikolaj/vimgdb/gdb_design.html,
      > > search for input-line in this text)
      > > A NetBeans command allows the external application to trigger
      > > the pop up of this window with text added to the current last
      > > line (same behavior as current VimGDB when GDB sends a query
      > > yes/no for example or sends a completion result, or waits for
      > > user input while entering a GDB "commands" with the ">" prompt,
      > > etc...)
      >
      > Handling the input-line somewhere deep down in the character input
      > functions looks like a very bad architecture to me. It's like Vim is
      > expecting the user to type a character (Normal command or text to be
      > inserted), and instead of that suddenly a new window is created.
      > I don't see the details, but inserting something in the input stream
      > similar to a CTRL-W s command would be more appropriate.

      It is not right to say that the input-line is handled somewhere
      deep down in the character input functions:

      . Vim is expecting the user to type a character and gets
      got_int TRUE, which is what happens when the user hits
      <CTRL-C>

      . Vim then returns to Normal mode and the main loop after
      flushing its internal typeahead and stuff buffers

      . up to now, it's all standard Vim behavior

      . *From main_loop* VimGDB inserts characters in the
      typeahead buffer (this is also done by the ClientServer
      code for example and in many other places in Vim code)

      . the characters inserted are "<CTRL-F>a", this is used
      to start automatically the input-line window in insert
      mode

      . VimGDB runs *from main_loop* the Vim function
      getcmdline_prompt((int)'@', NULL, 0);
      that creates the input-line window

      . the input-line window is the same kind of window
      as the command-line window, no VimGDB specific processing
      is *ever* done in this window, it is no more a "terminal
      window" than the command-line window may be called one
      of such things for example

      I don't understand the relationship between CTRL-W s command
      and the input stream.

      I am going to try adapting VimGDB to your original sketch
      where VimGDB' is a separate task, uses its own "screen" or
      xterm window and is interfaced to Vim through the
      standard NetBeans.

      Xavier...



      __________________________________________________________________
      Introducing the New Netscape Internet Service.
      Only $9.95 a month -- Sign up today at http://isp.netscape.com/register

      Netscape. Just the Net You Need.

      New! Netscape Toolbar for Internet Explorer
      Search from anywhere on the Web and block those annoying pop-ups.
      Download now at http://channels.netscape.com/ns/search/install.jsp
    • Show all 29 messages in this topic