This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi. I'm looking into implementing a wait command, and have come across something I don't understand. I understand the goal of this comment in infrun.c: /* In non-stop mode, we don't want GDB to switch threads behind the user's back, to avoid races where the user is typing a command to apply to thread x, but GDB switches to thread y before the user finishes entering the command. */ Sounds reasonable to me. But I'm finding (apparent) violations of this and wondering if they're all bugs. E.g. With the appended testcase I see gdb changing the current thread each time a breakpoint is hit, despite the above claim. The above comment is a bit misleading since that code doesn't actually change anything, it just prints a message notifying the user that the current thread has changed. Plus, gdb prints a breakpoint hit notification but without also printing which thread hit the breakpoint (even if the current thread isn't changed), the message is less useful than it could be. Can anyone add any clarity here?
Attachment:
test.c.txt
Description: Text document
Attachment:
test.gdb.txt
Description: Text document
Attachment:
test.log.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |