On 8/24/07, Bob Rossi <bob...@co...> wrote:
> On Thu, Aug 23, 2007 at 11:55:37PM +0300, Gilboa Davara wrote:
> > OK, more luck then brains on my part.
> > While redoing the patch I found a nice way to reduce the layering breakage.
> > This once should apply nicely against the current trunk.
>
> Hi Gilboa,
>
> I've looked over this patch. I'm not entirely sure what you are trying
> to accomplish, maybe you could shed some light for me.
OK, My bad. I should have added a a bit of info the patch. (I'm used
to sending fixes and not patches... so it'll take me some time to
adjust ;))
I want to the keyboard management infrastructure to use the same
COMMANDS interface the normal cgdb command interface does.
The reason for it is simple, I want support for a number of gdb
commands. (Start/stop/kill/Ctrl-C/etc) and as it stands, I'll have to
add each command twice, once into the command interface and another
into the switch/case inside source_input. (And a third addition to
the TGDB infrastructure)
A short sample will be more effective. (Attached)
> For instance, what is the reason to not use the source_vscroll function to
> move a page up or down?
The current COMMANDS structure uses a static param.
Currently, when scrolling (half) page up/down, you pass non-static
signed integer offset to source_vscroll.
If I want bolt source_[vh]scroll into COMMANDS, they must accept
static parameter from COMMANDS. (Hence the _page version).
In the beginning I though about adding flags to source_[vh]scroll
offset. But given the fact that offset is signed, It would have made
the code much less readable.
> BTW, I think it's possible to ask the source window how big it is. That
> would be a more clever way of getting the height than calling the
> get_src_height() function.
/+1.
>
> Also, why pass the sview object to all of the configuration commands?
> It's always possible to simply call if_get_sview () if it's necessary.
>
In-order to create a single command interface that can handle anything
- from source windows redraw/resize/move/close to TGDB commands, I
need to add the sviewer pointer for source-window handling commands.
- Gilboa
|