NO

Author Topic: newbie needs a little help about debugger  (Read 11343 times)

tiwag

  • Guest
newbie needs a little help about debugger
« Reply #15 on: July 16, 2005, 11:26:56 am »
Quote from: "Pelle"
Quote from: "tiwag"
@Pelle, what do you think about
I - Back-Trace-Log

Could be useful - but would probably need a lot of work to be fast enough. Maybe need to single-step the processor for this. I have to think some more about this...

surely, if you want to have a backtrace log into all system-dll's or even an assembler-mnemonic-level backtrace like in a real ICE ...

But in most cases it'll be sufficient, to have a function-call backtrace log for your own debug-coded functions and libraries. In this case you only have to maintain a function call table somewhere in the debuggers protected address-space, where one can look after a crash which have been the last called functions before the app crashed.
This system is implemented in a Hitachi SH8 IDDE and works great !
No big overhead, only one extra call inside every function (if it's a debug version), which evaluetes to nothing if compiled as Release.

Quote from: "Pelle"

Quote from: "tiwag"

III - debug-log (user defined debug messages, logged into a file where the time & function name.line# is stamped too )

Well, you can do it "manually". Use OutputDebugString(), and after the debugger is finished, you still have a log in the Debug tab. Use Select all and Copy from the context menu, paste into a source window, and save as a text file. See - that wasn't so difficult...? :-)

Pelle


well you're right, but think of an integrated debug-log where you provide as example the above backtrace-log too. all in one place and you can distribute your source code to other compilers too without have to mess with compiler specific stuff and macros.
Maybe you know the wxwidgets framwork - there the debuglog is a widely accepted and very well working thing for debug versions of an app.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2174
    • http://www.smorgasbordet.com
newbie needs a little help about debugger
« Reply #16 on: July 16, 2005, 06:35:40 pm »
I don't understand.

The debug-log you described before sounds like an application thing - I don't see how it can affect the debugger very much. If it's suppose to be "compiler independent" shouldn't it also be "debugger independent"?

If you want the call tree after a crash, the "Call stack" tab should work. It does here.

Pelle
/Pelle

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1888
newbie needs a little help about debugger
« Reply #17 on: July 19, 2005, 10:26:11 am »
Thank-you very much Pelle. :D
I'aware that the managing of debug is not a simple thing.

Just as a matter of discussion what do you think of a third option on debugging where you introduce some debug control header in the stack frame creation?
The overhead is so limited to the function call and you could update some control data that will help to trace the code. Of course this modify the code lay-out, so maybe a bug present in the release code is not visible in debug mode and the reverse, but in general this help to find out some problems.
I would like to be of some help, but I never worked on this issue. Should I get aware of something interesting I'll advice you.
Thank-you again, and last question when do you think will be the version 4.00 available for Beta test?
F.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2174
    • http://www.smorgasbordet.com
newbie needs a little help about debugger
« Reply #18 on: July 19, 2005, 07:37:44 pm »
Quote from: "frankie"
Just as a matter of discussion what do you think of a third option on debugging where you introduce some debug control header in the stack frame creation?

Depends on what you want to put in this header, or perhaps rather what you are missing at the moment.

Most info I can think of is available already - but without debugging info for Windows modules, for example, it's impossible to trace the stack through Windows. This will sometimes remove info that could otherwise be important...

Quote from: "frankie"

...when do you think will be the version 4.00 available for Beta test?

Not sure. I'm still coding - after that it's the help files, and so on. Several weeks or months, I would guess...

Pelle
/Pelle