debuggers (Steve Simmons)
Thu, 11 Nov 1993 14:02:34 GMT

          From comp.compilers

Related articles
[3 earlier articles]
Re: Debuggers decvax!decwrl!mips!himel (1987-03-23)
Debuggers (1991-08-08)
Re: How long does it take to build a compiler? (1993-11-10)
Re: debuggers (1993-11-11)
Re: debuggers (1993-11-11)
Re: debuggers (1993-11-11)
debuggers (1993-11-11)
Re: debuggers (1993-11-11)
Re: debuggers sean@PICARD.TAMU.EDU (1993-11-12)
Re: debuggers (1993-11-14)
Re: debuggers (1993-11-15)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Steve Simmons)
Keywords: debug
Organization: Engineering, CONVEX Computer Corp., Richardson, Tx., USA
References: 93-11-062
Date: Thu, 11 Nov 1993 14:02:34 GMT (Bill Maniatty) writes:
>One beef that I have with most debuggers I use (gdb, sdb, dbx, ...) is
>that on most workstations under unix, the debuggers do NOT use hardware
>defined break points, so that I cannot set watch on a data location.

The problem lies not in the hardware but in the OS's. When you write-lock
a page in VM, any system call that tries to update this page will fault.

In VMS, this would cause a system panic. Therefore, the VMS debugger
would copy the system service vector (the common point of entry into the
kernel) and replace it with one that jumped into the debugger code. The
debugger would then unlock all write locked pages and flip a bit on the
PSW. The debugger would then invoke the respective system service. The
debugger would come back in on an exception when the system service was
complete because of that PSW bit. This bit would cause a fault on return
from the service call because the PSW would be illegal, ROPERAND fault.
The debugger would then come back and check to see if any of the watched
locations had changed. If so, it would break then. If not, the debugger
would write lock the respective pages again. (PHEW!!!).

Other debuggers use a signal stepping technique if there is no OS support.
One benefit of this approach is that it better supports optimized code
paradigms. For example, if I is replaced with an induction variable and
the user wishes to watch I, then there is a need to single step until
either I or the respective induction variable changes.

Thank you.

Steve Simmons

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.