mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 21:39:49 +02:00
LazDebugger(Fp)Lldb: fix 32/64 target detection
git-svn-id: trunk@60006 -
This commit is contained in:
parent
06b7314a08
commit
29dbe9729c
@ -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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user