From 925c9fabbb01d11c9f7d6fd836d40345771e9f8b Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 14 Jan 2015 20:20:48 +0000 Subject: [PATCH] Merged revision(s) 47377-47378 #c9ba4326e2-#c9ba4326e2, 47382-47384 #78dc09170e-#78dc09170e, 47386-47388 #c276a8b998-#c276a8b998 from trunk: r47388 PascalScript: update to origin git f3cf602541b5e73ff93d583adae3b98e314dcd6f calling constructor in 64 bit --------------------- r47387 PascalScript: update to origin git 466ab97b370687e7053a945d0a55aef7f260e7f3 --------------------- r47386 Debugger: Add some feedback in the eval/modify dialog. --------------------- r47384 DebuggerGDBMI: Improve getting exception message --------------------- r47383 DebuggerGDBMI: fix handling internal breakpoints. After an exception normal run/F9 was sometimes broken due to breakpoints not cleared --------------------- r47382 DebuggerGDBMI: fix handling internal breakpoints. After an exception normal run/F9 was sometimes broken due to breakpoints not cleared --------------------- r47378 DebuggerGDBMI: po files --------------------- r47377 DebuggerGDBMI: improve checks if gdb is running. Fix crash when gdb can not be launched. Issue #0027003 --------------------- git-svn-id: branches/fixes_1_4@47389 - --- .../PascalScript/Source/PascalScriptFPC.inc | 5 +- .../PascalScript/Source/uPSCompiler.pas | 3 ++ components/PascalScript/Source/uPSRuntime.pas | 19 +++++++ components/PascalScript/Source/x86.inc | 1 + .../lazdebuggergdbmi/cmdlinedebugger.pp | 44 +++++++++++++---- components/lazdebuggergdbmi/gdbmidebugger.pp | 27 +++++++--- .../lazdebuggergdbmi/gdbmistringconstants.pas | 1 + .../languages/gdbmistringconstants.es.po | 4 ++ .../languages/gdbmistringconstants.hu.po | 5 ++ .../languages/gdbmistringconstants.it.po | 49 ++++++------------- .../languages/gdbmistringconstants.ja.po | 4 ++ .../languages/gdbmistringconstants.lt.po | 4 ++ .../languages/gdbmistringconstants.po | 4 ++ .../languages/gdbmistringconstants.pt_BR.po | 4 ++ .../languages/gdbmistringconstants.ru.po | 4 ++ .../languages/gdbmistringconstants.uk.po | 4 ++ debugger/debuggerstrconst.pp | 2 + debugger/evaluatedlg.pp | 12 ++++- 18 files changed, 141 insertions(+), 55 deletions(-) diff --git a/components/PascalScript/Source/PascalScriptFPC.inc b/components/PascalScript/Source/PascalScriptFPC.inc index 942f2e0969..219de825ff 100644 --- a/components/PascalScript/Source/PascalScriptFPC.inc +++ b/components/PascalScript/Source/PascalScriptFPC.inc @@ -4,15 +4,14 @@ {$ifndef mswindows} {$DEFINE PS_NOIDISPATCH} {$endif} - {.$if (fpc_version=2) and (fpc_release>=3) and (fpc_patch>=1)} - {$if (fpc_version=2) and ((fpc_release=2) and (fpc_patch>=4)) or (fpc_release>2)} + {$if (fpc_version>2) or ((fpc_version=2) and ((fpc_release=2) and (fpc_patch>=4)) or (fpc_release>2))} {$UNDEF FPC_OLD_FIX} {$DEFINE PS_STACKALIGN} {$UNDEF PS_FPCSTRINGWORKAROUND} {$DEFINE PS_RESBEFOREPARAMETERS} {$DEFINE x64_string_result_as_varparameter} {$ifdef mswindows} - {$if (fpc_version=2) and (fpc_release>5)} + {$if (fpc_version>2) or ((fpc_version=2) and (fpc_release>5))} {$DEFINE PS_FPC_HAS_COM} {$endif} {$endif} diff --git a/components/PascalScript/Source/uPSCompiler.pas b/components/PascalScript/Source/uPSCompiler.pas index 981c7ce1a7..9a4bacdcac 100644 --- a/components/PascalScript/Source/uPSCompiler.pas +++ b/components/PascalScript/Source/uPSCompiler.pas @@ -13143,6 +13143,9 @@ begin {$ENDIF} AddDelphiFunction('function Unassigned: Variant;'); AddDelphiFunction('function VarIsEmpty(const V: Variant): Boolean;'); +{$IFDEF DELPHI7UP} + AddDelphiFunction('function VarIsClear(const V: Variant): Boolean;'); +{$ENDIF} AddDelphiFunction('function Null: Variant;'); AddDelphiFunction('function VarIsNull(const V: Variant): Boolean;'); AddDelphiFunction('function VarType(const V: Variant): TVarType;'); diff --git a/components/PascalScript/Source/uPSRuntime.pas b/components/PascalScript/Source/uPSRuntime.pas index 86a000e62d..bd863cb372 100644 --- a/components/PascalScript/Source/uPSRuntime.pas +++ b/components/PascalScript/Source/uPSRuntime.pas @@ -9374,6 +9374,9 @@ begin RegisterDelphiFunction(@Unassigned, 'UNASSIGNED', cdRegister); RegisterDelphiFunction(@VarIsEmpty, 'VARISEMPTY', cdRegister); + {$IFDEF DELPHI7UP} + RegisterDelphiFunction(@VarIsClear, 'VARISCLEAR', cdRegister); + {$ENDIF} RegisterDelphiFunction(@Null, 'NULL', cdRegister); RegisterDelphiFunction(@VarIsNull, 'VARISNULL', cdRegister); {$IFNDEF FPC} @@ -9930,10 +9933,18 @@ end; procedure CheckPackagePtr(var P: PByteArr); begin + {$ifdef Win32} if (word((@p[0])^) = $25FF) and (word((@p[6])^)=$C08B)then begin p := PPointer((@p[2])^)^; end; + {$endif} + {$ifdef Win64} + if (word((@p[0])^) = $25FF) {and (word((@p[6])^)=$C08B)}then + begin + p := PPointer(NativeUInt(@P[0]) + Cardinal((@p[2])^) + 6{Instruction Size})^ + end; + {$endif} end; {$IFDEF VER90}{$DEFINE NO_vmtSelfPtr}{$ENDIF} @@ -10232,7 +10243,11 @@ begin Delete(s, 1, 1); CurrStack := Cardinal(Stack.Count) - Cardinal(length(s)) -1; if s[1] = #0 then inc(CurrStack); + {$IFDEF CPU64} + IntVal := CreateHeapVariant(Caller.FindType2(btS64)); + {$ELSE} IntVal := CreateHeapVariant(Caller.FindType2(btU32)); + {$ENDIF} if IntVal = nil then begin Result := False; @@ -10242,7 +10257,11 @@ begin // under FPC a constructor it's called with self=0 (EAX) and // the VMT class pointer in EDX so they are effectively swaped // using register calling convention + {$IFDEF CPU64} + PPSVariantU32(IntVal).Data := Int64(FSelf); + {$ELSE} PPSVariantU32(IntVal).Data := Cardinal(FSelf); + {$ENDIF} FSelf := pointer(1); {$ELSE} PPSVariantU32(IntVal).Data := 1; diff --git a/components/PascalScript/Source/x86.inc b/components/PascalScript/Source/x86.inc index 3f42111c32..6f098d8065 100644 --- a/components/PascalScript/Source/x86.inc +++ b/components/PascalScript/Source/x86.inc @@ -543,6 +543,7 @@ begin if not GetPtr(rp(Params[0])) then exit; // this goes first RegUsage := 2; EDX := Longint(_Self); + DisposePPSVariantIFC(Params[0]); Params.Delete(0); end else {$ENDIF} diff --git a/components/lazdebuggergdbmi/cmdlinedebugger.pp b/components/lazdebuggergdbmi/cmdlinedebugger.pp index f91448b185..c23cb31eb0 100644 --- a/components/lazdebuggergdbmi/cmdlinedebugger.pp +++ b/components/lazdebuggergdbmi/cmdlinedebugger.pp @@ -329,26 +329,36 @@ end; function TCmdLineDebugger.CreateDebugProcess(const AOptions: String): Boolean; begin + Result := False; if FDbgProcess = nil then begin FDbgProcess := TProcessUTF8.Create(nil); - FDbgProcess.CommandLine := ExternalDebugger + ' ' + AOptions; - // TODO: under win9x and winMe should be created with console, - // otherwise no break can be sent. - FDbgProcess.Options:= [poUsePipes, poNoConsole, poStdErrToOutPut, poNewProcessGroup]; - FDbgProcess.ShowWindow := swoNone; - FDbgProcess.Environment:=DebuggerEnvironment; + try + FDbgProcess.CommandLine := ExternalDebugger + ' ' + AOptions; + // TODO: under win9x and winMe should be created with console, + // otherwise no break can be sent. + FDbgProcess.Options:= [poUsePipes, poNoConsole, poStdErrToOutPut, poNewProcessGroup]; + FDbgProcess.ShowWindow := swoNone; + FDbgProcess.Environment:=DebuggerEnvironment; + except + FreeAndNil(FDbgProcess); + end; end; - if not FDbgProcess.Running + if FDbgProcess = nil then exit; + + if not FDbgProcess.Running then begin try FDbgProcess.Execute; DebugLn('[TCmdLineDebugger] Debug PID: ', IntToStr(FDbgProcess.Handle)); + Result := FDbgProcess.Running; except - on E: Exception do DebugLn('Exeption while executing debugger: ', E.Message); + on E: Exception do begin + FOutputBuf := E.Message; + DebugLn('Exeption while executing debugger: ', FOutputBuf); + end; end; end; - Result := FDbgProcess.Running; end; destructor TCmdLineDebugger.Destroy; @@ -430,6 +440,16 @@ begin // TODO: get extra handles to wait for // TODO: Fix multiple peeks Result := ''; + if not DebugProcessRunning then begin + if FOutputBuf <> '' then begin + Result := FOutputBuf; + FOutputBuf := ''; + exit; + end; + DoReadError; + exit; + end; + FReadLineTimedOut := False; FReadLineWasAbortedByNested := False; if FReadLineCallStamp = high(FReadLineCallStamp) then @@ -469,6 +489,10 @@ begin if FReadLineTimedOut then break; + if FDbgProcess.Output = nil then begin + DoReadError; + break; + end; WaitSet := WaitForHandles([FDbgProcess.Output.Handle], ATimeOut); @@ -490,7 +514,7 @@ begin end; if ((WaitSet and 1) <> 0) - and (FDbgProcess <> nil) + and DebugProcessRunning and (ReadData(FDbgProcess.Output, FOutputBuf) > 0) then Continue; // start lineend search diff --git a/components/lazdebuggergdbmi/gdbmidebugger.pp b/components/lazdebuggergdbmi/gdbmidebugger.pp index a38cba7ada..c4b44a807b 100644 --- a/components/lazdebuggergdbmi/gdbmidebugger.pp +++ b/components/lazdebuggergdbmi/gdbmidebugger.pp @@ -5592,6 +5592,15 @@ function TGDBMIDebuggerCommandExecute.ProcessStopped(const AParams: String; if tfExceptionIsPointer in TargetInfo^.TargetFlags then ExceptionMessage := GetText('Exception(%s).FMessage', [ExceptInfo.ObjAddr]) else ExceptionMessage := GetText('^Exception(%s)^.FMessage', [ExceptInfo.ObjAddr]); + if FLastExecResult.State = dsError then begin + if tfExceptionIsPointer in TargetInfo^.TargetFlags then begin + ExceptionMessage := GetText('^Exception(%s).FMessage', [ExceptInfo.ObjAddr]); + if FLastExecResult.State <> dsError then + Exclude(TargetInfo^.TargetFlags, tfExceptionIsPointer); + end; + if FLastExecResult.State = dsError then + ExceptionMessage := GetText('^^char(^%s(%s)+1)^', [PointerTypeCast, ExceptInfo.ObjAddr]); + end; //ExceptionMessage := GetText('^^Exception($fp+8)^^.FMessage', []); end else begin // Only works if Exception class is not changed. FMessage must be first member @@ -8622,10 +8631,8 @@ begin end; end else begin - if DebugProcess = nil - then MessageDlg('Debugger', 'Failed to create debug process for unknown reason', mtError, [mbOK], 0) - else MessageDlg('Debugger', Format('Failed to create debug process: %s', [ReadLine(50)]), mtError, [mbOK], 0); - SetState(dsError); + include(FErrorHandlingFlags, ehfDeferReadWriteError); + SetErrorState(gdbmiFailedToLaunchExternalDbg, ReadLine(50)); end; FGDBPtrSize := CpuNameToPtrSize(FGDBCPU); // will be set in StartDebugging @@ -10900,6 +10907,7 @@ begin if not ExecuteCommand('x/s ' + AExpression, AValues, R, [], DebuggerProperties.TimeoutForEval) then begin + FLastExecResult.State := dsError; Result := ''; Exit; end; @@ -10913,6 +10921,7 @@ var begin if not ExecuteCommand('x/c ' + AExpression, AValues, R) then begin + FLastExecResult.State := dsError; Result := ''; Exit; end; @@ -11398,6 +11407,7 @@ begin ACmd.ExecuteCommand('-break-delete %d', [FNameBreakID], [cfCheckError]); FNameBreakID := -1; FNameBreakAddr := 0; + FEnabled := FEnabled and ((FNameBreakID >= 0) or (FAddrBreakID >= 0) or (FCustomID >= 0) or (FLineOffsID >= 0)); end; procedure TGDBMIInternalBreakPoint.ClearAddr(ACmd: TGDBMIDebuggerCommand); @@ -11407,6 +11417,7 @@ begin FAddrBreakID := -1; FAddrBreakAddr := 0; FMainAddrFound := 0; + FEnabled := FEnabled and ((FNameBreakID >= 0) or (FAddrBreakID >= 0) or (FCustomID >= 0) or (FLineOffsID >= 0)); end; procedure TGDBMIInternalBreakPoint.ClearCustom(ACmd: TGDBMIDebuggerCommand); @@ -11415,6 +11426,7 @@ begin ACmd.ExecuteCommand('-break-delete %d', [FCustomID], [cfCheckError]); FCustomID := -1; FCustomAddr := 0; + FEnabled := FEnabled and ((FNameBreakID >= 0) or (FAddrBreakID >= 0) or (FCustomID >= 0) or (FLineOffsID >= 0)); end; procedure TGDBMIInternalBreakPoint.ClearLineOffs(ACmd: TGDBMIDebuggerCommand); @@ -11424,6 +11436,7 @@ begin FLineOffsID := -1; FLineOffsAddr := 0; FLineOffsFunction := ''; + FEnabled := FEnabled and ((FNameBreakID >= 0) or (FAddrBreakID >= 0) or (FCustomID >= 0) or (FLineOffsID >= 0)); end; function TGDBMIInternalBreakPoint.BreakSet(ACmd: TGDBMIDebuggerCommand; ALoc: String; out @@ -11455,6 +11468,7 @@ begin ACmd.ExecuteCommand('-break-insert %s', [ALoc], R); Result := R.State <> dsError; if not Result then exit; + FEnabled := True; ResultList := TGDBMINameValueList.Create(R, ['bkpt']); AId := StrToIntDef(ResultList.Values['number'], -1); @@ -11512,7 +11526,7 @@ begin FLineOffsAddr := 0; FUseForceFlag := False; FName := AName; - FEnabled := True; + FEnabled := False; end; (* Using -insert-break with a function name allows GDB to adjust the address @@ -11596,6 +11610,7 @@ begin ClearAddr(ACmd); ClearCustom(ACmd); ClearLineOffs(ACmd); + FEnabled := False; end; function TGDBMIInternalBreakPoint.ClearId(ACmd: TGDBMIDebuggerCommand; AnId: Integer): Boolean; @@ -11644,7 +11659,7 @@ var R: TGDBMIExecResult; begin if FEnabled then exit; - FEnabled := True; + FEnabled := (FNameBreakID >= 0) or (FAddrBreakID >= 0) or (FCustomID >= 0) or (FLineOffsID >= 0); if FNameBreakID >= 0 then ACmd.ExecuteCommand('-break-enable %d', [FNameBreakID], R); diff --git a/components/lazdebuggergdbmi/gdbmistringconstants.pas b/components/lazdebuggergdbmi/gdbmistringconstants.pas index 1b15ea16b1..cfd82e8c11 100644 --- a/components/lazdebuggergdbmi/gdbmistringconstants.pas +++ b/components/lazdebuggergdbmi/gdbmistringconstants.pas @@ -60,6 +60,7 @@ resourcestring gdbmiEventLogDebugOutput = 'Debug Output: %s'; gdbmiEventLogProcessExitNormally = 'Process Exit: normally'; gdbmiEventLogProcessExitCode = 'Process Exit: %s'; + gdbmiFailedToLaunchExternalDbg = 'Failed to create process for GDB'; gdbmiFailedToTerminateGDBTitle = 'GDB did not terminate'; gdbmiFailedToTerminateGDB = 'The IDE was unable to terminate the GDB process. ' + 'This process may be left running outside the control of IDE.%0:s' diff --git a/components/lazdebuggergdbmi/languages/gdbmistringconstants.es.po b/components/lazdebuggergdbmi/languages/gdbmistringconstants.es.po index 6671a9e46e..6c50e757ca 100644 --- a/components/lazdebuggergdbmi/languages/gdbmistringconstants.es.po +++ b/components/lazdebuggergdbmi/languages/gdbmistringconstants.es.po @@ -110,6 +110,10 @@ msgctxt "gdbmistringconstants.gdbmieventlogprocessstart" msgid "Process Start: %s" msgstr "" +#: gdbmistringconstants.gdbmifailedtolaunchexternaldbg +msgid "Failed to create process for GDB" +msgstr "" + #: gdbmistringconstants.gdbmifailedtoterminategdb msgctxt "gdbmistringconstants.gdbmifailedtoterminategdb" msgid "The IDE was unable to terminate the GDB process. This process may be left running outside the control of IDE.%0:sTo ensure the process is not affecting your System, you should locate and terminate it yourself." diff --git a/components/lazdebuggergdbmi/languages/gdbmistringconstants.hu.po b/components/lazdebuggergdbmi/languages/gdbmistringconstants.hu.po index b9e3c2a676..ec002de595 100644 --- a/components/lazdebuggergdbmi/languages/gdbmistringconstants.hu.po +++ b/components/lazdebuggergdbmi/languages/gdbmistringconstants.hu.po @@ -109,6 +109,10 @@ msgctxt "gdbmistringconstants.gdbmieventlogprocessstart" msgid "Process Start: %s" msgstr "Folyamat indítása: %s" +#: gdbmistringconstants.gdbmifailedtolaunchexternaldbg +msgid "Failed to create process for GDB" +msgstr "" + #: gdbmistringconstants.gdbmifailedtoterminategdb msgctxt "gdbmistringconstants.gdbmifailedtoterminategdb" msgid "The IDE was unable to terminate the GDB process. This process may be left running outside the control of IDE.%0:sTo ensure the process is not affecting your System, you should locate and terminate it yourself." @@ -165,3 +169,4 @@ msgstr "Válasz: %sFolytatás?" #: gdbmistringconstants.lisunexpectedresultthedebuggerwillterminate msgid "Unexpected result:%sThe debugger will terminate" msgstr "Váratlan eredmény:%sA hibakereső leállni" + diff --git a/components/lazdebuggergdbmi/languages/gdbmistringconstants.it.po b/components/lazdebuggergdbmi/languages/gdbmistringconstants.it.po index 753307a3c4..7088b566df 100644 --- a/components/lazdebuggergdbmi/languages/gdbmistringconstants.it.po +++ b/components/lazdebuggergdbmi/languages/gdbmistringconstants.it.po @@ -23,30 +23,19 @@ msgstr "Il debugger ha incontrato un errore nel cercare di eseguire l'applicazio #: gdbmistringconstants.gdbmicommandstartmainbreakerror msgid "The debugger could not set a breakpoint on the application's entry point.%0:sThis may be caused by missing debug info." -msgstr "" -"Il debugger non ha potuto inserire un breakpoint al punto di avvio della " -"applicazione.%0:sQuesto può dipendere dalla mancanza di informazioni di " -"debug." +msgstr "Il debugger non ha potuto inserire un breakpoint al punto di avvio della applicazione.%0:sQuesto può dipendere dalla mancanza di informazioni di debug." #: gdbmistringconstants.gdbmicommandstartmainrunerror msgid "The debugger could not run the application.%0:sThis may be caused by missing debug info." -msgstr "" -"Il debugger non ha potuto avviare l'applicazione.%0:sQuesto può dipendere " -"dalla mancanza di informazioni di debug." +msgstr "Il debugger non ha potuto avviare l'applicazione.%0:sQuesto può dipendere dalla mancanza di informazioni di debug." #: gdbmistringconstants.gdbmicommandstartmainrunnopiderror msgid "The debugger failed to get the application's PID.%0:sThis may be caused by missing debug info." -msgstr "" -"Il debugger non ha trovato il PID dell'applicazione.%0:sQuesto può dipendere " -"dalla mancanza di informazioni di debug." +msgstr "Il debugger non ha trovato il PID dell'applicazione.%0:sQuesto può dipendere dalla mancanza di informazioni di debug." #: gdbmistringconstants.gdbmicommandstartmainruntostoperror msgid "The debugger was unable to initialize itself.%0:sThe application did run (and terminated) before the debugger could set any breakpoints. %0:sThis may be caused by missing debug info." -msgstr "" -"Il debugger non è riuscito ad inizializzarsi.%0:sL'applicazione si è " -"eseguita (ed è terminata) prima che il debugger potesse impostare i " -"breakpoints. %0:sQuesto può dipendere dalla mancanza di informazioni di " -"debug." +msgstr "Il debugger non è riuscito ad inizializzarsi.%0:sL'applicazione si è eseguita (ed è terminata) prima che il debugger potesse impostare i breakpoints. %0:sQuesto può dipendere dalla mancanza di informazioni di debug." #: gdbmistringconstants.gdbmierroronruncommand msgid "The debugger encountered an error when trying to run/step the application:%0:s%0:s%1:s%0:s%0:sPress \"Ok\" to continue debugging (paused), and correct the problem, or choose an alternative run command.%0:sPress \"Stop\" to end the debug session." @@ -54,8 +43,7 @@ msgstr "Il debugger ha incontrato un errore nel cercare di eseguire l'applicazio #: gdbmistringconstants.gdbmierroronruncommandwithwarning msgid "%0:s%0:sIn addition to the error the following warning was encountered:%0:s%0:s%1:s" -msgstr "" -"%0:s%0:sOltre all'errore è stato incontrato il seguente avviso:%0:s%0:s%1:s" +msgstr "%0:s%0:sOltre all'errore è stato incontrato il seguente avviso:%0:s%0:s%1:s" #: gdbmistringconstants.gdbmierrorstategenericinfo msgid "Error in: %1:s %0:s" @@ -67,8 +55,7 @@ msgstr "%0:sIl comando GDB:%0:s\"%1:s\"%0:sha restituito l'errore:%0:s\"%2:s\"%0 #: gdbmistringconstants.gdbmierrorstateinfocommandnoresult msgid "%0:sThe GDB command:%0:s\"%1:s\"%0:sdid not return any result.%0:s" -msgstr "" -"%0:sIl comando GDB:%0:s\"%1:s\"%0:snon ha restituito nessun risultato.%0:s" +msgstr "%0:sIl comando GDB:%0:s\"%1:s\"%0:snon ha restituito nessun risultato.%0:s" #: gdbmistringconstants.gdbmierrorstateinfofailedread msgid "%0:sCould not read output from GDB.%0:s" @@ -106,6 +93,10 @@ msgstr "Uscita del processo: normale" msgid "Process Start: %s" msgstr "Avvio del processo: %s" +#: gdbmistringconstants.gdbmifailedtolaunchexternaldbg +msgid "Failed to create process for GDB" +msgstr "" + #: gdbmistringconstants.gdbmifailedtoterminategdb msgid "The IDE was unable to terminate the GDB process. This process may be left running outside the control of IDE.%0:sTo ensure the process is not affecting your System, you should locate and terminate it yourself." msgstr "l'IDE non è riuscita a terminare il processo GDB. Questo processo può rimanere attivo fuori dal controllo dell'IDE.%0:sPer evitare che il processo influisca sul vostro sistema, dovreste individuarlo e terminarlo manualmente." @@ -124,15 +115,11 @@ msgstr "GDB ha incontrato un errore interno: %0:sPremere \"Ok\" per continuare i #: gdbmistringconstants.gdbmigdbinternalerrorinfo msgid "While executing the command: %0:s\"%2:s\"%0:sgdb reported:%0:s\"%1:s\"%0:s" -msgstr "" -"Nell'eseguire il comando: %0:s\"%2:s\"%0:sgdb ha restituito:%0:s\"%1:s\"%0:s" +msgstr "Nell'eseguire il comando: %0:s\"%2:s\"%0:sgdb ha restituito:%0:s\"%1:s\"%0:s" #: gdbmistringconstants.gdbmipressignoretocontinuedebuggingthismaynotbesafepres msgid "Press \"Ignore\" to continue debugging. This may NOT be safe. Press \"Abort\" to stop the debugger.%0:sException: %1:s with message \"%2:s\"%0:sContext: %4:s. State: %5:s %0:s%0:s%3:s" -msgstr "" -"Premere \"Ignore\" per proseguire il debug. Questo potrebbe NON essere sicuro. " -"Premere \"Abort\" per fermare il debugger.%0:sErrore: %1:s con messaggio \"%" -"2:s\"%0:sContesto: %4:s. Stato: %5:s %0:s%0:s%3:s" +msgstr "Premere \"Ignore\" per proseguire il debug. Questo potrebbe NON essere sicuro. Premere \"Abort\" per fermare il debugger.%0:sErrore: %1:s con messaggio \"%2:s\"%0:sContesto: %4:s. Stato: %5:s %0:s%0:s%3:s" #: gdbmistringconstants.gdbmithedebuggerexperiencedanunknowncondition msgid "The debugger experienced an unknown condition" @@ -144,18 +131,11 @@ msgstr "Tempo scaduto per il comando \"%s\"" #: gdbmistringconstants.gdbmiwarningunknowbreakpoint msgid "The debugger reached an unexpected %1:s%0:s%0:sPress \"Ok\" to continue debugging (paused).%0:sPress \"Stop\" to end the debug session." -msgstr "" -"Il debugger è giunto ad un inatteso %1:s%0:s%0:sPremere \"Ok\" per continuare " -"il debug (in pausa).%0:sPremere \"Stop\" per terminare la sessione di debug." +msgstr "Il debugger è giunto ad un inatteso %1:s%0:s%0:sPremere \"Ok\" per continuare il debug (in pausa).%0:sPremere \"Stop\" per terminare la sessione di debug." #: gdbmistringconstants.lisnewthegnudebuggerthroughsshallowstoremotedebugviaassh msgid "The GNU debugger through SSH allows to remote debug via a SSH connection. See docs/RemoteDebugging.txt for details. The path must contain the SSH client. Use SSH_Startup_Options for the hostname and optional username. Use Remote_GDB_Exe for the filename of GDB on the remote computer." -msgstr "" -"Il debugger GNU attraverso SSH permette il debug da remoto tramite una " -"connessione SSH. Vedere docs/RemoteDebugging.txt per dettagli. Il percorso " -"deve includere il cliente SSH. Usare SSH_Startup_Options per il nome host e " -"un nome utente opzionale. Usare Remote_GDB_Exe per il nome del file di GDB " -"nel computer remoto." +msgstr "Il debugger GNU attraverso SSH permette il debug da remoto tramite una connessione SSH. Vedere docs/RemoteDebugging.txt per dettagli. Il percorso deve includere il cliente SSH. Usare SSH_Startup_Options per il nome host e un nome utente opzionale. Usare Remote_GDB_Exe per il nome del file di GDB nel computer remoto." #: gdbmistringconstants.lisresponsecontinue msgid "Response: %sContinue ?" @@ -164,3 +144,4 @@ msgstr "Risposta: %sContinuare ?" #: gdbmistringconstants.lisunexpectedresultthedebuggerwillterminate msgid "Unexpected result:%sThe debugger will terminate" msgstr "Risultato inatteso:%sIl debugger termina" + diff --git a/components/lazdebuggergdbmi/languages/gdbmistringconstants.ja.po b/components/lazdebuggergdbmi/languages/gdbmistringconstants.ja.po index 42496c9be1..0cdc58b638 100644 --- a/components/lazdebuggergdbmi/languages/gdbmistringconstants.ja.po +++ b/components/lazdebuggergdbmi/languages/gdbmistringconstants.ja.po @@ -110,6 +110,10 @@ msgctxt "gdbmistringconstants.gdbmieventlogprocessstart" msgid "Process Start: %s" msgstr "プロセス開始:%s" +#: gdbmistringconstants.gdbmifailedtolaunchexternaldbg +msgid "Failed to create process for GDB" +msgstr "" + #: gdbmistringconstants.gdbmifailedtoterminategdb msgctxt "gdbmistringconstants.gdbmifailedtoterminategdb" msgid "The IDE was unable to terminate the GDB process. This process may be left running outside the control of IDE.%0:sTo ensure the process is not affecting your System, you should locate and terminate it yourself." diff --git a/components/lazdebuggergdbmi/languages/gdbmistringconstants.lt.po b/components/lazdebuggergdbmi/languages/gdbmistringconstants.lt.po index cfc4328090..b9146d1380 100644 --- a/components/lazdebuggergdbmi/languages/gdbmistringconstants.lt.po +++ b/components/lazdebuggergdbmi/languages/gdbmistringconstants.lt.po @@ -110,6 +110,10 @@ msgctxt "gdbmistringconstants.gdbmieventlogprocessstart" msgid "Process Start: %s" msgstr "" +#: gdbmistringconstants.gdbmifailedtolaunchexternaldbg +msgid "Failed to create process for GDB" +msgstr "" + #: gdbmistringconstants.gdbmifailedtoterminategdb msgctxt "gdbmistringconstants.gdbmifailedtoterminategdb" msgid "The IDE was unable to terminate the GDB process. This process may be left running outside the control of IDE.%0:sTo ensure the process is not affecting your System, you should locate and terminate it yourself." diff --git a/components/lazdebuggergdbmi/languages/gdbmistringconstants.po b/components/lazdebuggergdbmi/languages/gdbmistringconstants.po index c26402ec2f..38a0dc84ef 100644 --- a/components/lazdebuggergdbmi/languages/gdbmistringconstants.po +++ b/components/lazdebuggergdbmi/languages/gdbmistringconstants.po @@ -81,6 +81,10 @@ msgstr "" msgid "Process Start: %s" msgstr "" +#: gdbmistringconstants.gdbmifailedtolaunchexternaldbg +msgid "Failed to create process for GDB" +msgstr "" + #: gdbmistringconstants.gdbmifailedtoterminategdb msgid "The IDE was unable to terminate the GDB process. This process may be left running outside the control of IDE.%0:sTo ensure the process is not affecting your System, you should locate and terminate it yourself." msgstr "" diff --git a/components/lazdebuggergdbmi/languages/gdbmistringconstants.pt_BR.po b/components/lazdebuggergdbmi/languages/gdbmistringconstants.pt_BR.po index 3f5d1f5f02..71d72dc005 100644 --- a/components/lazdebuggergdbmi/languages/gdbmistringconstants.pt_BR.po +++ b/components/lazdebuggergdbmi/languages/gdbmistringconstants.pt_BR.po @@ -115,6 +115,10 @@ msgctxt "gdbmistringconstants.gdbmieventlogprocessstart" msgid "Process Start: %s" msgstr "Início do Processo: %s" +#: gdbmistringconstants.gdbmifailedtolaunchexternaldbg +msgid "Failed to create process for GDB" +msgstr "" + #: gdbmistringconstants.gdbmifailedtoterminategdb msgctxt "gdbmistringconstants.gdbmifailedtoterminategdb" msgid "The IDE was unable to terminate the GDB process. This process may be left running outside the control of IDE.%0:sTo ensure the process is not affecting your System, you should locate and terminate it yourself." diff --git a/components/lazdebuggergdbmi/languages/gdbmistringconstants.ru.po b/components/lazdebuggergdbmi/languages/gdbmistringconstants.ru.po index ad82b84420..e6a22e2c85 100644 --- a/components/lazdebuggergdbmi/languages/gdbmistringconstants.ru.po +++ b/components/lazdebuggergdbmi/languages/gdbmistringconstants.ru.po @@ -108,6 +108,10 @@ msgctxt "gdbmistringconstants.gdbmieventlogprocessstart" msgid "Process Start: %s" msgstr "Запуск процесса: %s" +#: gdbmistringconstants.gdbmifailedtolaunchexternaldbg +msgid "Failed to create process for GDB" +msgstr "" + #: gdbmistringconstants.gdbmifailedtoterminategdb msgctxt "gdbmistringconstants.gdbmifailedtoterminategdb" msgid "The IDE was unable to terminate the GDB process. This process may be left running outside the control of IDE.%0:sTo ensure the process is not affecting your System, you should locate and terminate it yourself." diff --git a/components/lazdebuggergdbmi/languages/gdbmistringconstants.uk.po b/components/lazdebuggergdbmi/languages/gdbmistringconstants.uk.po index eed49ced46..54488146bf 100644 --- a/components/lazdebuggergdbmi/languages/gdbmistringconstants.uk.po +++ b/components/lazdebuggergdbmi/languages/gdbmistringconstants.uk.po @@ -107,6 +107,10 @@ msgctxt "gdbmistringconstants.gdbmieventlogprocessstart" msgid "Process Start: %s" msgstr "" +#: gdbmistringconstants.gdbmifailedtolaunchexternaldbg +msgid "Failed to create process for GDB" +msgstr "" + #: gdbmistringconstants.gdbmifailedtoterminategdb msgctxt "gdbmistringconstants.gdbmifailedtoterminategdb" msgid "The IDE was unable to terminate the GDB process. This process may be left running outside the control of IDE.%0:sTo ensure the process is not affecting your System, you should locate and terminate it yourself." diff --git a/debugger/debuggerstrconst.pp b/debugger/debuggerstrconst.pp index 28a7146ea5..01cfcc1793 100644 --- a/debugger/debuggerstrconst.pp +++ b/debugger/debuggerstrconst.pp @@ -76,6 +76,8 @@ resourcestring drsUseInstanceClassType = 'Use Instance class type'; drsLen = 'Len=%d: '; + synfNewValueIsEmpty = '"New value" is empty'; + synfTheDebuggerWasNotAbleToModifyTheValue = 'The debugger was not able to modify the value'; implementation diff --git a/debugger/evaluatedlg.pp b/debugger/evaluatedlg.pp index 7886055dc2..fe7a66a168 100644 --- a/debugger/evaluatedlg.pp +++ b/debugger/evaluatedlg.pp @@ -39,7 +39,7 @@ interface uses Classes, SysUtils, LCLType, Forms, IDEWindowIntf, IDEImagesIntf, DbgIntfDebuggerBase, LazarusIDEStrConsts, - ComCtrls, StdCtrls, Menus, DebuggerDlg, BaseDebugManager, + ComCtrls, StdCtrls, Menus, Dialogs, DebuggerDlg, BaseDebugManager, InputHistory, IDEProcs, Debugger, DebuggerStrConst; type @@ -253,7 +253,11 @@ begin S := Trim(cmbExpression.Text); if S = '' then Exit; V := cmbNewValue.Text; - if not DebugBoss.Modify(S, V) then Exit; + if not DebugBoss.Modify(S, V) then begin + MessageDlg(lisCCOErrorCaption, synfTheDebuggerWasNotAbleToModifyTheValue, mtError, [mbOK], + 0); + Exit; + end; if cmbNewValue.Items.IndexOf(V) = -1 then cmbNewValue.Items.Insert(0, V); @@ -326,6 +330,10 @@ end; procedure TEvaluateDlg.tbModifyClick(Sender: TObject); begin + if cmbNewValue.Text = '' then begin + MessageDlg(lisCCOErrorCaption, synfNewValueIsEmpty, mtError, [mbOK], 0); + exit; + end; Modify; end;