Author Topic: Debugging made easier  (Read 7230 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Debugging made easier
« on: August 18, 2010, 05:05:01 pm »
Hi all,

for my own needs I developed a tiny UI for the addr2line tool to analyse crash reports as they are produced by applications like Code::Blocks (using the exchndl.dll). It scans the created report ("*.rpt") and resolves all adresses possible using all crash logs available in this very file (there might be multiple crashes appended after each other). I attach the sources to this post for convenience and probably to help debugging C::B.

Notice: For this to work you'll need to have your application compiled with debug symbols. However, for the case you are running a stripped version, but have the version with debug symbols as reference I allow to replace the path accordingly.

In my case I need to replace "C:\Devel\CodeBlocks\" with "C:\Devel\CodeBlocks\src\devel\", as in the latter there is the compiled version of C::B with debug symbols

It maybe of use for other devs, too.

Note: This is WINDOWS ONLY. Under Linux, the crash log looks different (a XML file) feel free to enhance this as you like, but don't forget to post the modifications here and don't make money out of it... GPL3 you know...! ;-) :lol:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Debugging made easier
« Reply #1 on: August 18, 2010, 05:24:17 pm »
... and don't make money out of it... GPL3 you know...! ;-) :lol:
GPL, do not forbid making money, just forbids binary only distribution! :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Debugging made easier
« Reply #2 on: September 16, 2010, 01:53:53 pm »
This is a very nice tool. (I missed this post, and luckily I find it now :D)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Debugging made easier
« Reply #3 on: September 16, 2010, 06:53:41 pm »
This is a very nice tool. (I missed this post, and luckily I find it now :D)
It has a tiny bug when restoring the settings though... This and That are either not correctly restored or saved (I don't recall ATM...).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: Debugging made easier
« Reply #4 on: September 17, 2010, 07:16:09 am »
Well done!
Thanks for sharing! :D

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: Debugging made easier
« Reply #5 on: September 17, 2010, 03:43:33 pm »
Cool tool. And a real time saver.
Thanks