On Saturday 11 October 2008 03:00:37 am Teo Fonrouge wrote: > Hello, > > On Linux, I want to do some profiling in an proyect, so I have compiled > Harbour with "-DHB_USE_PROFILER" and created the binaries. > > Nevertheless, when I try to run the sample at /tests/testprof.prg it simply > aborts with a segfault. > > Is there something in which I must have take care of ?
I have traced out the problem at sources/vm/classes.c at the following function: ---------------- void hb_mthAddTime( ULONG ulClockTicks ) { PMETHOD pMethod = s_pClasses[ hb_objGetClassH( hb_stackSelfItem() ) ]-> pMethods; if( pMethod ) { pMethod += hb_stackBaseItem()->item.asSymbol.stackstate->uiMethod; pMethod->ulCalls++; pMethod->ulTime += ulClockTicks; } } ---------------- Here seems that the pointer in pMethod is wrongly indexed with: += hb_stackBaseItem()->item.asSymbol.stackstate->uiMethod . Why is used 'hb_stackBaseItem()->item.asSymbol.stackstate->uiMethod' to obtain the PMETHOD that needs to be profiled ??? Any help is badly appreciated. best regards, Teo _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour