On Wed, 26 Jun 2002, at 8:05am, Tom Rauschenbach wrote:
>> You know, of course, that most debuggers allow you to catch reads and
>> writes to a certain memory location already, right?
> 
> Sure, but they usually do it by inserting an illegal instruction at the
> beginning of each statement boundary ... hardware support for debuggers
> would be hard to beat.

  People make such a huge deal about something being implemented in
"hardware" vs "software".  In most cases, the only difference between them
is that hardware is harder to change.  Sure, implementation details often
mean specialized hardware is faster than code running on a general-purpose
processor, but that is an effect of the specific design, not a law of
nature.  Code running on a special-purpose processor can be quite fast, and
logic built from general-purpose gate arrays has a much lower "speed limit"  
(compared to integrated ASICs).

  Hardware implementation has a cost, too.  You complain that debuggers use
special instructions or more memory to do what they do.  What do you think
the hardware is going to do?  For breakpoints, the hardware would have to
keep track of your breakpoint list, and check every instruction as it runs.  
That would actually be *slower* than simply inserting a new instruction in
the code.  Ditto for a memory "watch" location.  Similarly, implementing
memory protection for individual program variables would incur a huge memory
and processor overhead -- just like ElectricFence.

  That is why there is interest in making page tables larger in the first
place -- the overhead of keeping track of all those comparatively tiny four
kilobyte pages in a machine with gigabytes of memory can be *huge*.

  As usual, There Ain't No Such Thing As A Free Lunch.  :-)

-- 
Ben Scott <[EMAIL PROTECTED]>
| The opinions expressed in this message are those of the author and do not |
| necessarily represent the views or policy of any other person, entity or  |
| organization.  All information is provided without warranty of any kind.  |


*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************

Reply via email to