LazDebugger(Fp)Lldb: fix 32/64 target detection

git-svn-id: trunk@60006 -
This commit is contained in:
martin 2019-01-05 16:17:57 +00:00
parent 06b7314a08
commit 29dbe9729c

View File

@ -339,6 +339,9 @@ procedure Register;
implementation
var
DBG_VERBOSE: PLazLoggerLogGroup;
type
{%region
@ -2168,7 +2171,8 @@ begin
end;
If StrMatches(TargetInstr.Res, [''{}, '','('{}, ')',''], found) then begin
if (found[1] = '(i386)') or (found[1] = '(i686)') then begin
if (found[1] = 'i386') or (found[1] = 'i686') then begin
DebugLn(DBG_VERBOSE, ['Target 32 bit: ', found[1]]);
Debugger.FTargetWidth := 32;
Debugger.FTargetRegisters[0] := '$eax';
Debugger.FTargetRegisters[1] := '$edx';
@ -2176,6 +2180,7 @@ begin
end
else
if (found[1] = '(x86_64)') or (found[1] = 'x86_64') then begin
DebugLn(DBG_VERBOSE, ['Target 64 bit: ', found[1]]);
Debugger.FTargetWidth := 64;
// target list gives more detailed result. But until remote debugging is added, use the current system
{$IFDEF MSWindows}
@ -2192,6 +2197,7 @@ begin
end
else found := nil;
if found = nil then begin
DebugLn(DBG_VERBOSE, ['Target bitness UNKNOWN']);
// use architecture of IDE
{$IFDEF cpu64}
Debugger.FTargetWidth := 64;
@ -2891,5 +2897,8 @@ begin
RegisterDebugger(TLldbDebugger);
end;
initialization
DBG_VERBOSE := DebugLogger.FindOrRegisterLogGroup('DBG_VERBOSE' {$IFDEF DBG_VERBOSE} , True {$ENDIF} );
end.