main: support qemu-user debugging
Running binaries in QEMU (when debugging on Linux for example) did not work correctly as qemu-user expects the `-g` flag to be first on the command line before the program name. Putting it after will make it a command line parameter for the emulated program, which is not what we want. I don't think this ever worked correctly.
Этот коммит содержится в:
		
							родитель
							
								
									9296332151
								
							
						
					
					
						коммит
						cacb452aa6
					
				
					 1 изменённых файлов: 1 добавлений и 1 удалений
				
			
		
							
								
								
									
										2
									
								
								main.go
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								main.go
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -644,7 +644,7 @@ func Debug(debugger, pkgName string, ocdOutput bool, options *compileopts.Option
 | 
			
		|||
	case "qemu-user":
 | 
			
		||||
		port = ":1234"
 | 
			
		||||
		// Run in an emulator.
 | 
			
		||||
		args := append(emulator[1:], "-g", "1234")
 | 
			
		||||
		args := append([]string{"-g", "1234"}, emulator[1:]...)
 | 
			
		||||
		daemon = executeCommand(config.Options, emulator[0], args...)
 | 
			
		||||
		daemon.Stdout = os.Stdout
 | 
			
		||||
		daemon.Stderr = os.Stderr
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Загрузка…
	
	Создание таблицы
		
		Сослаться в новой задаче