i387-fp.o: i387-fp.c $(server_h)
linux-low.o: linux-low.c $(linux_low_h) $(linux_ptrace_h) $(linux_procfs_h) \
- $(server_h) $(linux_osdata_h)
+ $(server_h) $(linux_osdata_h) $(agent_h)
$(CC) -c $(CPPFLAGS) $(INTERNAL_CFLAGS) $< @USE_THREAD_DB@
linux-arm-low.o: linux-arm-low.c $(linux_low_h) $(server_h) \
linux-sh-low.o: linux-sh-low.c $(linux_low_h) $(server_h)
linux-tic6x-low.o: linux-tic6x-low.c $(linux_low_h) $(server_h)
linux-x86-low.o: linux-x86-low.c $(linux_low_h) $(server_h) \
- $(gdb_proc_service_h) $(i386_low_h)
+ $(gdb_proc_service_h) $(i386_low_h) $(agent_h)
linux-xtensa-low.o: linux-xtensa-low.c xtensa-xtregs.c $(linux_low_h) $(server_h)
lynx-low.o: lynx-low.c $(server_h) $(target_h) $(lynx_low_h)
#include "server.h"
#include "linux-low.h"
#include "linux-osdata.h"
+#include "agent.h"
#include <sys/wait.h>
#include <stdio.h>
if ((wstat == NULL
|| (WIFSTOPPED (*wstat) && WSTOPSIG (*wstat) != SIGTRAP))
&& supports_fast_tracepoints ()
- && in_process_agent_loaded ())
+ && agent_loaded_p ())
{
struct fast_tpoint_collect_status status;
int r;
if (WIFSTOPPED (w)
&& WSTOPSIG (w) != SIGTRAP
&& supports_fast_tracepoints ()
- && in_process_agent_loaded ())
+ && agent_loaded_p ())
{
if (debug_threads)
fprintf (stderr,
/* Allow debugging the jump pad, gdb_collect, etc.. */
return (supports_fast_tracepoints ()
- && in_process_agent_loaded ()
+ && agent_loaded_p ()
&& (gdb_breakpoint_here (lwp->stop_pc)
|| lwp->stopped_by_watchpoint
|| thread->last_resume_kind == resume_step)
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
{
int loaded = 0;
- if (!in_process_agent_loaded ())
+ if (!agent_loaded_p ())
{
warning ("In-process agent not loaded");
return 0;
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;
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;
{
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++)
}
}
- if (agent_look_up_symbols () != 0)
- return;
-
- all_tracepoint_symbols_looked_up = 1;
+ agent_look_up_symbols ();
}
#endif
{
struct tracepoint *tp;
- if (!in_process_agent_loaded ())
+ if (!agent_loaded_p ())
{
trace_debug ("Requested a %s tracepoint, but fast "
"tracepoints aren't supported.",
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 ();
/* 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");
/* 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");
/* 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,
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);
/* 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
/* 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 ();