ptrace and thread
From: David Xu (davidxu_at_freebsd.org)
Date: 01/14/04
- Previous message: Poul-Henning Kamp: "About removable disks, mountroot and sw-raid"
- Next in thread: Doug Rabson: "Re: ptrace and thread"
- Reply: Doug Rabson: "Re: ptrace and thread"
- Reply: Julian Elischer: "Re: ptrace and thread"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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"
- Previous message: Poul-Henning Kamp: "About removable disks, mountroot and sw-raid"
- Next in thread: Doug Rabson: "Re: ptrace and thread"
- Reply: Doug Rabson: "Re: ptrace and thread"
- Reply: Julian Elischer: "Re: ptrace and thread"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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) - 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: debug build crashes when calling managed code
... enable debug info you *should* be able to still debug. ... Look forward to your
response. ... Microsoft Online Community Support ... where an initial response
from the community or a Microsoft Support ... (microsoft.public.vc.language) - 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) - Re: BRE rules execution chain
... As I mentioned in my previous email, the only way to debug policy is adding ...
Rule engine - Another way to debug the rule engine ... Microsoft Online Community Support
... where an initial response from the community or a Microsoft Support ... (microsoft.public.biztalk.general)