lkml.org 
[lkml]   [2008]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateTue, 12 Feb 2008 18:10:28 +0100
FromAndi Kleen <>
SubjectRe: [git pull] kgdb-light -v10
> It is more than a simple recursion check (which is already in the code)
> because there are some conditions we can recover from. I'd rather not
> crash the system out if it can be recovered.

Ok I'm trying to understand the code as you describe it. As far
as I can see (in kgdb-light-v10) it is:

+ addr = kgdb_arch_pc(ks->ex_vector, ks->linux_regs);
+ kgdb_deactivate_sw_breakpoints();
+
+ /*
+ * If the break point removed ok at the place exception
+ * occurred, try to recover and print a warning to the end
+ * user because the user planted a breakpoint in a place that
+ * KGDB needs in order to function.
+ */
+ if (kgdb_remove_sw_break(addr) == 0) {
and

+static int kgdb_remove_sw_break(unsigned long addr)
+{
+ int i;
+
+ for (i = 0; i < KGDB_MAX_BREAKPOINTS; i++) {
+ if ((kgdb_break[i].state == BP_SET) &&
+ (kgdb_break[i].bpt_addr == addr)) {
+ kgdb_break[i].state = BP_REMOVED;
+ return 0;
+ }
+ }
+ return -ENOENT;
correct?

I don't think that code does what you describe at all. Are you
sure we're talking about the same thing?

There is certainly no real protection against break points in
debugger code in there as far as I can see (except for the reentry
counter)

-Andi


\
 
 \ /
  Last update: 2008-02-12 17:37    [from the cache]
©2003-2010