-/* Copyright (C) 2012-2020 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2021 Free Software Foundation, Inc.
This file is part of GDB.
static const char can_use_agent_on[] = "on";
static const char can_use_agent_off[] = "off";
-static const char *can_use_agent_enum[] =
+static const char * const can_use_agent_enum[] =
{
can_use_agent_on,
can_use_agent_off,
if (can_use && !agent_loaded_p ())
{
/* Since the setting was off, we may not have observed the objfiles and
- therefore not looked up the required symbols. Do so now. */
+ therefore not looked up the required symbols. Do so now. */
for (objfile *objfile : current_program_space->objfiles ())
if (agent_look_up_symbols (objfile) == 0)
break;
void
_initialize_agent ()
{
- gdb::observers::new_objfile.attach (agent_new_objfile);
+ gdb::observers::new_objfile.attach (agent_new_objfile,
+ "agent");
add_setshow_enum_cmd ("agent", class_run,
can_use_agent_enum,