Add LOGC to log cs:ip only. Modified version of patch 282 from Scott Percival.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4318
This commit is contained in:
		
							parent
							
								
									ae80176bbb
								
							
						
					
					
						commit
						62ab91a269
					
				
					 1 changed files with 12 additions and 2 deletions
				
			
		|  | @ -1211,6 +1211,11 @@ bool ParseCommand(char* str) { | |||
| 		command = "logcode"; | ||||
| 	} | ||||
| 
 | ||||
| 	if (command == "LOGC") { // Create Cpu coverage log file
 | ||||
| 		cpuLogType = 3; | ||||
| 		command = "logcode"; | ||||
| 	} | ||||
| 
 | ||||
| 	if (command == "logcode") { //Shared code between all logs
 | ||||
| 		DEBUG_ShowMsg("DEBUG: Starting log\n"); | ||||
| 		cpuLogFile.open("LOGCPU.TXT"); | ||||
|  | @ -1338,8 +1343,8 @@ bool ParseCommand(char* str) { | |||
| 		DEBUG_ShowMsg("INT [nr] / INTT [nr]      - Execute / Trace into interrupt.\n"); | ||||
| #if C_HEAVY_DEBUG | ||||
| 		DEBUG_ShowMsg("LOG [num]                 - Write cpu log file.\n"); | ||||
| 		DEBUG_ShowMsg("LOGS/LOGL [num]           - Write short/long cpu log file.\n"); | ||||
| 		DEBUG_ShowMsg("HEAVYLOG                  - Enable/Disable automatic cpu log when dosbox exits.\n"); | ||||
| 		DEBUG_ShowMsg("LOGS/LOGL/LOGC [num]      - Write short/long/cs:ip-only cpu log file.\n"); | ||||
| 		DEBUG_ShowMsg("HEAVYLOG                  - Enable/Disable automatic cpu log when DOSBox exits.\n"); | ||||
| 		DEBUG_ShowMsg("ZEROPROTECT               - Enable/Disable zero code execution detection.\n"); | ||||
| #endif | ||||
| 		DEBUG_ShowMsg("SR [reg] [value]          - Set register value.\n"); | ||||
|  | @ -2048,6 +2053,11 @@ static void LogCPUInfo(void) { | |||
| static void LogInstruction(Bit16u segValue, Bit32u eipValue,  ofstream& out) { | ||||
| 	static char empty[23] = { 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0 }; | ||||
| 
 | ||||
| 	if (cpuLogType == 3) { //Log only cs:ip.
 | ||||
| 		out << setw(4) << SegValue(cs) << ":" << setw(8) << reg_eip << endl; | ||||
| 		return; | ||||
| 	} | ||||
| 
 | ||||
| 	PhysPt start = GetAddress(segValue,eipValue); | ||||
| 	char dline[200];Bitu size; | ||||
| 	size = DasmI386(dline, start, reg_eip, cpu.code.big); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue