This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Cached function lookup
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Klee Dienes <kdienes at apple dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 10 Mar 2002 00:54:41 -0500
- Subject: Re: [RFA] Cached function lookup
- References: <8A9ABA76-1A1B-11D6-BA6D-0030653FA4C6@apple.com>
> This patch allows functions in the target used by GDB ("malloc",
> "scm_lookup_cstr", and later a ton of Objective-C functions) to have
> their values cached and re-used unless the symbol table has changed
> in-between calls. This is a performance win overall, and a particular
> win when dispatching Objective-C method calls and looking up
> Objective-C type information from the runtime.
For the breakpoint changes, assuming that the function-cache code is
committed, can the two declarations:
> +extern unsigned int symbol_generation;
> +
> /* Interface: */
> /* Clear a bpstat so that it says we are not at any breakpoint.
> Also free any storage that is part of a bpstat. */
> @@ -525,6 +527,8 @@
> extern int breakpoint_thread_match (CORE_ADDR, ptid_t);
>
> extern void until_break_command (char *, int);
> +
> +extern void breakpoint_update (void);
be removed (made static)?
Can I suggest adding a comment explaining that the re_set is delayed
until the breakpoints are re-inserted.
> extern void breakpoint_re_set (void);
Hmm, I can think of two race conditions:
o
with the function-cache code - I don't think
this matters - the cache is always flushed flushed
before breakpoint code does the update (and the
breakpoint code doesn't actually use the function
cache (?)).
o
with things like ``info breakpoints''
Do those functions also need to breakpoint_update()?
enjoy,
Andrew