Blame view

build2/epsilon-master/ion/src/blackbox/boot.cpp 636 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  #include <ion.h>
  #include <stdlib.h>
  #include <signal.h>
  #include "events.h"
  #include "display.h"
  
  constexpr int kHeapSize = 131072;
  char heap[kHeapSize];
  extern "C" {
    char * _heap_start = (char *)heap;
    char * _heap_end = _heap_start+kHeapSize;
    int main(int argc, char * argv[]);
  }
  
  int main(int argc, char * argv[]) {
    for (int i=1; i<argc; i++) {
      if (strcmp(argv[i], "--logAfter") == 0 && argc > i+1) {
        Ion::Display::Blackbox::setFrameBufferActive(true);
        Ion::Events::Blackbox::logAfter(atoi(argv[i+1]));
      }
    }
    signal(SIGABRT, Ion::Events::Blackbox::dumpEventCount);
    ion_main(argc, argv);
    return 0;
  }