On 8/6/07, Bob Rossi <bob...@co...> wrote:
> On Mon, Aug 06, 2007 at 04:20:17PM +0300, Gilboa Davara wrote:
> > On 8/6/07, Bob Rossi <bob...@co...> wrote:
> > > On Sun, Aug 05, 2007 at 11:50:43PM +0300, Gilboa Davara wrote:
> > > > I'm not sure I got the question:
> > > > First patch cleans up the command code.
> > > > Tomorrow (or the day after - I'm been recovering from a massive RAID
> > > > upgrade) I'll be posting a second patch that will merge the key-store
> > > > and command interface.
> > >
> > > OK. Sounds good. What exactly will this patch do? I know you are saying
> > > 'key-store', I'm not sure what that means.
> >
> > Ouch... Had a bad Piglish day yesterday.
> > What I meant was: Merge the keyboard bind interface with the command
> > event handlers into a single event handler.
> > It should reduce the over-head of adding new commands/keyboard binds
> > (both code and performance wise) considerably.
>
> Well, I still don't fully understand what you mean. Could you provide an
> example of how this would work, and what you would modify? I want to
> make sure I don't waste your time by having you write a patch that I
> wouldn't want to apply.
>
> I'm not sure if this effects what you are thinking, but I have already
> implemented 90% of the mapping functionality. This provides map, imap,
> unmap and iunmap. It isn't currently documented because it doesn't work
> perfectly. The user can easily make a map that will cause cgdb to
> go into an infinate loop. When you use the term, "keyboard binds" are
> you thinking of mapping functionality or something more high level?
>
> Thanks,
> Bob Rossi
The idea is fairly simple:
Currently, TGDB_RUN is being executed from two different contexts:
- cgdb command interface. (get_command)
- keyboard interface. (source_input).
My plan is simple - merge the non vim parts (read: Start/stop/quit/add
brk/remove brk/etc) of source_input static case/switch line into
entries within get_command and add "keyboard" support to the CCOMMAND
structures.
Once done, adding a new command/static keyboard bind will only require
adding a new entry into the CCOMMAND array. (instead of adding
yet-another-case in source_input)
- Gilboa
|