Daniel Jacobowitz wrote: > > - cris and crisv32 appear to have, from point of view of gdbserver, not > much more in common than cris and mips. How about having > linux-crisv32-low.c instead? There can be additional file for common > code if it becomes necessary in the future. Good idea; I split them up as suggested. >>static CORE_ADDR >>cris_reinsert_addr () >>{ >> unsigned long pc; >> collect_register_by_name ("srp", &pc); >> return pc; >>} > > > I gather that you don't have PTRACE_SINGLESTEP on cris; not even on > crisv32? On CRISv32 I do; thanks for catching this (I removed reinsert_addr for CRISv32). >>#ifdef __arch_v32 >>void >>cris_write_data_breakpoint (int bp, unsigned long start, unsigned long end) >>{ >> switch (bp) >> { >> case 0: >> supply_register_by_name("s3", &start); >> supply_register_by_name("s4", &end); >> break; > > > What to do about the threaded case? GDB is having so much trouble > getting it right that I'd like to make sure gdbserver does from the > start. > > I guess this can be handled completely in the linux-low wrapper > functions by switching the current thread and setting watchpoints for > each. I think that is correct for all Linux targets using hardware > watchpoints, because of the nature of Linux threading. For CRISv32, there might be an additional problem lurking in the shadows: we treat the watchpoint registers as global (i.e., only one process at a time can use them, and thus they are not saved/restored on context switches etc). Anyway, is this something you want resolved before I commit the CRIS/CRISv32 support? (Here's an updated ChangeLog entry and updated patches if not.) 2005-02-01 Orjan Friberg * linux-cris-low.c: New file with support for CRIS. * linux-crisv32-low.c: Ditto for CRISv32. * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c. (clean): Add reg-cris.c and reg-crisv32.c. Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c, reg-crisv32.o, and reg-crisv32.c to make rules. * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of recognized targets. -- Orjan Friberg Axis Communications