As some of you may know, I have been struggling to debug a  DLL library,
that in one scenario gets loaded by Java, for weeks by now.

So far it has not been possible for me to really get the VS debugger to
step in (even if following all the valuable advice I received via this
list, after attaching to the java.exe process and having defined
breakpoints for the DLL).

Now, it seems that I have found a way to achieve that and would like to
share this with you, in case you might once run into a comparable
problem (that one program takes over all debugging, such that VS cannot
step in). Remebering a remark from Mark Miesfeld, I started out to
research again that statement that was able to trigger VS, this time
using a new approach in research and was lucky enough to find a few
hints. The most valuable piece of information is from
<http://ccollomb.free.fr/blog/?p=30>, which explains different ways of
how to insert statements in one's code to trigger the debugger.

Here are hints from that article:

    * define a macro:

          #define BREAK_HERE_SINGLESTEP() __asm __emit 0xF1

      and later in the code use it wherever you want to start to debug
      in single step mode, enter:

         BREAK_HERE_SINGLESTEP();

      this macro has the stated benefit, that it goes right into single
      stepping mode, without firing up the exception dialog. However, it
      did not work in my situation, as java.exe even consumed that one.

    *  However the cited means that cause the exception popup to appear
      (and therefore allows one to invoke VS) would work. Just enter one of

      *   __asm int 3;
         DebugBreak();
      *   __asm __emit 0xCC;
         __asm __emit 0xCD; __asm __emit 0×03;
         __debugbreak();
         _CrtDbgBreak();

      Did experiment with the first two forms (highlighted in bold), and
      both worked. From this moment on the VS-set breakpoints get honored.


Again, not having found this information easily I think that once found,
it should be communicated for those who may have a need for such a
triggering of the debugger sometimes in the unspecified future.

Hoping, that with this I will be able to corner the problem from one
particular user's use-case (employing multiple Java threads dispatching
Rexx scripts and then Halt() and Terminate() the interpreter instances),
finally.

---rony

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to