c++ - Executing a function based on an event where a function returns in c, is this possible in runtime? -


the issue i'm experiencing , applications make use of library has been created include logging , cannot recompile code running applications legacy applications.

so need add functionality in library file , relink source code library files.

a function defined in library file called debug_data()

-> returns function name line etc. -> function used in application , required on execution of function debug_data need add event , trigger event once function calls debug_data returns.

is possible create trigger on event in c trigger isn't called ? can done in runtime ? in tweaking stack?

edit: added debug_data():

void dynatrace_method_start(    const char *ms_functionname, const char *ms_filename, int ms_lineno) { #ifdef dt_use /*a global variable needs initiated stack trace lets call int dyna_m_serial*/     dt_current_stack++;     if (dt_current_stack<=dt_stack) {         // file_name_stripper(ms_filename);         dyna_m_serial++;         fprintf(pfile,"%d,mstart,%s,%s,%d,%s,%d\r\n",             dyna_uid, ms_functionname, file_name_stripper(ms_filename), ms_lineno,             sprogram_‌​name, dyna_m_serial);         line_reference[dyna_m_serial]=ms_lineno;     } #endif } 

os guardian h series tns\e, compiler compaq etk -nse.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -