Small collection of debug-related drop-in c/c++-utils
Switch branches/tags
Nothing to show
Clone or download
wc-duck Lots of fixes to callstack.h/.c on windows
* dynamic loading of dbghelp.dll instead of using dbghelp.lib-link
* library.
* changed search-order of dbghelp.dll to:
  1) same path as .exe
  2) current working dir.
  3) ordinary search-path, i.e. PATH etc.
* Added .exe-directory as seach-path for .pdb-files on top of current
* working dir, _NT_SYMBOL_PATH and _NT_ALTERNATE_SYMBOL_PATH.
* Added environment variable DBGTOOLS_SYMBOL_DEBUG_OUTPUT for debugging
* symbol-issues
Latest commit 88b040a Jun 26, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
include/dbgtools Lots of fixes to callstack.h/.c on windows Jun 26, 2017
src Lots of fixes to callstack.h/.c on windows Jun 26, 2017
test added hw_breakpoint.h Feb 23, 2017
.travis.yml =/ Mar 6, 2017
LICENSE Added LICENSE Jul 27, 2015
README.md updated README with hw_breakpoint Mar 6, 2017
appveyor.yml Update appveyor.yml Sep 5, 2015
bam.lua Lots of fixes to callstack.h/.c on windows Jun 26, 2017

README.md

Build Status Build status

About:

Platform independent wrapping of "nice to have" debug functions.

  • assert.h - implements a replacement for the standard assert() macro supporting callback at assert, and error-message with printf-format.
  • callstack.h - implements capturing of callstack/backtrace + translation of captured symbols into name, file, line and offset.
  • debugger.h - implements debugger_present to check if a debugger is attached to the process.
  • static_assert.h - defines the macro STATIC_ASSERT( condition, message_string ) in an "as good as possible way" depending on compiler features and support. It will try to use builtin support for static_assert and _Static_assert if possible.
  • fpe_ctrl.h - implements platform independent functions to get/set floating point exception and enable trapping of the same exceptions.
  • hw_breakpoint.h - implements platform independent hardware breakpoints.

Design:

The files are designed to be able to be used by them self, only header and src should be needed by the user and all files should work by them self and compile with all common compilers without to many specific fixes.

Notes:

  • MSVC - callstack_symbols() require linking against Dbghelp.lib.
  • GCC/Clang - callstack_symbols() require -rdynamic to be sepcified as link-flag to get valid symbols.

Licence:

dbgtools - platform independent wrapping of "nice to have" debug functions.

version 0.1, october, 2013

Copyright (C) 2013- Fredrik Kihlander

This software is provided 'as-is', without any express or implied
warranty.  In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
   claim that you wrote the original software. If you use this software
   in a product, an acknowledgment in the product documentation would be
   appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
   misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

Fredrik Kihlander