• 音乐
  • 收藏
  • 博友
  • 关于我
  •  
     
     
     
     

    日志

     
     

    GDB on Windows  

    2010-01-21 11:35:12|  分类: linux_soft |  标签: |字号 订阅

    GDB on Windows

    From OHRRPGCE-

    Jump to: navigation, search
    This article does not meet the standard of quality we would like to have. Feel free to revise it and make it better by using the edit link at the top of the page. This tag should be removed when an editor feels it is of high quality.

    The reason this article has been marked is: needs information about how to use TMC's gdb scripts, otherwize it isn't really possible to get a useful stack trace

    GDB is the GNU Debugger. It can be used to get information about crashes, including backtraces, which can be very helpful to the programmers when you report bugs.

    Contents

    [hide]

    [edit] getting a debug build of the OHRRPGCE

    The latest debug build of the OHRRPGCE is available here: ohrrpgce-wip-fb-sdl-debug.zip. It runs a bit slower than the regular build, but when used together with gdb, it can provide useful information about crashes.

    [edit] Installing gdb

    If you are using Linux, you probably already have gdb, but if you are using Windows, you will need to install it.

    MinGW distributes a Windows version of gdb. You can get the latest gdb installer here

    Then run the installer, and it will install gdb.

    [edit] Starting gdb

    gdb will not show up in your start menu. It is a command-line program. From a command-line prompt, you can type:

    c:\mingw\bin\gdb.exe game.exe 

    Or you can create a batch file with the same command in it.

    [edit] Using gdb

    To start playing your game, type run

    If your game crashes, type backtrace to get useful information that you can can paste into a bug report

    When finished, type quit

    Type help for a list of the many other commands.

    [edit] Error Messages

    If gdb says:

    No executable specified, use `target exec'. 

    That means it wasn't able to find your copy of game.exe. This might mean that you need to put the full-path in your batch file, like this:

    c:\mingw\bin\gdb.exe c:\ohrrpgce\game.exe 

    or maybe

    c:\mingw\bin\gdb.exe "c:\Documents and Settings\My User Name\Desktop\OHRRPGCE\game.exe" 

    You can also just type something like at the (gdb) prompt:

    target exec c:\ohrrpgce\game.exe 

    [edit] See Also

      评论这张
    转发至微博
    转发至微博
    0   分享到:        
    阅读(391)| 评论(0)| 引用 (0) |举报
     

    历史上的今天

    相关文章

    最近读者

    评论

    <#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录-->