I have seen additional problems which may or may not be related. I
think that the debug registers are not being cleared during context
switching, or at all for that matter? (I haven't looked into the
kernel code yet)
The following is a reproducable example of what I am talking
about. This is on linux-2.1.111 SMP
-----------------------------
[//loki/src/registry2] gdb test_parser
GNU gdb 4.17
This GDB was configured as "i386-redhat-linux"...
(gdb) b registry_parse_object
Breakpoint 1 at 0x804a5a6: file registry_parser.c, line 118.
(gdb) r
Starting program: /loki/seg_components/src/registry2/test_parser
Breakpoint 1, registry_parse_object (lex=0x804ea28, input=0x804ea60)
at registry_parser.c:118
118 char *name = 0;
(gdb) rwatch lex->tok
Hardware read watchpoint 2: lex->tok
(gdb) c
Continuing.
warning: Hardware watchpoint 2: Could not insert watchpoint
Hardware read watchpoint 2: lex->tok
Value = 0
registry_lex_token (lex=0x804ea28, input=0x804ea60) at registry_lex.c:531
531 return NAME;
(gdb) c
Continuing.
warning: Hardware watchpoint 2: Could not insert watchpoint
Hardware read watchpoint 2: lex->tok
Value = 0
0x804a5c4 in registry_parse_object (lex=0x804ea28, input=0x804ea60)
at registry_parser.c:121
121 if(lex->tok != NAME)
(gdb) q
The program is running. Exit anyway? (y or n) y
[//loki/src/registry2] ./test_parser 11:21AM Wed 29
zsh: 5877 trace trap ./test_parser
[//loki/src/registry2] ./test_parser 11:21AM Wed 29
test: line 2 pos 3: Unexpected 'semicolon', should be a basic type
zsh: 5882 trace trap ./test_parser
Could this extend to other processes as well? I am not really all that
well aware of how hardware breakpoints work on x86 and in the kernel, but
it seems that if the address is marked with a breakpoint and another
process got that address on the next pass? *Shurg*
Benjamin Saller Bender <case@AppliedTheory.com>
AppliedTheory Communications Software Engineering Group
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html