[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Source Locators



        In Genera 7, when viewing code in the debugger, I get the message
        this function was not compiled with source locators and therefore
        will not be mouse sensitive.  How do I compile with source locators,
        and what will become mouse sensitive?

    Source locators are information that the compiler can put into a compiled
    function to allow the :Show Source Code command to know what piece of
    code corresponds to what PC in the function.  This allows it to do various
    things with the code, such as evaluating the code fragment (m-sh-Middle)
    set a breakpoint on it (c-m-L) or proceed to a that point (c-m-R).

Funny, m-sh-Middle doesn't do anything on my machine. On my machine
c-m-Left sets a breakpoint, c-m-Middle clears a breakpoint, c-m-Right
offers to "modify a structure slot" whatever that is, c-m-sh-Left
offers to monitor this location (I wish I could figure out how to use
this, it probably could be very usefull). These hold true for all cases
where issuing a :Show Source Code command to either the debugger or
lisp top level as well as in the editor except the editor doesn't offer
c-m-Right to "modify a structure slot". I have not been able to find
an equivalent for "evaluating the code fragment" or "proceed to that point"
discussed above. They would clearly be usefull as well as a "Set Breakpoint After"
like the c-m-Left which sets a breakpoint before. Also I don't know where else
source locators show up. The window debugger would be nice but they don't seem
to show up there.

    You can also manipulate breakpoints on code from the editor, using the
    same gestures, if you've compiled the function with source-locators.
    You don't have to get into the debugger somehow so you can do :Show Compiled
    Code; just go to the editor and click on the right piece.  (Yet another
    advantage of the editor using the dynamic-window technology).

For your info, when I did a :Show Source Code on a function, then set and then
cleared a breakpoint, the system tried to redisplay my source code in upper
case digested format in the window. It got confused while doing so and screwed
up the display of the dynmaic window. This happens so often I don't even remember
all of the cases where it happens. I guess this is just another advantage of
using dynamic-window technology.

    You compile with source locators by setting compiler:*inhibit-using-source-locators*
    to nil and compiling from the editor, or by compiling using the c-m-sh-C command,
    which toggles the value of compiler:*inhibit-using-source-locators*.

With the help of Steve Bagley I finally figured out how to use this stuff.
It seems that doing m-x Compile Buffer or m-sh-C (to compile changed definitions)
will *NOT* compile using source locators no matter what the state of
compiler:*inhibit-using-source-locators* is. The only way to get source locators
into code is to either issue c-sh-C with the above variable set to T or to
issue c-m-sh-C with the above variable set to NIL.

-Jeff (Qobi)
-------