This is the mail archive of the gdb@sourceware.cygnus.com 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]

Re: libGDB architecture


Andrew Cagney <ac131313@cygnus.com> writes:


> 
> I think a better (safer, more likely to succeed) approach would be to,
> in parallel with the introduction of a robust interface, start
> investigating what have been identified as other (likely) hot spots. 
> Interestingly, many of the below are actually independent of the libGDB
> interface:
> 

I agree with Andrew here.  We can get a lot of benefit just breaking
down some of the atomic operations in the GDB interface into useable
bits.  We have already done this with the variable interface (see
gdbtk-variable.c)   Another example where you need to do this is in
the backtrace command.  For most GUI purposes, you really don't want
an undifferentiated list of 100 stack elements with all their
arguments, names, types...  Parsing and displaying this was very
slow.  You really want one command that just gives you the list of
functions on the stack.  Then a way to get the args (preferrably
already list-ified) for each level.  That way you can do intelligent
things like only fetch what fits in the current window, and get the
others on scrolling or whatever...

This is just one other example.  There are other places where
providing a more discrete interface into gdb would be a big benefit,
and probably reduce most of the need to get your hands on the actual
data in gdb.

I am still worried about parsing very large arrays, etc, however.  For 
this to be fast, you probably will have to somehow get the data
directly... 
 
> Your too trusting :-)
> 
> 	Andrew
> 
> PS: See Tcl_IncrRefCount and Tcl_DecrRefCount

There are actually two places where Tcl does preservation of data.
One is in the Object system, which uses the calls Andrew sites above,
and one is for clients that want to hold data over a call that may
potentially free it - see Tcl_Preserve and Tcl_EventuallyFree.

Jim
-- 
++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++
Jim Ingham                                              jingham@cygnus.com
Cygnus Solutions Inc.

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