<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">The problem is that there are complications if the target is stripped off symbols, </div></div></blockquote><div><br class=""></div><div>SIMPLE - see my reply from a few minutes ago.</div><div><br class=""></div><div>If you write your “DEBUGGER_CALL” function- you could decorate it with some signature pattern.</div><div><br class=""></div><div>For example, in assembly language:</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>.ascii<span class="Apple-tab-span" style="white-space:pre"> </span>“DEBUGGER_CALL_FUNCTION_START===>”</div><div>DEBUGGER_CALL:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>mov<span class="Apple-tab-span" style="white-space:pre"> </span>r0,-1</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>return</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>nop</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>nop</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>nop</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>nop</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>nop</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>.ascii<span class="Apple-tab-span" style="white-space:pre"> </span>“<====DEBUGGER_CALL_FUNCTION_END”</div><div><br class=""></div><div>Then search the target text segment, you should look for and find exactly ONE instance of the strings.</div><div>Or maybe you will find others in various shared libraries that might be loaded</div><div>Again, the solution is simple - Search the text segment for your string pattern</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""> I probably can work around by still sending a signal</div></div></blockquote><div><br class=""></div><div>DO NOT use signals - Signals do not work on targets that do not have an operating system</div><div><br class=""></div><div>Another reason is you want to be able to insert these types of things in main line code that gets executed a reasonable number of times, you don’t want SIGNALS going off, they delay things</div><div><br class=""></div><div>Instead, you have a single instance of a couple instructions, in a more modern computer these few opcodes live in the CPU cache and become almost ZERO overhead</div><div><br class=""></div><div>Thus you can leave them in … and not really effect overall system performance meaningfully</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Another vague worry is if overzealous compiler would optimize it out,</div></div></blockquote><div><br class=""></div><div>Hence you write this in assembly language, you also must worry about optimizing linkers but you can probably control that more easily.</div><div><br class=""></div><div>You supply a *LIBRARY* (binary) that your users would link against, that library contains exactly that one function above nothing else</div><div><span style="font-family: Calibri; font-size: 16px;" class=""> </span></div><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">I do not fully understand why we need mutex here... Each thread allocates data in its own memory (either allocated or on stack) and when it breaks each thread has its own local pointer (either on stack or in register). I.e. it seems this can be made lock-free.<br class=""></div></div></blockquote><div><br class=""></div><div>YES in the example I give, the “DEBUGGER_CALL” data structure would most likely live on the current threads CPU STACK Hence it is thread safe</div><div><br class=""></div>**END**</div><div><br class=""></div><div>-Duane.</div><div><br class=""></div><br class=""></body></html>