Debugger: force gdb to use lang=pascal. (set after attach / needed in some environment, such as cgi in webserver)

git-svn-id: trunk@43038 -
This commit is contained in:
martin 2013-09-29 11:13:55 +00:00
parent 6f63e5d1ef
commit 6edf206205

View File

@ -5109,7 +5109,7 @@ begin
// Tnit (StartDebugging) // Tnit (StartDebugging)
TargetInfo^.TargetFlags := [tfHasSymbols]; // Set until proven otherwise TargetInfo^.TargetFlags := [tfHasSymbols]; // Set until proven otherwise
ExecuteCommand('-gdb-set language pascal', [cfCheckError]); ExecuteCommand('-gdb-set language pascal', [cfCheckError]); // TODO: Maybe remove, must be done after attach
//{$IF defined(UNIX) or defined(DBG_ENABLE_TERMINAL)} //{$IF defined(UNIX) or defined(DBG_ENABLE_TERMINAL)}
//InitConsole; //InitConsole;
@ -5187,11 +5187,14 @@ begin
TargetInfo^.TargetPID := NewPID; TargetInfo^.TargetPID := NewPID;
ExecuteCommand('-gdb-set language pascal', [cfCheckError]);
if (FTheDebugger.FileName <> '') and (pos('READING SYMBOLS FROM', UpperCase(CmdResp)) < 1) then begin if (FTheDebugger.FileName <> '') and (pos('READING SYMBOLS FROM', UpperCase(CmdResp)) < 1) then begin
ExecuteCommand('ptype TObject', [], R); ExecuteCommand('ptype TObject', [], R);
if pos('NO SYMBOL TABLE IS LOADED', UpperCase(FFullCmdReply)) > 0 then begin if pos('NO SYMBOL TABLE IS LOADED', UpperCase(FFullCmdReply)) > 0 then begin
ExecuteCommand('-file-exec-and-symbols %s', ExecuteCommand('-file-exec-and-symbols %s',
[FTheDebugger.ConvertToGDBPath(UTF8ToSys(FTheDebugger.FileName), cgptExeName)], R); [FTheDebugger.ConvertToGDBPath(UTF8ToSys(FTheDebugger.FileName), cgptExeName)], R);
ExecuteCommand('-gdb-set language pascal', [cfCheckError]);
end; end;
end; end;