From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27956 invoked by alias); 23 Feb 2009 00:05:29 -0000 Received: (qmail 27944 invoked by uid 22791); 23 Feb 2009 00:05:28 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Feb 2009 00:05:22 +0000 Received: (qmail 11570 invoked from network); 23 Feb 2009 00:05:20 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 Feb 2009 00:05:20 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: Modernize solaris threads support. Date: Mon, 23 Feb 2009 00:49:00 -0000 User-Agent: KMail/1.9.10 References: <200902160549.49108.pedro@codesourcery.com> In-Reply-To: <200902160549.49108.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200902230005.24063.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-02/txt/msg00421.txt.bz2 I've now checked this in. On Monday 16 February 2009 05:49:48, Pedro Alves wrote: > 2009-02-16 =A0Pedro Alves =A0 >=20 > =A0=A0=A0=A0=A0=A0=A0=A0* corelow.c (get_core_registers): Adjust. > =A0=A0=A0=A0=A0=A0=A0=A0(core_file_thread_alive): Rename to... > =A0=A0=A0=A0=A0=A0=A0=A0(core_thread_alive): ... this. > =A0=A0=A0=A0=A0=A0=A0=A0(core_pid_to_str): Try gdbarch_core_pid_to_str fi= rst. > =A0=A0=A0=A0=A0=A0=A0=A0(init_core_ops): Adjust. > =A0=A0=A0=A0=A0=A0=A0=A0(coreops_suppress_target): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(_initialize_corelow): Unconditionally add core_o= ps. > =A0=A0=A0=A0=A0=A0=A0=A0* procfs.c: Include "inf-child.h". > =A0=A0=A0=A0=A0=A0=A0=A0(procfs_ops): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(init_procfs_ops): Delete. =A0Reimplement as... > =A0=A0=A0=A0=A0=A0=A0=A0(procfs_target): ... this, inheriting from inf-ch= ild. > =A0=A0=A0=A0=A0=A0=A0=A0(procfs_attach, procfs_detach, procfs_fetch_regis= ters): Adjust. > =A0=A0=A0=A0=A0=A0=A0=A0(procfs_prepare_to_store): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(procfs_store_registers, procfs_resume): Adjust. > =A0=A0=A0=A0=A0=A0=A0=A0(procfs_open): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(procfs_suppress_run): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(procfs_can_run): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(procfs_mourn_inferior): Adjust. > =A0=A0=A0=A0=A0=A0=A0=A0(procfs_init_inferior): Add target_ops parameter.= =A0Adjust. > =A0=A0=A0=A0=A0=A0=A0=A0(procfs_create_inferior): Don't pass procfs_init_= inferior to > =A0=A0=A0=A0=A0=A0=A0=A0fork_inferior. =A0Instead call it after fork_infe= rior returns. > =A0=A0=A0=A0=A0=A0=A0=A0(procfs_find_new_threads): Adjust. > =A0=A0=A0=A0=A0=A0=A0=A0(_initialize_procfs): Adjust to use procfs_target= instead of > =A0=A0=A0=A0=A0=A0=A0=A0init_procfs_ops. > =A0=A0=A0=A0=A0=A0=A0=A0* sol-thread.c (orig_core_ops, sol_core_ops): Del= ete. > =A0=A0=A0=A0=A0=A0=A0=A0(lwp_to_thread): Use target_thread_alive. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_thread_open): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_thread_attach): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_thread_detach, sol_thread_resume, sol_thread= _wait) > =A0=A0=A0=A0=A0=A0=A0=A0(sol_thread_fetch_registers, sol_thread_store_reg= isters): Adjust > =A0=A0=A0=A0=A0=A0=A0=A0to use find_target_beneath. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_thread_prepare_to_store, sol_thread_xfer_mem= ory): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_thread_xfer_partial): Adjust to use find_tar= get_beneath. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_thread_files_info, sol_thread_kill_inferior)= : Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(check_for_thread_db): New. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_thread_notice_signals, sol_thread_create_inf= erior): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_thread_new_objfile): Call check_for_thread_d= b. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_thread_mourn_inferior): Adjust to use find_t= arget_beneath. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_thread_can_run): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_thread_alive): Adjust to use find_target_ben= eath. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_thread_stop): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(rw_common): Use target_write_memory or target_re= ad_memory. > =A0=A0=A0=A0=A0=A0=A0=A0(ps_lgetregs, ps_lgetfpregs): Use target_fetch_re= gisters. > =A0=A0=A0=A0=A0=A0=A0=A0(ps_lsetregs, ps_lsetfpregs): Use target_store_re= gisters. > =A0=A0=A0=A0=A0=A0=A0=A0(solaris_pid_to_str): Remove check for libthread_= db initialization > =A0=A0=A0=A0=A0=A0=A0=A0failing. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_find_new_threads): Remove check for libthrea= d_db > =A0=A0=A0=A0=A0=A0=A0=A0initialization failing, or for an invalid inferio= r_ptid. =A0Adjust > =A0=A0=A0=A0=A0=A0=A0=A0to use find_target_beneath. > =A0=A0=A0=A0=A0=A0=A0=A0(sol_core_open, sol_core_close, sol_core_detach, > =A0=A0=A0=A0=A0=A0=A0=A0sol_core_files_info, sol_find_memory_regions, > =A0=A0=A0=A0=A0=A0=A0=A0sol_make_note_section, ignore): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(init_sol_thread_ops): Make it a thread_stratum t= arget. =A0Remove > =A0=A0=A0=A0=A0=A0=A0=A0unneeded callback settings. > =A0=A0=A0=A0=A0=A0=A0=A0(init_sol_core_ops): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(_initialize_sol_thread): No longer call init_sol= _core_ops, set > =A0=A0=A0=A0=A0=A0=A0=A0procfs_suppress_run, or hack with core_ops. >=20 > =A0=A0=A0=A0=A0=A0=A0=A0* target.h (struct target_ops): Add a target_ops = * parameter to > =A0=A0=A0=A0=A0=A0=A0=A0to_resume, to_fetch_registers, to_store_registers= , to_thread_alive > =A0=A0=A0=A0=A0=A0=A0=A0and to_find_new_threads. > =A0=A0=A0=A0=A0=A0=A0=A0(target_fetch_registers, target_store_registers) > =A0=A0=A0=A0=A0=A0=A0=A0(target_thread_alive, target_find_new_threads): R= edeclare as > =A0=A0=A0=A0=A0=A0=A0=A0function. > =A0=A0=A0=A0=A0=A0=A0=A0 > =A0=A0=A0=A0=A0=A0=A0=A0* target.c (update_current_target): Do not inheri= t or de_fault > =A0=A0=A0=A0=A0=A0=A0=A0to_resume, to_fetch_registers, to_store_registers, > =A0=A0=A0=A0=A0=A0=A0=A0to_thread_alive, to_find_new_threads. > =A0=A0=A0=A0=A0=A0=A0=A0(target_resume): Adjust. > =A0=A0=A0=A0=A0=A0=A0=A0(target_thread_alive, target_find_new_threads): N= ew. > =A0=A0=A0=A0=A0=A0=A0=A0(debug_to_resume, debug_to_fetch_registers): Dele= te. > =A0=A0=A0=A0=A0=A0=A0=A0(target_fetch_registers): New. > =A0=A0=A0=A0=A0=A0=A0=A0(debug_to_store_registers): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(target_store_registers): New. > =A0=A0=A0=A0=A0=A0=A0=A0(debug_to_thread_alive, debug_to_find_new_threads= ): Delete. > =A0=A0=A0=A0=A0=A0=A0=A0(setup_target_debug): Adjust. > =A0=A0=A0=A0=A0=A0=A0=A0 > =A0=A0=A0=A0=A0=A0=A0=A0* gdbcore.h (core_ops): Delete declaration. > =A0=A0=A0=A0=A0=A0=A0=A0 > =A0=A0=A0=A0=A0=A0=A0=A0* inf-ptrace.c, linux-nat.c, remote.c, amd64-linu= x-nat.c, > =A0=A0=A0=A0=A0=A0=A0=A0inf-child.c, linux-thread-db.c, bsd-uthread.c, in= f-ttrace.c, > =A0=A0=A0=A0=A0=A0=A0=A0i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-n= at.c, > =A0=A0=A0=A0=A0=A0=A0=A0hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, = monitor.c, > =A0=A0=A0=A0=A0=A0=A0=A0nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, w= indows-nat.c, > =A0=A0=A0=A0=A0=A0=A0=A0alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, = armnbsd-nat.c, > =A0=A0=A0=A0=A0=A0=A0=A0bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hpp= absd-nat.c, > =A0=A0=A0=A0=A0=A0=A0=A0hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c, > =A0=A0=A0=A0=A0=A0=A0=A0ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c, > =A0=A0=A0=A0=A0=A0=A0=A0m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c, > =A0=A0=A0=A0=A0=A0=A0=A0mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c= , ppcnbsd-nat.c, > =A0=A0=A0=A0=A0=A0=A0=A0ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-n= at.c, > =A0=A0=A0=A0=A0=A0=A0=A0shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux= -nat.c, > =A0=A0=A0=A0=A0=A0=A0=A0vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to targe= t_ops changes. >=20 > =A0=A0=A0=A0=A0=A0=A0=A0* gdbarch.sh (core_pid_to_str): New gdbarch callb= ack. > =A0=A0=A0=A0=A0=A0=A0=A0* gdbarch.h, gdbarch.c: Regenerate. >=20 > =A0=A0=A0=A0=A0=A0=A0=A0* sol2-tdep.c: Include "inferior.h". > =A0=A0=A0=A0=A0=A0=A0=A0(sol2_core_pid_to_str): New. > =A0=A0=A0=A0=A0=A0=A0=A0* sol2-tdep.h (sol2_core_pid_to_str): Declare. >=20 > =A0=A0=A0=A0=A0=A0=A0=A0* amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it. > =A0=A0=A0=A0=A0=A0=A0=A0* sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set = it. > =A0=A0=A0=A0=A0=A0=A0=A0* sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Se= t it. > =A0=A0=A0=A0=A0=A0=A0=A0* i386-sol2-tdep.c (i386_sol2_init_abi): Set it. --=20 Pedro Alves