aboutsummaryrefslogtreecommitdiff
path: root/gdb/agent.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/agent.c')
-rw-r--r--gdb/agent.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/agent.c b/gdb/agent.c
index 2009980..c01f532 100644
--- a/gdb/agent.c
+++ b/gdb/agent.c
@@ -52,8 +52,8 @@ set_can_use_agent (const char *args, int from_tty, struct cmd_list_element *c)
{
/* Since the setting was off, we may not have observed the objfiles and
therefore not looked up the required symbols. Do so now. */
- for (objfile *objfile : current_program_space->objfiles ())
- if (agent_look_up_symbols (objfile) == 0)
+ for (objfile &objfile : current_program_space->objfiles ())
+ if (agent_look_up_symbols (&objfile) == 0)
break;
}
if (target_use_agent (can_use) == 0)
@@ -73,9 +73,7 @@ agent_new_objfile (struct objfile *objfile)
agent_look_up_symbols (objfile);
}
-void _initialize_agent ();
-void
-_initialize_agent ()
+INIT_GDB_FILE (agent)
{
gdb::observers::new_objfile.attach (agent_new_objfile,
"agent");