Re: [PATCH v2 00/47] Windows non-stop mode

Tom Tromey
2025-06-12T19:23:52Z

Pedro> Is the test using scheduler locking (and was previously ignoring the error
Pedro> that "set scheduler-locking on" currently issues on Windows) ?

Nope. The test is fairly basic. I've appended the two files (the test
script and the Ada source) , since I don't think there's anything
particularly proprietary about them. They seem to be pretty old.

Pedro> I ask because that is expected output if you continue with scheduler locking enabled,
Pedro> and the thread exits. E.g., the new gdb.threads/leader-exit-schedlock.exp testcase added
Pedro> by the series, has:

Pedro> Maybe some logs like:
Pedro> set debug infrun
Pedro> set debugevents on
Pedro> set debugexceptions on
Pedro> set debugexec on
Pedro> would help see what's going on.

I will try to do this soon.

Tom

from testcase_utils import exit_notification, gnatmake, new_gdb, require

require("Ada")

gnatmake("main")

gdb = new_gdb("main")

gdb.breakpoint("main.adb:4", file="main.adb")
gdb.composite_command(
"commands",
sub_commands=[
"silent",
'printf "Breakpoint hit #1.\\n"',
"clear main.adb:4",
"continue",
"end",
],
)

gdb.breakpoint("main.adb:5", file="main.adb")
gdb.composite_command(
"commands",
sub_commands=[
"silent",
'printf "Breakpoint hit #2.\\n"',
"clear main.adb:5",
"continue",
"end",
],
)
gdb.run(
out=[
"@...",
"Breakpoint hit #@NUMBER.",
"Breakpoint hit #@NUMBER.",
"@...",
exit_notification(),
]
)

procedure Main is
I,J : Integer := 1;
begin
I := J*1000; -- Must remain at line 4 for the purpose of this test
J := I*5; -- Must remain at line 5 for the purpose of this test
end Main;