Fix how remotely debugged process end is detected.

[DEVELOPMENT ENVIRONMENT]
* BUG: Debugger: Watch a remotely debugged process through the lock file
  it creates, instead of relying on '/proc' which is not reliable and
  Linux-specific.
* BUG: Save the cursor position in the history when the procedure list is used.
This commit is contained in:
gambas 2021-10-21 01:04:42 +02:00
parent 4681142810
commit a40d11b528
3 changed files with 12 additions and 1 deletions

View file

@ -1292,8 +1292,17 @@ End
Public Sub TimerRemote_Timer()
Dim sPath As String
Dim hLock As File
If $iProcessId Then
If Not Exist("/proc" &/ CStr($iProcessId)) Then Stop()
sPath = File.SetExt($sFifo, "lock")
Try hLock = Lock sPath
If Not Error Then
Stop()
Unlock hLock
Try Kill sPath
Endif
Endif
End

View file

@ -2976,6 +2976,7 @@ Public Sub GotoFunction(iLine As Integer)
iCol = String.Len($hEditor[iLine].Text) - String.Len(LTrim($hEditor[iLine].Text))
Me.GotoCenter(iLine, iCol) ', True)
CPosition.SaveCurrent(Me)
$hEditor.SetFocus
End

View file

@ -1168,6 +1168,7 @@ End
Private Sub GotoProc(iLine As Integer)
$hEditor.GotoCenter(0, iLine)
CPosition.SaveCurrent(Me)
End