Author Topic: Debugger backtrace configurable (bt 30 in debugger.dll)  (Read 7665 times)

jvl

  • Guest
Debugger backtrace configurable (bt 30 in debugger.dll)
« on: September 18, 2013, 12:46:38 pm »
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:
Code
#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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13338
    • Travis build status
Re: Debugger backtrace configurable (bt 30 in debugger.dll)
« Reply #1 on: September 18, 2013, 01:09:01 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.
« Last Edit: September 18, 2013, 01:10:36 pm by oBFusCATed »
(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 eranon

  • Almost regular
  • **
  • Posts: 180
Re: Debugger backtrace configurable (bt 30 in debugger.dll)
« Reply #2 on: November 01, 2013, 07:35:03 pm »
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"]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13338
    • Travis build status
Re: Debugger backtrace configurable (bt 30 in debugger.dll)
« Reply #3 on: November 02, 2013, 12:21:37 am »
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!]

Offline eranon

  • Almost regular
  • **
  • Posts: 180
Re: Debugger backtrace configurable (bt 30 in debugger.dll)
« Reply #4 on: November 02, 2013, 12:40:38 am »
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"]