GDB doesn't work currently. This is especially visible on EV6,
though faulty behaviour can be seen on previous chips as well.
Some typical failure modes:
---- try 1
(gdb) b main
Breakpoint 1 at 0x120000498: file zz.c, line 56.
(gdb) run
Starting program: /home/rth/./a.out
Program received signal SIGTRAP, Trace/breakpoint trap.
0x2000000752c in dl_main (phdr=0x0, phent=0, user_entry=0x0) at rtld.c:1053
1053 rtld.c: No such file or directory.
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
dl_main (phdr=0x0, phent=0, user_entry=0x0) at rtld.c:1058
1058 in rtld.c
---- try 2
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/rth/./a.out
Breakpoint 1, main () at zz.c:56
56 for (i = 0; i < 5; ++i) {
(gdb) n
*hang*
---- try 3
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/rth/./a.out
Program received signal SIGTRAP, Trace/breakpoint trap.
0x20000010cac in _dl_init_next (searchlist=0x2000001e358) at dl-init.c:79
79 dl-init.c: No such file or directory.
(gdb) c
Continuing.
Breakpoint 1, main () at zz.c:56
56 for (i = 0; i < 5; ++i) {
(gdb) n
57 before = get_cycles();
(gdb)
58 eat(andrea(make()));
(gdb)
Program received signal SIGTRAP, Trace/breakpoint trap.
0x120000664 in make () at zz.c:5
5 {
----The solution, of course, is to flush the icache by some method. In this case, by making use of the icache asn tags.
The flush_icache_page hook is used by more than ptrace. The uses in do_swap_page and do_no_page probably don't need this, but I can't be sure. I think the reason we havn't seen anything in this area is that flush_tlb_range also allocates a new asn, and swapping doesn't change the end-result contents of the virtual page for any one process.
r~
This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:26 EST