doc/
2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com> * gdb.texinfo (Server): Document libthread-db-search-path. gdbserver/ 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com> * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove. * configure.ac: Adjust. * linux-low.h (struct process_info_private): Move members to struct thread_db. (thread_db_free, thread_db_handle_monitor_command): New prototype. * linux-low.c (linux_remove_process): Adjust. (linux_wait_for_event_1, linux_look_up_symbols): Likewise. * server.c (handle_query): Move code ... (handle_monitor_command): ... here. New function. * target.h (struct target_ops): New member. * thread-db.c (struct thread_db): New. (libthread_db_search_path): New variable. (thread_db_create_event, thread_db_enable_reporting) (find_one_thread, maybe_attach_thread, find_new_threads_callback) (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust. (try_thread_db_load_1, dladdr_to_soname): New functions. (try_thread_db_load, thread_db_load_search): New functions. (thread_db_init): Search for libthread_db. (thread_db_free): New function. (thread_db_handle_monitor_command): Likewise. * config.in: Regenerate. * configure: Regenerate.
This commit is contained in:
parent
37e124c9c3
commit
cdbfd4198e
11 changed files with 432 additions and 343 deletions
|
@ -660,6 +660,53 @@ handle_search_memory (char *own_buf, int packet_len)
|
|||
return; \
|
||||
}
|
||||
|
||||
/* Handle monitor commands not handled by target-specific handlers. */
|
||||
|
||||
static void
|
||||
handle_monitor_command (char *mon)
|
||||
{
|
||||
if (strcmp (mon, "set debug 1") == 0)
|
||||
{
|
||||
debug_threads = 1;
|
||||
monitor_output ("Debug output enabled.\n");
|
||||
}
|
||||
else if (strcmp (mon, "set debug 0") == 0)
|
||||
{
|
||||
debug_threads = 0;
|
||||
monitor_output ("Debug output disabled.\n");
|
||||
}
|
||||
else if (strcmp (mon, "set debug-hw-points 1") == 0)
|
||||
{
|
||||
debug_hw_points = 1;
|
||||
monitor_output ("H/W point debugging output enabled.\n");
|
||||
}
|
||||
else if (strcmp (mon, "set debug-hw-points 0") == 0)
|
||||
{
|
||||
debug_hw_points = 0;
|
||||
monitor_output ("H/W point debugging output disabled.\n");
|
||||
}
|
||||
else if (strcmp (mon, "set remote-debug 1") == 0)
|
||||
{
|
||||
remote_debug = 1;
|
||||
monitor_output ("Protocol debug output enabled.\n");
|
||||
}
|
||||
else if (strcmp (mon, "set remote-debug 0") == 0)
|
||||
{
|
||||
remote_debug = 0;
|
||||
monitor_output ("Protocol debug output disabled.\n");
|
||||
}
|
||||
else if (strcmp (mon, "help") == 0)
|
||||
monitor_show_help ();
|
||||
else if (strcmp (mon, "exit") == 0)
|
||||
exit_requested = 1;
|
||||
else
|
||||
{
|
||||
monitor_output ("Unknown monitor command.\n\n");
|
||||
monitor_show_help ();
|
||||
write_enn (own_buf);
|
||||
}
|
||||
}
|
||||
|
||||
/* Handle all of the extended 'q' packets. */
|
||||
void
|
||||
handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
|
||||
|
@ -1211,46 +1258,10 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p)
|
|||
|
||||
write_ok (own_buf);
|
||||
|
||||
if (strcmp (mon, "set debug 1") == 0)
|
||||
{
|
||||
debug_threads = 1;
|
||||
monitor_output ("Debug output enabled.\n");
|
||||
}
|
||||
else if (strcmp (mon, "set debug 0") == 0)
|
||||
{
|
||||
debug_threads = 0;
|
||||
monitor_output ("Debug output disabled.\n");
|
||||
}
|
||||
else if (strcmp (mon, "set debug-hw-points 1") == 0)
|
||||
{
|
||||
debug_hw_points = 1;
|
||||
monitor_output ("H/W point debugging output enabled.\n");
|
||||
}
|
||||
else if (strcmp (mon, "set debug-hw-points 0") == 0)
|
||||
{
|
||||
debug_hw_points = 0;
|
||||
monitor_output ("H/W point debugging output disabled.\n");
|
||||
}
|
||||
else if (strcmp (mon, "set remote-debug 1") == 0)
|
||||
{
|
||||
remote_debug = 1;
|
||||
monitor_output ("Protocol debug output enabled.\n");
|
||||
}
|
||||
else if (strcmp (mon, "set remote-debug 0") == 0)
|
||||
{
|
||||
remote_debug = 0;
|
||||
monitor_output ("Protocol debug output disabled.\n");
|
||||
}
|
||||
else if (strcmp (mon, "help") == 0)
|
||||
monitor_show_help ();
|
||||
else if (strcmp (mon, "exit") == 0)
|
||||
exit_requested = 1;
|
||||
else
|
||||
{
|
||||
monitor_output ("Unknown monitor command.\n\n");
|
||||
monitor_show_help ();
|
||||
write_enn (own_buf);
|
||||
}
|
||||
if (the_target->handle_monitor_command == NULL
|
||||
|| (*the_target->handle_monitor_command) (mon) == 0)
|
||||
/* Default processing. */
|
||||
handle_monitor_command (mon);
|
||||
|
||||
free (mon);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue