Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gdb/dist/gdb - add objfile hook.
details: https://anonhg.NetBSD.org/src/rev/cc601533c281
branches: trunk
changeset: 770062:cc601533c281
user: christos <christos%NetBSD.org@localhost>
date: Sun Oct 02 18:14:24 2011 +0000
description:
- add objfile hook.
- constify.
- we cannot run things, so don't lie.
diffstat:
external/gpl3/gdb/dist/gdb/nbsd-thread.c | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
diffs (62 lines):
diff -r 55892970d7d9 -r cc601533c281 external/gpl3/gdb/dist/gdb/nbsd-thread.c
--- a/external/gpl3/gdb/dist/gdb/nbsd-thread.c Sun Oct 02 17:39:40 2011 +0000
+++ b/external/gpl3/gdb/dist/gdb/nbsd-thread.c Sun Oct 02 18:14:24 2011 +0000
@@ -39,6 +39,7 @@
#include "inferior.h"
#include "gdbcmd.h"
#include "gdbcore.h"
+#include "observer.h"
#include <machine/reg.h>
@@ -200,7 +201,7 @@
struct target_ops *beneath = find_target_beneath (ops);
nbsd_thread_deactivate ();
unpush_target (ops);
- /* Ordinairly, gdb caches solib information, but this means that it
+ /* Ordinarily, gdb caches solib information, but this means that it
won't call the new_obfile hook on a reattach. Clear the symbol file
cache so that attach -> detach -> attach works. */
clear_solib();
@@ -666,16 +667,7 @@
}
-/* Mark our target-struct as eligible for stray "run" and "attach" commands. */
-
-static int
-nbsd_thread_can_run (void)
-{
- return 1;
-}
-
-
-/* Fork an inferior process, and start debugging it with /proc. */
+/* Fork an inferior process, and start debugging it. */
static void
nbsd_thread_create_inferior (struct target_ops *ops, char *exec_file,
@@ -1056,7 +1048,7 @@
}
static int
-nbsd_thread_proc_lookup (void *arg, char *sym, caddr_t *addr)
+nbsd_thread_proc_lookup (void *arg, const char *sym, caddr_t *addr)
{
struct minimal_symbol *ms;
@@ -1226,7 +1218,6 @@
nbsd_thread_ops.to_terminal_info = child_terminal_info;
nbsd_thread_ops.to_create_inferior = nbsd_thread_create_inferior;
nbsd_thread_ops.to_mourn_inferior = nbsd_thread_mourn_inferior;
- nbsd_thread_ops.to_can_run = nbsd_thread_can_run;
nbsd_thread_ops.to_thread_alive = nbsd_thread_alive;
nbsd_thread_ops.to_pid_to_str = nbsd_pid_to_str;
nbsd_thread_ops.to_find_new_threads = nbsd_find_new_threads;
@@ -1297,4 +1288,6 @@
"Show all threads.",
&thread_examine_list);
+ /* Hook into new_objfile notification. */
+ observer_attach_new_objfile (nbsd_thread_new_objfile);
}
Home |
Main Index |
Thread Index |
Old Index