mirror of
				https://github.com/go-delve/delve.git
				synced 2025-10-31 10:47:27 +08:00 
			
		
		
		
	 49a0a121e0
			
		
	
	49a0a121e0
	
	
	
		
			
			The go compiler changed and break statements no longer get compiled to nothing when -N is passed: https://go-review.googlesource.com/#/c/19848/ https://go-review.googlesource.com/#/c/19854/
		
			
				
	
	
		
			32 lines
		
	
	
		
			666 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			666 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // +build linux darwin
 | |
| 
 | |
| package proc
 | |
| 
 | |
| import (
 | |
| 	"syscall"
 | |
| 	"testing"
 | |
| 	"time"
 | |
| 
 | |
| 	protest "github.com/derekparker/delve/proc/test"
 | |
| )
 | |
| 
 | |
| func TestIssue419(t *testing.T) {
 | |
| 	// SIGINT directed at the inferior should be passed along not swallowed by delve
 | |
| 	withTestProcess("issue419", t, func(p *Process, fixture protest.Fixture) {
 | |
| 		go func() {
 | |
| 			for {
 | |
| 				if p.Running() {
 | |
| 					time.Sleep(2 * time.Second)
 | |
| 					err := syscall.Kill(p.Pid, syscall.SIGINT)
 | |
| 					assertNoError(err, t, "syscall.Kill")
 | |
| 					return
 | |
| 				}
 | |
| 			}
 | |
| 		}()
 | |
| 		err := p.Continue()
 | |
| 		if _, exited := err.(ProcessExitedError); !exited {
 | |
| 			t.Fatalf("Unexpected error after Continue(): %v\n", err)
 | |
| 		}
 | |
| 	})
 | |
| }
 |