smphdr patch does two things AFAICS: - s/kdb_bp_*_local/kdb_bp_*_dbreg and s/kdb_bp_*_global/kdb_bp_*_dbinst
- keep the state of debug registers per-cpu, so that you could implement per-cpu breakpoints, as probably intended in bph and bpha commands. I think these patches are okay, but unrelated to my patch. Regarding the smphdr patches, in my opinion, they are not really needed.. I don't see how cpu-local breakpoints are useful.. how can one tell on which particular CPU alone a given piece of code executes. Sonic Zhang, can you please explain why this is needed and correct me if I am wrong about the smphdr patch. BTW: my patch is useful to detect and handle conditions in which multiple cpus hit breakpoints at about the same time, one of them wins the race to enter into kdb, and at the kdb prompt, the user removes all breakpoints.. so we won't be able to find KDB breakpoints on other cpus when they eventually enter KDB thereby causing unhandled trap3/trap1 in kernel -> oops. My patch is needed for both instruction-replacement breakpoints and debug-reg assisted breakpoints. I will post an updated patch. Thanks, Vamsi. On Tue, Apr 01, 2003 at 09:47:02AM +0800, Zhang, Sonic wrote: > Hi, > > The "smphdr" patch only deal with the hardware breakpoints. It doesn't affect > the logic of "int3" instruction breakpoint in the formal KDB patch. So if this > problem occurs in the formal KDB patch, it is very possible that it still exists > after applying the "smphdr" patch. > > Thanks. > > Sonic Zhang > > > -----Original Message----- > From: Keith Owens [mailto:[EMAIL PROTECTED] > Sent: 2003?3?31? 19:02 > To: [EMAIL PROTECTED] > Cc: Hua Qin; [EMAIL PROTECTED] > Subject: Re: [PATCH] kdb on SMP (breakpoint hits multiple cpus simultaneously) > > > On Mon, 31 Mar 2003 15:40:16 +0530, > "Vamsi Krishna S ." <[EMAIL PROTECTED]> wrote: > >Here is a simple way to handle this situation. Before deciding that > >this trap is not due to one of KDB's breakpoints, check if this > >is a breakpoint that was recently removed. > > Sonic Zhang has cleaned up the breakpoint handling. I am waiting for > feedback on these patches before including them in kdb. > ftp://oss.sgi.com/projects/kdb/download/v4.0/kdb-smphdr-v4.0-2.4.20* > -- Vamsi Krishna S. Linux Technology Center, IBM Software Lab, Bangalore. Ph: +91 80 5044959 Internet: [EMAIL PROTECTED]
