Quite offtopic, but who knows much about the internals of how Delphi's debugger is implemented? I was reading these two articles on "hard" vs "soft" debuggers, and I suspect Delphi's is a hybrid.

Quite offtopic, but who knows much about the internals of how Delphi's debugger is implemented? I was reading these two articles on "hard" vs "soft" debuggers, and I suspect Delphi's is a hybrid.

http://blogs.msdn.com/b/matt_pietrek/archive/2005/02/14/372424.aspx (hard vs soft debuggers in Windows 3 (!))
http://blogs.msdn.com/b/jmstall/archive/2004/10/13/241828.aspx (implications of the soft / inprocess debugger in .Net)

I used to think Delphi's debugger was a "hard" one (in modern terms, different to the definitions in the first article), but some time ago, could be years, I noticed there seem to be extra threads in a debugged process which I speculate are used by Delphi for some parts of its debugging - maybe evaluation, etc. I'm sure they never used to be there. So at some point, if this is right and I'm not imagining it, the debugger changed how it worked and/or became a hybrid of the two models. It's sparked my curiosity. Does anyone know more?
http://blogs.msdn.com/b/matt_pietrek/archive/2005/02/14/372424.aspx

Comments

  1. It's neither. Delphi's debugger is a user mode debugger. There are also kernel mode debuggers to debug operating system's drivers for example or applications.

    ReplyDelete
  2. Panagiotis Drivilas But for user mode (I know it can't debug kernel mode) is it using the debug APIs, attached to the process exclusively, etc, or is it using a helper thread injected into the process - or both? I think both and I'm curious why and what the thread does, etc.

    ReplyDelete
  3. David Millington​ Normally it shouldn't create a thread inside the debugged application. The os takes care everything and the os will not create an extra thread, it will be a debug hell if the os did that. Maybe the thread is created by something else like a shell extension, av software, a profiler like AQTime, etc.

    ReplyDelete

Post a Comment