Yes, your concern are correct. 

It seems the way to completely exclude this problem is to revise system call
ptrace to use the same break point allocation mechanism as KDB does. Or use
any common break point allocation routines, if they will be in the future
kernel.

As a temporary method, I suggest to add a switch "kdbhdr" to
"/proc/sys/kernel/". If echo 1 to it, KDB hardware debug feature is enabled,
while 0 means this feature is disabled. The default value should be set to
0.

Is it acceptable?

Thanks.

Sonic Zhang

-----Original Message-----
From: Keith Owens [mailto:[EMAIL PROTECTED]]
Sent: 2003?2?13? 10:20
To: Zhang, Sonic
Cc: KDB (E-mail)
Subject: Re: I fix a bug in kdb-v3.0-2.4.20, which cause the hardware brea
kpoi nts fail to work. 


On Thu, 13 Feb 2003 09:55:45 +0800, 
"Zhang, Sonic" <[EMAIL PROTECTED]> wrote:
>       I don't think the user can't do any debugging on kernels with KDB
>compiled in, because the user can disable KDB by echo "0" to
>"/proc/sys/kernel/kdb". The user can switch between KDB and GDB by a
command
>line. The only problem is that KDB can't work with GDB simultaneously. Does
>any user really want to debug his code with KDB and GDB at one time?

You are forgetting that people want kdb always on to get debugging
information when the machine gets an error like BUG(), panic() or oops.
Manually turning kdb on/off is only useful when you can reproduce a
problem, it is no good for catching intermittent errors.

Reply via email to