Which function calls GameView::OnTick?

  • suibian
    18th Aug 2017 Member 0 Permalink

    Which function calls GameView::OnTick? (for C++)

    Edited once by suibian. Last: 18th Aug 2017
  • jeffluo35
    18th Aug 2017 Member 0 Permalink
    gui/interface/Window.cpp:281
    Can't you just use the search bar? It exists for a reason...
    Edited once by jeffluo35. Last: 18th Aug 2017
  • QuanTech
    18th Aug 2017 Member 0 Permalink

    @jeffluo35 (View Post)

    Or gdb backtrace

  • jeffluo35
    18th Aug 2017 Member 0 Permalink
    .... have fun with that
  • suibian
    18th Aug 2017 Member 0 Permalink

    @QuanTech (View Post)

     How to download/make gdb backtrace? (for Windows user)

    Edited 2 times by suibian. Last: 18th Aug 2017
  • QuanTech
    18th Aug 2017 Member 0 Permalink

    The program is called gdb. Gdb is a debugger.
    If you have already installed MinGW, I think you should be able to run gdb. I'm not sure though, since I've switched to linux..
    Google is your friend

  • suibian
    18th Aug 2017 Member 0 Permalink

    I have already installed MinGW, but I doesn't have gdb.

    So, probably enter mingw-get install mingw32-gdb

    Edited 2 times by suibian. Last: 18th Aug 2017
  • QuanTech
    18th Aug 2017 Member 0 Permalink

    @suibian (View Post)

    Is there a file named gdb.exe in your C:/MinGW/bin directory? If there isn't, you'll have to download gdb and put it in that directory.

    Edited once by QuanTech. Last: 18th Aug 2017
  • suibian
    18th Aug 2017 Member 0 Permalink

    @QuanTech (View Post)

     How to backtracing TPT? (use gdb backtrace)

    Edited once by suibian. Last: 18th Aug 2017
  • QuanTech
    18th Aug 2017 Member 0 Permalink

    @suibian (View Post)

    First, learn the basic commands. Once you've done that, set a breakpoint on GameView::OnTick, run the program, and when it hits the breakpoint, you can run the backtrace to see which function calls lead up to the current function.
    Also, you must compile TPT with debugging symbols. If you're using scons, that'd be: scons.py --debugging