Subject: "target kcore" as a synonym for "target kvm"
To: None <tech-toolchain@netbsd.org>
From: Pavel Cahyna <pavel@netbsd.org>
List: tech-toolchain
Date: 12/10/2006 13:13:28
Hello,

"target kcore" was a well-known and documented gdb command for kernel
debugging. In GDB6 it was replaced by "target kvm". I've made a patch
which adds a "target kcore" compatiblility alias. To be applied under
gnu/dist/gdb6/gdb.

Pavel

*** bsd-kvm.c.~1.3.~	Sun Jul  2 23:04:40 2006
--- bsd-kvm.c	Sun Dec 10 12:45:47 2006
***************
*** 57,62 ****
--- 57,63 ----
  
  /* Target ops for libkvm interface.  */
  static struct target_ops bsd_kvm_ops;
+ static struct target_ops bsd_kcore_ops;
  
  static void
  bsd_kvm_open (char *filename, int from_tty)
***************
*** 327,333 ****
--- 328,340 ----
    bsd_kvm_ops.to_has_registers = 1;
    bsd_kvm_ops.to_magic = OPS_MAGIC;
  
+   bsd_kcore_ops = bsd_kvm_ops;
+   bsd_kcore_ops.to_shortname = "kcore";
+   bsd_kcore_ops.to_longname = _("Kernel memory interface (synonym for kvm)");
+   bsd_kcore_ops.to_doc = _("Synonym for the kvm target");
+   
    add_target (&bsd_kvm_ops);
+   add_target (&bsd_kcore_ops);
    
    add_prefix_cmd ("kvm", class_obscure, bsd_kvm_cmd, _("\
  Generic command for manipulating the kernel memory interface."),