forked from Imagelibrary/binutils-gdb
gdb:
* common/agent.c (agent_look_up_symbols): Add one parameter 'arg'.
* common/agent.h: Update declaration.
* inf-child.c (inf_child_use_agent): New.
(inf_child_can_use_agent): New.
(inf_child_target): Initialize fields `to_use_agent'
and `to_can_use_agent'.
* agent.c (agent_new_objfile): New.
(_initialize_agent): Add agent_new_objfile to new_objfile
observer.
* linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
New.
(linux_target_install_ops): Initialize field
`to_static_tracepoint_markers_by_strid'.
* remote.c (free_current_marker): Move it to ...
* tracepoint.c (free_current_marker): ... here. New.
(cleanup_target_stop): New.
* tracepoint.h: Declare free_current_marker.
* NEWS: Add one entry about `info static-tracepoint-marker'.
gdb/gdbserver:
* tracepoint.c (tracepoint_look_up_symbols): Update call to
agent_look_up_symbols.
gdb/testsuite:
* gdb.trace/strace.exp: run strace_info_marker in linux native gdb.
This commit is contained in:
14
gdb/agent.c
14
gdb/agent.c
@@ -54,9 +54,23 @@ set_can_use_agent (char *args, int from_tty, struct cmd_list_element *c)
|
||||
/* -Wmissing-prototypes */
|
||||
extern initialize_file_ftype _initialize_agent;
|
||||
|
||||
#include "observer.h"
|
||||
#include "objfiles.h"
|
||||
|
||||
static void
|
||||
agent_new_objfile (struct objfile *objfile)
|
||||
{
|
||||
if (objfile == NULL || agent_loaded_p ())
|
||||
return;
|
||||
|
||||
agent_look_up_symbols (objfile);
|
||||
}
|
||||
|
||||
void
|
||||
_initialize_agent (void)
|
||||
{
|
||||
observer_attach_new_objfile (agent_new_objfile);
|
||||
|
||||
add_setshow_enum_cmd ("agent", class_run,
|
||||
can_use_agent_enum,
|
||||
&can_use_agent, _("\
|
||||
|
||||
Reference in New Issue
Block a user