diff options
author | Yao Qi <yao@codesourcery.com> | 2012-03-03 04:34:52 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2012-03-03 04:34:52 +0000 |
commit | 58b4daa56a17c2baffb4a64abdf68427680e8c45 (patch) | |
tree | 4bc17cd1b984cb43f878c6fe94a47e703a3c959c /gdb/gdbserver/tracepoint.c | |
parent | 8ffcbaaf40fd5eac75e04570c6b8989a70276578 (diff) | |
download | gdb-58b4daa56a17c2baffb4a64abdf68427680e8c45.zip gdb-58b4daa56a17c2baffb4a64abdf68427680e8c45.tar.gz gdb-58b4daa56a17c2baffb4a64abdf68427680e8c45.tar.bz2 |
gdb:
* common/agent.c (agent_loaded_p): New.
(agent_look_up_symbols): New global.
* common/agent.h: Declare agent_loaded_p.
gdb/gdbserver:
* Makefile.in (linux-low.o): Keep dependence on agent.h.
(linux-x86-low.o): Likewise.
* server.h: Remove in_process_agent_loaded.
* tracepoint.c (in_process_agent_loaded): Removed. Moved it
common/agent.c.
Update callers.
Diffstat (limited to 'gdb/gdbserver/tracepoint.c')
-rw-r--r-- | gdb/gdbserver/tracepoint.c | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index bef28a3..ac3312f 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -221,14 +221,6 @@ static struct static struct ipa_sym_addresses ipa_sym_addrs; -int all_tracepoint_symbols_looked_up; - -int -in_process_agent_loaded (void) -{ - return all_tracepoint_symbols_looked_up; -} - static int read_inferior_integer (CORE_ADDR symaddr, int *val); /* Returns true if both the in-process agent library and the static @@ -240,7 +232,7 @@ in_process_agent_supports_ust (void) { int loaded = 0; - if (!in_process_agent_loaded ()) + if (!agent_loaded_p ()) { warning ("In-process agent not loaded"); return 0; @@ -291,7 +283,7 @@ write_e_ust_not_loaded (char *buffer) static int maybe_write_ipa_not_loaded (char *buffer) { - if (!in_process_agent_loaded ()) + if (!agent_loaded_p ()) { write_e_ipa_not_loaded (buffer); return 1; @@ -306,7 +298,7 @@ maybe_write_ipa_not_loaded (char *buffer) static int maybe_write_ipa_ust_not_loaded (char *buffer) { - if (!in_process_agent_loaded ()) + if (!agent_loaded_p ()) { write_e_ipa_not_loaded (buffer); return 1; @@ -330,7 +322,7 @@ tracepoint_look_up_symbols (void) { int i; - if (all_tracepoint_symbols_looked_up) + if (agent_loaded_p ()) return; for (i = 0; i < sizeof (symbol_list) / sizeof (symbol_list[0]); i++) @@ -346,10 +338,7 @@ tracepoint_look_up_symbols (void) } } - if (agent_look_up_symbols () != 0) - return; - - all_tracepoint_symbols_looked_up = 1; + agent_look_up_symbols (); } #endif @@ -2907,7 +2896,7 @@ install_tracepoint (struct tracepoint *tpoint, char *own_buf) { struct tracepoint *tp; - if (!in_process_agent_loaded ()) + if (!agent_loaded_p ()) { trace_debug ("Requested a %s tracepoint, but fast " "tracepoints aren't supported.", @@ -2983,7 +2972,7 @@ cmd_qtstart (char *packet) pause_all (1); /* Sync the fast tracepoints list in the inferior ftlib. */ - if (in_process_agent_loaded ()) + if (agent_loaded_p ()) { download_tracepoints (); download_trace_state_variables (); @@ -3084,7 +3073,7 @@ cmd_qtstart (char *packet) /* Tracing is now active, hits will now start being logged. */ tracing = 1; - if (in_process_agent_loaded ()) + if (agent_loaded_p ()) { if (write_inferior_integer (ipa_sym_addrs.addr_tracing, 1)) fatal ("Error setting tracing variable in lib"); @@ -3143,7 +3132,7 @@ stop_tracing (void) /* Stop logging. Tracepoints can still be hit, but they will not be recorded. */ tracing = 0; - if (in_process_agent_loaded ()) + if (agent_loaded_p ()) { if (write_inferior_integer (ipa_sym_addrs.addr_tracing, 0)) fatal ("Error clearing tracing variable in lib"); @@ -3191,7 +3180,7 @@ stop_tracing (void) /* Clear out the tracepoints. */ clear_installed_tracepoints (); - if (in_process_agent_loaded ()) + if (agent_loaded_p ()) { /* Pull in fast tracepoint trace frames from the inferior lib buffer into our buffer, even if our buffer is already full, @@ -3354,7 +3343,7 @@ cmd_qtstatus (char *packet) trace_debug ("Returning trace status as %d, stop reason %s", tracing, tracing_stop_reason); - if (in_process_agent_loaded ()) + if (agent_loaded_p ()) { pause_all (1); @@ -4022,7 +4011,7 @@ tracepoint_finished_step (struct thread_info *tinfo, CORE_ADDR stop_pc) /* Pull in fast tracepoint trace frames from the inferior lib buffer into our buffer. */ - if (in_process_agent_loaded ()) + if (agent_loaded_p ()) upload_fast_traceframes (); /* Check if we were indeed collecting data for one of more @@ -4123,7 +4112,7 @@ handle_tracepoint_bkpts (struct thread_info *tinfo, CORE_ADDR stop_pc) /* Pull in fast tracepoint trace frames from the inferior in-process agent's buffer into our buffer. */ - if (!in_process_agent_loaded ()) + if (!agent_loaded_p ()) return 0; upload_fast_traceframes (); |