Print this page
9210 remove KMDB branch debugging support
9211 ::crregs could do with cr2/cr3 support
9209 ::ttrace should be able to filter by thread
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Yuri Pankov <yuripv@yuripv.net>


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.


  24  */
  25 
  26 #pragma ident   "%Z%%M% %I%     %E% SMI"
  27 
  28 /*
  29  * Libkvm Kernel Target SPARC v9 component
  30  *
  31  * This file provides the ISA-dependent portion of the libkvm kernel target.
  32  * For more details on the implementation refer to mdb_kvm.c.  The SPARC v9
  33  * ISA code is actually compiled into *both* the sparcv7 and sparcv9 MDB
  34  * binaries because we need to deal with the sparcv9 CPU registers when
  35  * debugging a 32-bit crash dump from a kernel running on a sparcv9 CPU.
  36  */
  37 
  38 #ifndef __sparcv9cpu
  39 #define __sparcv9cpu
  40 #endif
  41 
  42 #include <sys/types.h>
  43 #include <sys/machtypes.h>
  44 #include <sys/regset.h>
  45 #include <sys/frame.h>
  46 #include <sys/stack.h>
  47 #include <sys/sysmacros.h>


 200         kt_pread,                               /* t_pread */
 201         kt_pwrite,                              /* t_pwrite */
 202         kt_fread,                               /* t_fread */
 203         kt_fwrite,                              /* t_fwrite */
 204         (ssize_t (*)()) mdb_tgt_notsup,         /* t_ioread */
 205         (ssize_t (*)()) mdb_tgt_notsup,         /* t_iowrite */
 206         kt_vtop,                                /* t_vtop */
 207         kt_lookup_by_name,                      /* t_lookup_by_name */
 208         kt_lookup_by_addr,                      /* t_lookup_by_addr */
 209         kt_symbol_iter,                         /* t_symbol_iter */
 210         kt_mapping_iter,                        /* t_mapping_iter */
 211         kt_object_iter,                         /* t_object_iter */
 212         kt_addr_to_map,                         /* t_addr_to_map */
 213         kt_name_to_map,                         /* t_name_to_map */
 214         kt_addr_to_ctf,                         /* t_addr_to_ctf */
 215         kt_name_to_ctf,                         /* t_name_to_ctf */
 216         kt_status,                              /* t_status */
 217         (int (*)()) mdb_tgt_notsup,             /* t_run */
 218         (int (*)()) mdb_tgt_notsup,             /* t_step */
 219         (int (*)()) mdb_tgt_notsup,             /* t_step_out */
 220         (int (*)()) mdb_tgt_notsup,             /* t_step_branch */
 221         (int (*)()) mdb_tgt_notsup,             /* t_next */
 222         (int (*)()) mdb_tgt_notsup,             /* t_cont */
 223         (int (*)()) mdb_tgt_notsup,             /* t_signal */
 224         (int (*)()) mdb_tgt_null,               /* t_add_vbrkpt */
 225         (int (*)()) mdb_tgt_null,               /* t_add_sbrkpt */
 226         (int (*)()) mdb_tgt_null,               /* t_add_pwapt */
 227         (int (*)()) mdb_tgt_null,               /* t_add_iowapt */
 228         (int (*)()) mdb_tgt_null,               /* t_add_vwapt */
 229         (int (*)()) mdb_tgt_null,               /* t_add_sysenter */
 230         (int (*)()) mdb_tgt_null,               /* t_add_sysexit */
 231         (int (*)()) mdb_tgt_null,               /* t_add_signal */
 232         (int (*)()) mdb_tgt_null,               /* t_add_fault */
 233         kt_getareg,                             /* t_getareg */
 234         kt_putareg,                             /* t_putareg */
 235         mdb_kvm_v9stack_iter,                   /* t_stack_iter */
 236         (int (*)()) mdb_tgt_notsup              /* t_auxv */
 237 };
 238 
 239 void
 240 kt_sparcv9_init(mdb_tgt_t *t)




   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  *
  25  * Copyright 2018 Joyent, Inc.
  26  */
  27 


  28 /*
  29  * Libkvm Kernel Target SPARC v9 component
  30  *
  31  * This file provides the ISA-dependent portion of the libkvm kernel target.
  32  * For more details on the implementation refer to mdb_kvm.c.  The SPARC v9
  33  * ISA code is actually compiled into *both* the sparcv7 and sparcv9 MDB
  34  * binaries because we need to deal with the sparcv9 CPU registers when
  35  * debugging a 32-bit crash dump from a kernel running on a sparcv9 CPU.
  36  */
  37 
  38 #ifndef __sparcv9cpu
  39 #define __sparcv9cpu
  40 #endif
  41 
  42 #include <sys/types.h>
  43 #include <sys/machtypes.h>
  44 #include <sys/regset.h>
  45 #include <sys/frame.h>
  46 #include <sys/stack.h>
  47 #include <sys/sysmacros.h>


 200         kt_pread,                               /* t_pread */
 201         kt_pwrite,                              /* t_pwrite */
 202         kt_fread,                               /* t_fread */
 203         kt_fwrite,                              /* t_fwrite */
 204         (ssize_t (*)()) mdb_tgt_notsup,         /* t_ioread */
 205         (ssize_t (*)()) mdb_tgt_notsup,         /* t_iowrite */
 206         kt_vtop,                                /* t_vtop */
 207         kt_lookup_by_name,                      /* t_lookup_by_name */
 208         kt_lookup_by_addr,                      /* t_lookup_by_addr */
 209         kt_symbol_iter,                         /* t_symbol_iter */
 210         kt_mapping_iter,                        /* t_mapping_iter */
 211         kt_object_iter,                         /* t_object_iter */
 212         kt_addr_to_map,                         /* t_addr_to_map */
 213         kt_name_to_map,                         /* t_name_to_map */
 214         kt_addr_to_ctf,                         /* t_addr_to_ctf */
 215         kt_name_to_ctf,                         /* t_name_to_ctf */
 216         kt_status,                              /* t_status */
 217         (int (*)()) mdb_tgt_notsup,             /* t_run */
 218         (int (*)()) mdb_tgt_notsup,             /* t_step */
 219         (int (*)()) mdb_tgt_notsup,             /* t_step_out */

 220         (int (*)()) mdb_tgt_notsup,             /* t_next */
 221         (int (*)()) mdb_tgt_notsup,             /* t_cont */
 222         (int (*)()) mdb_tgt_notsup,             /* t_signal */
 223         (int (*)()) mdb_tgt_null,               /* t_add_vbrkpt */
 224         (int (*)()) mdb_tgt_null,               /* t_add_sbrkpt */
 225         (int (*)()) mdb_tgt_null,               /* t_add_pwapt */
 226         (int (*)()) mdb_tgt_null,               /* t_add_iowapt */
 227         (int (*)()) mdb_tgt_null,               /* t_add_vwapt */
 228         (int (*)()) mdb_tgt_null,               /* t_add_sysenter */
 229         (int (*)()) mdb_tgt_null,               /* t_add_sysexit */
 230         (int (*)()) mdb_tgt_null,               /* t_add_signal */
 231         (int (*)()) mdb_tgt_null,               /* t_add_fault */
 232         kt_getareg,                             /* t_getareg */
 233         kt_putareg,                             /* t_putareg */
 234         mdb_kvm_v9stack_iter,                   /* t_stack_iter */
 235         (int (*)()) mdb_tgt_notsup              /* t_auxv */
 236 };
 237 
 238 void
 239 kt_sparcv9_init(mdb_tgt_t *t)