diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-05-30 19:05:33 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-05-30 19:05:33 +0000 |
commit | ea025f5f6106407104418941ea81bebc41e12661 (patch) | |
tree | 2386ae588f3f7f9475334db4de3b4acdf9968e12 /gdb/gdbserver/remote-utils.c | |
parent | 24718e3ba575439155f233fc593a9ebd6d33f3c5 (diff) | |
download | gdb-ea025f5f6106407104418941ea81bebc41e12661.zip gdb-ea025f5f6106407104418941ea81bebc41e12661.tar.gz gdb-ea025f5f6106407104418941ea81bebc41e12661.tar.bz2 |
* remote-utils.c (all_symbols_looked_up): New variable.
(look_up_one_symbol): Check it.
* server.h (look_up_one_symbol): New declaration.
* thread-db.c (thread_db_init): Set all_symbols_looked_up.
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r-- | gdb/gdbserver/remote-utils.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index b8634e8..60403ff 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -1,6 +1,6 @@ /* Remote utility routines for the remote server for GDB. Copyright (C) 1986, 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005 + 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GDB. @@ -52,6 +52,10 @@ struct sym_cache /* The symbol cache. */ static struct sym_cache *symbol_cache; +/* If this flag has been set, assume cache misses are + failures. */ +int all_symbols_looked_up; + int remote_debug = 0; struct ui_file *gdb_stdlog; @@ -769,6 +773,14 @@ look_up_one_symbol (const char *name, CORE_ADDR *addrp) return 1; } + /* If we've passed the call to thread_db_look_up_symbols, then + anything not in the cache must not exist; we're not interested + in any libraries loaded after that point, only in symbols in + libpthread.so. It might not be an appropriate time to look + up a symbol, e.g. while we're trying to fetch registers. */ + if (all_symbols_looked_up) + return 0; + /* Send the request. */ strcpy (own_buf, "qSymbol:"); hexify (own_buf + strlen ("qSymbol:"), name, strlen (name)); |