mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 20:59:06 +02:00
Merged revision(s) 48409 #9cefd73299, 48437 #ed83f63c99 from trunk:
Debugger GDBMI: Fix checking for handle to gdb (unix) ........ Debugger GDBMI: Fix checking for handle to gdb (unix) ........ git-svn-id: branches/fixes_1_4@48448 -
This commit is contained in:
parent
1e2165c02b
commit
4e6ab4552f
@ -137,8 +137,9 @@ begin
|
|||||||
// set bits for all waiting handles
|
// set bits for all waiting handles
|
||||||
for n := 0 to Count do
|
for n := 0 to Count do
|
||||||
begin
|
begin
|
||||||
if Max < AHandles[n] then Max := AHandles[n];
|
if AHandles[n] < 0 then
|
||||||
if AHandles[n] <> 0 then
|
continue;
|
||||||
|
if Max < AHandles[n] + 1 then Max := AHandles[n] + 1;
|
||||||
FpFD_Set(AHandles[n], FDS);
|
FpFD_Set(AHandles[n], FDS);
|
||||||
end;
|
end;
|
||||||
if Max=0 then begin
|
if Max=0 then begin
|
||||||
@ -158,7 +159,7 @@ begin
|
|||||||
// Select:
|
// Select:
|
||||||
// R = -1 on error, 0 on timeout, >0 on success and is number of handles
|
// R = -1 on error, 0 on timeout, >0 on success and is number of handles
|
||||||
// FDSWait is changed, and indicates what descriptors have changed
|
// FDSWait is changed, and indicates what descriptors have changed
|
||||||
R := FpSelect(Max + 1, @FDSWait, nil, nil, TimeOut);
|
R := FpSelect(Max, @FDSWait, nil, nil, TimeOut);
|
||||||
|
|
||||||
if CurCallStamp <> FReadLineCallStamp then
|
if CurCallStamp <> FReadLineCallStamp then
|
||||||
exit;
|
exit;
|
||||||
@ -197,7 +198,7 @@ begin
|
|||||||
if R > 0
|
if R > 0
|
||||||
then begin
|
then begin
|
||||||
for n := 0 to Count do
|
for n := 0 to Count do
|
||||||
if (AHandles[n] <> 0)
|
if (AHandles[n] >= 0)
|
||||||
and (FpFD_ISSET(AHandles[n],FDSWait)=1)
|
and (FpFD_ISSET(AHandles[n],FDSWait)=1)
|
||||||
then begin
|
then begin
|
||||||
Result := Result or 1 shl n;
|
Result := Result or 1 shl n;
|
||||||
|
Loading…
Reference in New Issue
Block a user