News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Debugger backtrace configurable (bt 30 in debugger.dll)

Started by jvl, September 18, 2013, 12:46:38 PM

Previous topic - Next topic

jvl

Hi

thought to suggest a fix, since I've been hacking this in manually after every install.
The bt 30 command in the debugger.dll, is it or could it be configurable in the Debugger settings?
I usually hex edit it to 99 and mostly works, but could it be useful if it was user configurable?

Options here:
http://sourceware.org/gdb/onlinedocs/gdb/Backtrace.html

Dummy code to test it:

#include <iostream>

using namespace std;

void test( int counter )
{
   int* null = 0;
   int error = 1;
   if( --counter ) test(counter);
   else *null = error;
}

int main()
{
   cout << "Hello world!" << endl;
   test(999);
   return 0;
}


Tested with: CB 12.11 & svn 9295, Win8, MinGW

Best regards,
J

oBFusCATed

#1
Quote from: jvl on September 18, 2013, 12:46:38 PM
I usually hex edit it to 99 and mostly works, but could it be useful if it was user configurable?
Patches welcome...
Probably it should be done in the backtrace dialog, so it is general for all plugins.
But keep in mind that long backtraces slow down the stepping through the code.
So I've thought of adding buttons in the backtrace window for showing the prev and next 30 frames or probably a range.
(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!]

eranon

Hello. Does this has been implemented ? I'm in an OSX porting and I often fall in case where the provided trace is too short to retrieve the origin of a failure in my own code (I only see the imbricated OSX's internal)... So, it would be great to be able to go back deeper on demand.
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

oBFusCATed

You can manually execute bt or bt 100, or even bt -50 in the command's combobox at the bottom of the debugger's log.
(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!]

eranon

Effectively... I didn't noticed this until now ::) Thanks Obfuscated ! I'll use it awaiting an eventual button in the backtrace window (because an IDE is primarily GUI oriented, otherwise we can compile from cmdline, debug from cmdline and edit the code in any text editor) ;)
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]