Fix and extend HB_CompileFromBuf()

28 views
Skip to first unread message

Eric Lendvai

unread,
9:06 AM (14 hours ago) 9:06 AM
to Harbour Developers
I made a merge request:  Fix and extend HB_CompileFromBuf() to support proper debug info #391

This will allow to actually debug code compiled using HB_CompileFromBuf.

Here is an example for how to use this:

local l_InDebugMode := hb_isFunction("__DebugItem")

if l_InDebugMode   // Running in Debug Executable
    l_oHrb := HB_CompileFromBuf( l_cSourceCodeFull, ;
                                 l_cSourceFilePath ,;
                                 "-b", ;      // generate debug info
                                 "-n", ;
                                 "-I" + l_cHBheaders1, ;
                                 "-I" + l_cHBheaders2, ;
                                 "-I" + l_cHBheaders3, ;
                                 "-I" + hb_GetEnv( "HB_INCLUDE" ) )
else
    l_oHrb := HB_CompileFromBuf( l_cSourceCodeFull, ;
                                 l_cSourceFilePath ,;
                                 "-n", ;
                                 "-I" + l_cHBheaders1, ;
                                 "-I" + l_cHBheaders2, ;
                                 "-I" + l_cHBheaders3, ;
                                 "-I" + hb_GetEnv( "HB_INCLUDE" ) )
endif
Reply all
Reply to author
Forward
0 new messages