Skip to content

Commit

Permalink
Fix uninstalling of breakpoints when a process exits. Process
Browse files Browse the repository at this point in the history
exit is still handled poorly.

R=rsc
APPROVED=rsc
DELTA=6  (6 added, 0 deleted, 0 changed)
OCL=34288
CL=34315
  • Loading branch information
aclements committed Sep 3, 2009
1 parent eea6b0d commit 37aa6c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pkg/debug/proc/proc_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ func (p *process) installBreakpoints() os.Error {
//
// Must be called from the monitor thread.
func (p *process) uninstallBreakpoints() os.Error {
if len(p.threads) == 0 {
return nil;
}
n := 0;
main := p.someStoppedThread();
for _, b := range p.breakpoints {
Expand Down
3 changes: 3 additions & 0 deletions usr/austin/ptrace/ptrace_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@ func (p *process) installBreakpoints() os.Error {
//
// Must be called from the monitor thread.
func (p *process) uninstallBreakpoints() os.Error {
if len(p.threads) == 0 {
return nil;
}
n := 0;
main := p.someStoppedThread();
for _, b := range p.breakpoints {
Expand Down

0 comments on commit 37aa6c9

Please sign in to comment.