Thead search today has the following options
Whole word
Start word
Match case
Regular Expression
I propose to add th option
Exclude comments
It would not list lines matching the format
<whitespace>//<anything></anything></whitespace>
Reason
CB already has the very powerful Ctrl-Shift-C, Ctrl-Shift-X feature to add or remove "//" to a block of code. I am using this very often during debug and test.
The search list is often flooded with commented-out sections. Sometimes its desired, but often its not. Using that option would allow to take out a lot of noise from the list (at least for people using comments ;-).
Disadvantages
obviously there is potential confusion since
* it only works on C++ style single line comments "//". It would not remove /* as multiline logic is probably overkill.
* there are no "//" in C, so for pure C programs that option would be not useful
* I do not know Fortran, but might be the same
I think the same disadvantages apply to the Ctrl-Shift-C, Ctrl-Shift-X feature, so it would be consistent
to add this to thread search despite these disadvantages. The gain imho would outweight those.
I take some time to read the source code of this plugin. I think if you want that option, you need to change this function:
So, I think you can modify this function to skip the lines if it start with "//".
Can you try it yourself?
Last edit: ollydbg 2023-03-27
Thanks for the hints and your time. I see what I can do.
Took quite a while but now i managed to get a working compile environment and implemented the proposal.
See patch #1436
The patch adds the option "Match In Comments". Its checked by default because then the behaviour is the same as today. It only works with C++ style comments "//" both full line and end of line. This info was put into the tooltip string.
Tested in Linux 22.04 with wxWidgets3.0.5 only.
i hope you find it a useful addition.