diff options
author | Pedro Alves <palves@redhat.com> | 2010-05-03 18:13:36 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-05-03 18:13:36 +0000 |
commit | 9836d6ea69b99b5ed77e0f2c2c500b144ab95018 (patch) | |
tree | c76cfc047a1765d4617a28a124012d81f2b5d3e2 /gdb/gdbserver/remote-utils.c | |
parent | fa23f0f49a6179dcc7252e660ad60f1cf87665f2 (diff) | |
download | binutils-gdb-9836d6ea69b99b5ed77e0f2c2c500b144ab95018.tar.gz |
gdb/gdbserver/
* proc-service.c (ps_pglobal_lookup): Use
thread_db_look_up_one_symbol.
* remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
parameter. Use it instead of all_symbols_looked_up.
* server.h (struct process_info) <all_symbols_looked_up>: Delete
field.
(all_symbols_looked_up): Don't declare.
(look_up_one_symbol): Add new `may_ask_gdb' parameter.
* thread-db.c (struct thread_db) <all_symbols_looked_up>: New
field.
(thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
Set all_symbols_looked_up here.
(thread_db_look_up_one_symbol): New.
(thread_db_get_tls_address): Adjust.
(thread_db_load_search, try_thread_db_load_1): Always allocate the
thread_db object on the heap, and tentatively set it in the
process structure.
(thread_db_init): Don't set all_symbols_looked_up here.
* linux-low.h (thread_db_look_up_one_symbol): Declare.
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r-- | gdb/gdbserver/remote-utils.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 2fccc67595f..2bbce67e844 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -1411,11 +1411,12 @@ clear_symbol_cache (struct sym_cache **symcache_p) *symcache_p = NULL; } -/* Ask GDB for the address of NAME, and return it in ADDRP if found. +/* Get the address of NAME, and return it in ADDRP if found. if + MAY_ASK_GDB is false, assume symbol cache misses are failures. Returns 1 if the symbol is found, 0 if it is not, -1 on error. */ int -look_up_one_symbol (const char *name, CORE_ADDR *addrp) +look_up_one_symbol (const char *name, CORE_ADDR *addrp, int may_ask_gdb) { char own_buf[266], *p, *q; int len; @@ -1432,12 +1433,9 @@ 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 (proc->all_symbols_looked_up) + /* It might not be an appropriate time to look up a symbol, + e.g. while we're trying to fetch registers. */ + if (!may_ask_gdb) return 0; /* Send the request. */ |