File indexing completed on 2026-04-09 07:49:21
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <string>
0023 #include "OPTICKS_LOG.hh"
0024 #include "SStackFrame.h"
0025
0026 std::string macOS = R"(
0027 4 libG4processes.dylib 0x00000001090baee5 _ZN12G4VEmProcess36PostStepGetPhysicalInteractionLengthERK7G4TrackdP16G4ForceCondition + 661
0028 5 libG4tracking.dylib 0x00000001088ffff0 _ZN10G4VProcess12PostStepGPILERK7G4TrackdP16G4ForceCondition + 80
0029 6 libG4tracking.dylib 0x00000001088ffa1a _ZN17G4SteppingManager24DefinePhysicalStepLengthEv + 298
0030 7 libG4tracking.dylib 0x00000001088fcc3a _ZN17G4SteppingManager8SteppingEv + 394
0031 8 libG4tracking.dylib 0x000000010891386f _ZN17G4TrackingManager15ProcessOneTrackEP7G4Track + 1679
0032 9 libG4event.dylib 0x00000001087da71a _ZN14G4EventManager12DoProcessingEP7G4Event + 3306
0033 10 libG4event.dylib 0x00000001087dbc2f _ZN14G4EventManager15ProcessOneEventEP7G4Event + 47
0034 11 libG4run.dylib 0x00000001086e79f5 _ZN12G4RunManager15ProcessOneEventEi + 69
0035 12 libG4run.dylib 0x00000001086e7825 _ZN12G4RunManager11DoEventLoopEiPKci + 101
0036 13 libG4run.dylib 0x00000001086e5ce1 _ZN12G4RunManager6BeamOnEiPKci + 193
0037 14 libCFG4.dylib 0x0000000106a63df9 _ZN3CG49propagateEv + 1689
0038 15 libOKG4.dylib 0x00000001000e22b6 _ZN7OKG4Mgr10propagate_Ev + 182
0039 16 libOKG4.dylib 0x00000001000e1ec6 _ZN7OKG4Mgr9propagateEv + 470
0040 17 OKG4Test 0x0000000100014c89 main + 489
0041 18 libdyld.dylib 0x00007fff6bd8b015 start + 1
0042 19 ??? 0x0000000000000005 0x0 + 5
0043 )" ;
0044
0045 std::string Linux = R"(
0046 /home/blyth/local/opticks/lib64/libSysRap.so(+0x10495) [0x7fffe54cf495]
0047 /home/blyth/local/opticks/lib64/libSysRap.so(_ZN10SBacktrace4DumpEv+0x1b) [0x7fffe54cf823]
0048 /home/blyth/local/opticks/lib64/libCFG4.so(_ZN10CMixMaxRng4flatEv+0x138) [0x7ffff7955f84]
0049 /home/blyth/local/opticks/externals/lib64/libG4processes.so(_ZN12G4VEmProcess36PostStepGetPhysicalInteractionLengthERK7G4TrackdP16G4ForceCondition+0x2ce) [0x7ffff1e3f21a]
0050 /home/blyth/local/opticks/externals/lib64/libG4tracking.so(_ZN10G4VProcess12PostStepGPILERK7G4TrackdP16G4ForceCondition+0x42) [0x7ffff36ff9b2]
0051 /home/blyth/local/opticks/externals/lib64/libG4tracking.so(_ZN17G4SteppingManager24DefinePhysicalStepLengthEv+0x127) [0x7ffff36fe161]
0052 /home/blyth/local/opticks/externals/lib64/libG4tracking.so(_ZN17G4SteppingManager8SteppingEv+0x1c2) [0x7ffff36fb410]
0053 /home/blyth/local/opticks/externals/lib64/libG4tracking.so(_ZN17G4TrackingManager15ProcessOneTrackEP7G4Track+0x284) [0x7ffff3707236]
0054 /home/blyth/local/opticks/externals/lib64/libG4event.so(_ZN14G4EventManager12DoProcessingEP7G4Event+0x4ce) [0x7ffff397fd46]
0055 /home/blyth/local/opticks/externals/lib64/libG4event.so(_ZN14G4EventManager15ProcessOneEventEP7G4Event+0x2e) [0x7ffff3980572]
0056 /home/blyth/local/opticks/externals/lib64/libG4run.so(_ZN12G4RunManager15ProcessOneEventEi+0x57) [0x7ffff3c82665]
0057 /home/blyth/local/opticks/externals/lib64/libG4run.so(_ZN12G4RunManager11DoEventLoopEiPKci+0x59) [0x7ffff3c824d7]
0058 /home/blyth/local/opticks/externals/lib64/libG4run.so(_ZN12G4RunManager6BeamOnEiPKci+0xc1) [0x7ffff3c81d2d]
0059 /home/blyth/local/opticks/lib/CerenkovMinimal() [0x41a014]
0060 /home/blyth/local/opticks/lib/CerenkovMinimal() [0x419ed1]
0061 /home/blyth/local/opticks/lib/CerenkovMinimal() [0x4098bd]
0062 /usr/lib64/libc.so.6(__libc_start_main+0xf5) [0x7fffe00e1445]
0063 /home/blyth/local/opticks/lib/CerenkovMinimal() [0x409629]
0064 )" ;
0065
0066
0067 int main(int argc, char** argv )
0068 {
0069 OPTICKS_LOG(argc, argv);
0070
0071 #ifdef __APPLE__
0072 const char* lines = macOS.c_str();
0073 #else
0074 const char* lines = Linux.c_str();
0075 #endif
0076 LOG(info) << std::endl << lines ;
0077
0078
0079 std::istringstream iss(lines);
0080 std::string line ;
0081 while (getline(iss, line, '\n'))
0082 {
0083 if(line.empty()) continue ;
0084
0085
0086
0087 SStackFrame f((char*)line.c_str());
0088 f.dump();
0089 }
0090
0091 return 0 ;
0092 }
0093