debug option

  • add -g -O0 when compiling original code:
    • -g produce debug info
    • -O0 optimization option

debug dynamic lib

  • make sure program can be ran ( all env are correctly set)
  • gdb
  • breakpoint //function can be in the lib, e.g. class::func . gdb will ask you "Make breakpoint pending on future shared library load? (y or [n]) " answer y.
  • run // it will stop at the breakpoint.,

-- ChengguangZhu - 07 May 2014

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2014-05-07 - ChengguangZhu
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback