ptrace and thread

From: David Xu (davidxu_at_freebsd.org)
Date: 01/14/04

  • Next message: David Brinegar: "Re: About removable disks, mountroot and sw-raid"
    Date: Wed, 14 Jan 2004 11:17:36 +0800
    To: arch@freebsd.org
    
    

    I am current working on debug support for KSE thread program, however I
    found
    ptrace interface is not thread-aware, in a threaded program, I need to
    get/set registers
    set for individual threads, current ptrace can not support that
    features, there are two
    ways to support these requirements:

    1. keep current ptrace interface, add a command for example
    PT_SETDTHREAD to
       set current thread for debug, and subsequent request for example
    PT_SETREGS and
       PT_GETREGS will work on the thread, for single thread process, the
    default current
       thread is always the first thread in the process, this way we needn't
    change legacy debugger
       code.

    2. introduce a second ptrace syscall, and accept a new parameter tid
    (thread id),
       the PT_SETREGS and PT_GETREGS will use the tid to operate on
    corresponding
       thread.

    For first method, I have a patch there:
    http://people.freebsd.org/~davidxu/kse/ptrace.diff
    The patch also includes some bits to support KSE debug, not just for
    pure 1:1 threading.

    David Xu

    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"


  • Next message: David Brinegar: "Re: About removable disks, mountroot and sw-raid"

    Relevant Pages

    • Re: ptrace and thread
      ... > I am current working on debug support for KSE thread program, ... > ptrace interface is not thread-aware, in a threaded program, I need to ...
      (freebsd-arch)
    • RE: Step by Step skips large chunks of code
      ... The interesting thing is that it still skips code during debug but not ... has been correctly complied into assembly code. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
      (microsoft.public.vsnet.debugging)
    • cpufreq oddness on 2.6.16-rc1-mm4
      ... Some debug info, dmesg, and config are below. ... # Console display driver support ... # USB Device Class drivers ...
      (Linux-Kernel)
    • RE: =?iso-8859-1?Q?=22System.Diagnostics.Debug.WriteLine=22_Doesnt_work_unde?= =?iso-885
      ... Regarding on the DebugView and ASP.NET Debug output in IIS hosted ... I think it is due to the different logon session the ... ASP.NET worker process and your debugview running under. ... Microsoft MSDN Online Support Lead ...
      (microsoft.public.dotnet.framework.aspnet)
    • RE: Unable to copy file. ... Access to the path ... is denied.
      ... The Debug Directory was included in the project. ... ** it the service app used(configured in windows Service manager) when you ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
      (microsoft.public.vsnet.general)