News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

[PATCH] GDB under Linux

Started by HillClimber, January 09, 2007, 03:29:30 AM

Previous topic - Next topic

HillClimber

Hi,

Berlios has locked out my account, and won't re-set it, so I'd appreciate if someone would submit the attached patch for me.

With the stock nightly builds, I was not at all able to use GDB to debug a multi-project application on Linux (Ubuntu/Edgy).  I had to make several fixes to the debuggergdb source to get it to work for me.  I hope the patch is useful.

Here is a list of what I fixed From svn revision 3466:

- Fixed bug which prevented setting breakpoints in sub-projects, by deleting
  code to make file paths relative, as suggested by CB developer.
- Added various comments to document my understanding of what some variables should represent.
- Added ASSERT statement and HasDriver routine to help track down intermittent crash
  due to unsafe use of GetDriver() return value.
- Modified Continue() to use appropriate GDB command (cont, run, or start) depending on program state.
  This allows use of "do not run" configuration feature.
- Fix for (non-)use of m_BreakOnEntry.
- Fixed "Stop" command so it can break the running program

Thanks!

-HC

[attachment deleted by admin]

killerbot

see also here : http://forums.next.codeblocks.org/index.php?topic=4841.msg37904#msg37904

It seems it was not just commenting out the else branch, it ?should? be replaced with 3 other lines of code.

I have no much knowledge on how GDB works, so I can't judge if it is correct or not. Feel free to have a look at the other changes/suggestions made in the other thread.
I feel that with both these changes we might improve the debugging quality of CB ..... NICE :-) :-)

Let's hope Don Corleone finds some time to process the patches.

I will try to register your patch in berlios (first attempt failed, berlios seems to be down again).

Phatency

Quote from: killerbot on January 09, 2007, 07:35:34 AM
I feel that with both these changes we might improve the debugging quality of CB ..... NICE :-) :-)
I've been able to debug ~5% of the time, because usually I'm writing libraries in my multiproject. Those changes would turn it to 100%. Calling that an "might be improvement" sounds a bit belittling to me (you know, debugging is quite annoying feature when you can't actually use it in your environment).

killerbot

#3
patch submitted to berlios (so not yet applied !)

mareq

When will be this patch added to nightly build? I need it, too.

David Perfors

OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

mandrav

Quote from: mareq on January 09, 2007, 10:46:41 AM
When will be this patch added to nightly build? I need it, too.
Quote from: mispunt on January 09, 2007, 10:51:29 AM
tonight

A patch is first reviewed, then applied locally, then tested, then tested again, then tested some more and, if all has gone well, is then committed.
So "tonight" is pretty optimistic considering that my free time is limited these days :(. Unless, of course, if some of the other devs have the time to perform some of the reviewing/testing...
Be patient!
This bug will be fixed soon...

David Perfors

Sorry, I thought it was already submitted to the svn :oops:
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

mareq

So, what is the realistic estimate?

mandrav

Quote from: mareq on January 09, 2007, 12:26:01 PM
So, what is the realistic estimate?

Could be today, could be tomorrow, could be the day after tomorrow. I really can't tell. It depends on the workload. And of course assuming this patch works fine :)
Be patient!
This bug will be fixed soon...

mandrav

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

rjmyst3

[url="http://wxformbuilder.org"]http://wxformbuilder.org[/url]

MortenMacFly

As I was afraid of here:
http://forums.next.codeblocks.org/index.php?topic=4850.msg38322#msg38322
This patch is far from being perfect. I've attached a sample where it still doesn't work. Place a BP in the DLL function (where the comment is) and there will be no break (still because of absolute path I guess).
With regards, Morten.

[attachment deleted by admin]
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]