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 Intel 32-bit 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.
  33  */
  34 
  35 #include <sys/types.h>
  36 #include <sys/regset.h>
  37 #include <sys/frame.h>
  38 #include <sys/stack.h>
  39 #include <sys/sysmacros.h>
  40 #include <sys/panic.h>
  41 #include <strings.h>
  42 
  43 #include <mdb/mdb_target_impl.h>
  44 #include <mdb/mdb_disasm.h>
  45 #include <mdb/mdb_modapi.h>
  46 #include <mdb/mdb_conf.h>
  47 #include <mdb/mdb_kreg_impl.h>


 121         kt_pread,                               /* t_pread */
 122         kt_pwrite,                              /* t_pwrite */
 123         kt_fread,                               /* t_fread */
 124         kt_fwrite,                              /* t_fwrite */
 125         (ssize_t (*)()) mdb_tgt_notsup,         /* t_ioread */
 126         (ssize_t (*)()) mdb_tgt_notsup,         /* t_iowrite */
 127         kt_vtop,                                /* t_vtop */
 128         kt_lookup_by_name,                      /* t_lookup_by_name */
 129         kt_lookup_by_addr,                      /* t_lookup_by_addr */
 130         kt_symbol_iter,                         /* t_symbol_iter */
 131         kt_mapping_iter,                        /* t_mapping_iter */
 132         kt_object_iter,                         /* t_object_iter */
 133         kt_addr_to_map,                         /* t_addr_to_map */
 134         kt_name_to_map,                         /* t_name_to_map */
 135         kt_addr_to_ctf,                         /* t_addr_to_ctf */
 136         kt_name_to_ctf,                         /* t_name_to_ctf */
 137         kt_status,                              /* t_status */
 138         (int (*)()) mdb_tgt_notsup,             /* t_run */
 139         (int (*)()) mdb_tgt_notsup,             /* t_step */
 140         (int (*)()) mdb_tgt_notsup,             /* t_step_out */
 141         (int (*)()) mdb_tgt_notsup,             /* t_step_branch */
 142         (int (*)()) mdb_tgt_notsup,             /* t_next */
 143         (int (*)()) mdb_tgt_notsup,             /* t_cont */
 144         (int (*)()) mdb_tgt_notsup,             /* t_signal */
 145         (int (*)()) mdb_tgt_null,               /* t_add_vbrkpt */
 146         (int (*)()) mdb_tgt_null,               /* t_add_sbrkpt */
 147         (int (*)()) mdb_tgt_null,               /* t_add_pwapt */
 148         (int (*)()) mdb_tgt_null,               /* t_add_vwapt */
 149         (int (*)()) mdb_tgt_null,               /* t_add_iowapt */
 150         (int (*)()) mdb_tgt_null,               /* t_add_sysenter */
 151         (int (*)()) mdb_tgt_null,               /* t_add_sysexit */
 152         (int (*)()) mdb_tgt_null,               /* t_add_signal */
 153         (int (*)()) mdb_tgt_null,               /* t_add_fault */
 154         kt_getareg,                             /* t_getareg */
 155         kt_putareg,                             /* t_putareg */
 156         mdb_ia32_kvm_stack_iter,                /* t_stack_iter */
 157         (int (*)()) mdb_tgt_notsup              /* t_auxv */
 158 };
 159 
 160 void
 161 kt_regs_to_kregs(struct regs *regs, mdb_tgt_gregset_t *gregs)




   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 Intel 32-bit 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.
  33  */
  34 
  35 #include <sys/types.h>
  36 #include <sys/regset.h>
  37 #include <sys/frame.h>
  38 #include <sys/stack.h>
  39 #include <sys/sysmacros.h>
  40 #include <sys/panic.h>
  41 #include <strings.h>
  42 
  43 #include <mdb/mdb_target_impl.h>
  44 #include <mdb/mdb_disasm.h>
  45 #include <mdb/mdb_modapi.h>
  46 #include <mdb/mdb_conf.h>
  47 #include <mdb/mdb_kreg_impl.h>


 121         kt_pread,                               /* t_pread */
 122         kt_pwrite,                              /* t_pwrite */
 123         kt_fread,                               /* t_fread */
 124         kt_fwrite,                              /* t_fwrite */
 125         (ssize_t (*)()) mdb_tgt_notsup,         /* t_ioread */
 126         (ssize_t (*)()) mdb_tgt_notsup,         /* t_iowrite */
 127         kt_vtop,                                /* t_vtop */
 128         kt_lookup_by_name,                      /* t_lookup_by_name */
 129         kt_lookup_by_addr,                      /* t_lookup_by_addr */
 130         kt_symbol_iter,                         /* t_symbol_iter */
 131         kt_mapping_iter,                        /* t_mapping_iter */
 132         kt_object_iter,                         /* t_object_iter */
 133         kt_addr_to_map,                         /* t_addr_to_map */
 134         kt_name_to_map,                         /* t_name_to_map */
 135         kt_addr_to_ctf,                         /* t_addr_to_ctf */
 136         kt_name_to_ctf,                         /* t_name_to_ctf */
 137         kt_status,                              /* t_status */
 138         (int (*)()) mdb_tgt_notsup,             /* t_run */
 139         (int (*)()) mdb_tgt_notsup,             /* t_step */
 140         (int (*)()) mdb_tgt_notsup,             /* t_step_out */

 141         (int (*)()) mdb_tgt_notsup,             /* t_next */
 142         (int (*)()) mdb_tgt_notsup,             /* t_cont */
 143         (int (*)()) mdb_tgt_notsup,             /* t_signal */
 144         (int (*)()) mdb_tgt_null,               /* t_add_vbrkpt */
 145         (int (*)()) mdb_tgt_null,               /* t_add_sbrkpt */
 146         (int (*)()) mdb_tgt_null,               /* t_add_pwapt */
 147         (int (*)()) mdb_tgt_null,               /* t_add_vwapt */
 148         (int (*)()) mdb_tgt_null,               /* t_add_iowapt */
 149         (int (*)()) mdb_tgt_null,               /* t_add_sysenter */
 150         (int (*)()) mdb_tgt_null,               /* t_add_sysexit */
 151         (int (*)()) mdb_tgt_null,               /* t_add_signal */
 152         (int (*)()) mdb_tgt_null,               /* t_add_fault */
 153         kt_getareg,                             /* t_getareg */
 154         kt_putareg,                             /* t_putareg */
 155         mdb_ia32_kvm_stack_iter,                /* t_stack_iter */
 156         (int (*)()) mdb_tgt_notsup              /* t_auxv */
 157 };
 158 
 159 void
 160 kt_regs_to_kregs(struct regs *regs, mdb_tgt_gregset_t *gregs)