Author Topic: Profiler/Debugger for mingw?  (Read 10665 times)

Offline darklordsatan

  • Almost regular
  • **
  • Posts: 132
    • http://eviltrend.sf.net
Profiler/Debugger for mingw?
« on: July 15, 2005, 09:09:18 am »
I think the title says it all...
For many years, Ive overcome the need to use a profiler and a debugger, now Im thinking on using some...

Do you guys know of a good profiler (and free), and from what I know, a profiler can either be used stand-alone or inside an IDE, so I hear for suggestions... in any case, it must work for mingw (and terrific it could be used inside c::b but I guess this would require a plugin)

And a good debugger (with GUI)? I know you can use gbd with code::blocks, but isnt it like a console app or something? I want some graphical interface (Ive heard there is Insight, but dont think it works with c::b, does it?). In any case it should be free, and work with gcc/mingw, and plus if it can work inside c::b

Any thoughts, suggestions? Am I dreaming (yeah, its 2:00 am so probably I am)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Profiler/Debugger for mingw?
« Reply #1 on: July 15, 2005, 09:30:01 am »
Quote
Do you guys know of a good profiler (and free), and from what I know, a profiler can either be used stand-alone or inside an IDE, so I hear for suggestions... in any case, it must work for mingw (and terrific it could be used inside c::b but I guess this would require a plugin)

gprof.
It's included with mingw. A gprof plugin for C::B is already requested but you can still use it without it.
1) In your project build options, check "Profile code when executed"
2) Re-compile your project
3) Run your project and work with it for a while
4) When you exit your project, a file called gmon.out will be created in the same dir
5) Open a command-line in that dir and run "gprof {your.exe} gmon.out > gprof.txt"
6) Open gprof.txt with a text editor like notepad and look what your bottlenecks are :)
7) Rinse and repeat until all bottlenecks have been identified and removed ;)

Quote
And a good debugger (with GUI)? I know you can use gbd with code::blocks, but isnt it like a console app or something? I want some graphical interface (Ive heard there is Insight, but dont think it works with c::b, does it?). In any case it should be free, and work with gcc/mingw, and plus if it can work inside c::b

I don't get it. Yes, gdb is a command-line app but C::B hides this fact and you operate gdb with the help of C::B (graphical).
Either you have to restate your question or you 're missing something essential about debuggers and debugging...

Yiannis.
Be patient!
This bug will be fixed soon...

Offline darklordsatan

  • Almost regular
  • **
  • Posts: 132
    • http://eviltrend.sf.net
Profiler/Debugger for mingw?
« Reply #2 on: July 15, 2005, 09:48:33 am »
Ok, about the profiler, thats nice, thanks...

On the debugger, bare with me, this is new ground, now I get it: it hides the fact its a command line app by providing a menu and stuff (breakpoints), ok... Probably Im just used to the fact people asked around the devcpp forums for insight or something like that, but it would only crash devcpp and thats why you should stick to gdb only in devcpp...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Profiler/Debugger for mingw?
« Reply #3 on: July 15, 2005, 10:13:21 am »
Not to be misunderstood about the debugger:
I 'm not stating that C::B exploits the debugger's capabilites to any extent (maybe 0.00001%). It just allows you to use the most usual commands (like setting breakpoints, stepping, continuing, watching vars, disassembly, backtrace, etc) of gdb.
Consider it an on-going work in progress ;)

Yiannis.
Be patient!
This bug will be fixed soon...

Offline darklordsatan

  • Almost regular
  • **
  • Posts: 132
    • http://eviltrend.sf.net
Profiler/Debugger for mingw?
« Reply #4 on: July 15, 2005, 10:19:59 am »
Ok.
About the gprof plugin, is anyone working on it? what should it do for a start? maybe making what you mentioned in the command line by means of a dialog or something?

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Profiler/Debugger for mingw?
« Reply #5 on: July 15, 2005, 10:36:58 am »
Learning to use GDB from commandline is a little adventure. The best GUI I've seen for it is DDD, but it only works on *nix and Cygwin under Windows (and requires you to have X for Cygwin too).

There's a quick reference guide here

There's also a quick "guide" to use gprof in Pixelate oriented to Allegro.

Offline darklordsatan

  • Almost regular
  • **
  • Posts: 132
    • http://eviltrend.sf.net
Profiler/Debugger for mingw?
« Reply #6 on: July 15, 2005, 10:50:57 am »
Thanks, will take a look!
BTW, dont you sleep? :lol:

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Profiler/Debugger for mingw?
« Reply #7 on: July 15, 2005, 10:55:36 am »
Quote from: darklordsatan
BTW, dont you sleep?


Who? Me? Heh, it seems like I'mn't the only one.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Profiler/Debugger for mingw?
« Reply #8 on: July 15, 2005, 11:49:20 am »
Quote from: darklordsatan
Ok.
About the gprof plugin, is anyone working on it? what should it do for a start? maybe making what you mentioned in the command line by means of a dialog or something?

A gprof plugin will need to do two things:
1) Convert gmon.out to grpof.txt, using the command line a gave you above
2) Parse and display gprof.txt in a nice window with sorting, searching, maybe show graphs, etc ;)

Yiannis.
Be patient!
This bug will be fixed soon...

Offline darklordsatan

  • Almost regular
  • **
  • Posts: 132
    • http://eviltrend.sf.net
Profiler/Debugger for mingw?
« Reply #9 on: July 15, 2005, 12:09:03 pm »
Ill do it if you want me to (i.e neither you or rickg22 are working on it right now...)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Profiler/Debugger for mingw?
« Reply #10 on: July 15, 2005, 12:34:24 pm »
Quote from: darklordsatan
Ill do it if you want me to (i.e neither you or rickg22 are working on it right now...)

Sure :)
Start working on it and ask for help any time you need it.
Tip: for launching the external command, check sdk/pipedprocess.h

Yiannis.
Be patient!
This bug will be fixed soon...

Offline darklordsatan

  • Almost regular
  • **
  • Posts: 132
    • http://eviltrend.sf.net
Profiler/Debugger for mingw?
« Reply #11 on: July 15, 2005, 12:44:36 pm »
Ok, then its done. Ill try to start coding ASAP, and thanks for the tip

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Profiler/Debugger for mingw?
« Reply #12 on: July 15, 2005, 05:51:16 pm »
OK. Just give us your real name when you finish it so we can give you credit for it :)