diff options
author | Pedro Alves <palves@redhat.com> | 2008-08-18 23:24:57 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2008-08-18 23:24:57 +0000 |
commit | 395400814180b4d204736b9defc631005fde926b (patch) | |
tree | 7d706c20e8e9647a625ef55962b9dc85d7a681ba /gdb/bsd-uthread.c | |
parent | 87ab71f0a047c034c71d26d7c4ff4fa2b35b22cd (diff) | |
download | gdb-395400814180b4d204736b9defc631005fde926b.zip gdb-395400814180b4d204736b9defc631005fde926b.tar.gz gdb-395400814180b4d204736b9defc631005fde926b.tar.bz2 |
* bsd-uthread.c (bsd_uthread_close): New.
(bsd_uthread_deactivate): Don't cleanup here, just unpush the
target.
(bsd_uthread_solib_loaded): Fix typo.
(bsd_uthread_target): Register bsd_uthread_close.
Diffstat (limited to 'gdb/bsd-uthread.c')
-rw-r--r-- | gdb/bsd-uthread.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/gdb/bsd-uthread.c b/gdb/bsd-uthread.c index a15c78f..df038e6 100644 --- a/gdb/bsd-uthread.c +++ b/gdb/bsd-uthread.c @@ -192,18 +192,12 @@ bsd_uthread_activate (struct objfile *objfile) return 1; } -/* Deactivate the thread stratum implemented by this module. */ +/* Cleanup due to deactivation. */ static void -bsd_uthread_deactivate (void) +bsd_uthread_close (int quitting) { - /* Skip if the thread stratum has already been deactivated. */ - if (!bsd_uthread_active) - return; - bsd_uthread_active = 0; - unpush_target (bsd_uthread_ops_hack); - bsd_uthread_thread_run_addr = 0; bsd_uthread_thread_list_addr = 0; bsd_uthread_thread_state_offset = 0; @@ -212,6 +206,18 @@ bsd_uthread_deactivate (void) bsd_uthread_solib_name = NULL; } +/* Deactivate the thread stratum implemented by this module. */ + +static void +bsd_uthread_deactivate (void) +{ + /* Skip if the thread stratum has already been deactivated. */ + if (!bsd_uthread_active) + return; + + unpush_target (bsd_uthread_ops_hack); +} + void bsd_uthread_inferior_created (struct target_ops *ops, int from_tty) { @@ -239,7 +245,7 @@ bsd_uthread_solib_loaded (struct so_list *so) if (bsd_uthread_activate (so->objfile)) { - bsd_uthread_solib_name == so->so_original_name; + bsd_uthread_solib_name = so->so_original_name; return; } } @@ -490,6 +496,7 @@ bsd_uthread_target (void) t->to_shortname = "bsd-uthreads"; t->to_longname = "BSD user-level threads"; t->to_doc = "BSD user-level threads"; + t->to_close = bsd_uthread_close; t->to_mourn_inferior = bsd_uthread_mourn_inferior; t->to_fetch_registers = bsd_uthread_fetch_registers; t->to_store_registers = bsd_uthread_store_registers; |