The Illumos Modular Debugger Guide Sun Microsystems, Inc

Total Page:16

File Type:pdf, Size:1020Kb

The Illumos Modular Debugger Guide Sun Microsystems, Inc The illumos Modular Debugger Guide Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more U.S. patents or pending patent applications in the U.S. and in other countries. U.S. Government Rights – Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. This distribution may include materials developed by third parties. Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. Sun, Sun Microsystems, the Sun logo, the Solaris logo, the Java Coffee Cup logo, docs.sun.com, Java, and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. or its subsidiaries in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. The OPEN LOOK and Sun™ Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun’s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements. Products covered by and information contained in this publication are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical or biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited. DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTA- TIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. Copyright © 2008 Sun Microsystems, Inc. Copyright © 2016 Joyent, Inc. Contents Contents i List of Figures vi List of Tables vi 1 Modular Debugger Overview1 1.1 Introduction . .1 1.2 MDB Features . .1 1.3 Using MDB . .2 1.4 Future Enhancements . .3 2 Debugger Concepts5 2.1 Building Blocks . .5 2.2 Modularity . .6 3 MDB Language Syntax9 3.1 Syntax . .9 3.2 Commands . 10 3.3 Comments . 11 3.4 Arithmetic Expansion . 11 Unary Operators . 12 Binary Operators . 12 3.5 Quoting . 13 3.6 Shell Escapes . 13 3.7 Variables . 13 3.8 Symbol Name Resolution . 14 3.9 Dcmd and Walker Name Resolution . 15 3.10 Dcmd Pipelines . 16 3.11 Formatting Dcmds . 16 4 Using MDB Commands Interactively 21 4.1 Command Reentry . 21 4.2 Inline Editing . 21 4.3 Keyboard Shortcuts . 23 4.4 Output Pager . 23 4.5 Signal Handling . 23 5 Built-In Commands 25 i CONTENTS 5.1 Built-In dcmds . 25 6 Execution Control 39 6.1 Execution Control . 39 6.2 Event Callbacks . 40 6.3 Thread Support . 40 6.4 Built-in dcmds . 41 6.5 Interaction With exec .................................... 46 6.6 Interaction with Job Control . 46 6.7 Process Attach and Release . 46 7 Kernel Execution Control 49 7.1 Booting, Loading, and Unloading . 49 7.2 Terminal Handling . 50 7.3 Debugger Entry . 51 7.4 Processor-Specific Features . 51 8 Kernel Debugging Modules 53 8.1 Generic Kernel Debugging Support (genunix)...................... 53 Kernel Memory Allocator . 53 dcmds . 53 Walkers . 55 File Systems . 56 dcmds . 56 Walkers . 57 Virtual Memory . 57 dcmds . 57 Walkers . 58 CPUs and the Dispatcher . 58 dcmds . 58 Walkers . 58 Device Drivers and DDI Framework . 59 dcmds . 59 Walkers . 60 STREAMS . 60 dcmds . 60 Walkers . 61 Networking . 62 dcmds . 62 Walkers . 63 Files, Processes, and Threads . 63 dcmds . 63 Walkers . 65 Synchronization Primitives . 65 dcmds . 65 Walkers . 65 Cyclics . 66 dcmds . 66 Walkers . 66 ii Contents Task Queues . 66 dcmds . 66 Walkers . 67 Error Queues . 67 dcmds . 67 Walkers . 67 Configuration . 67 dcmds . 67 8.2 Interprocess Communication Debugging Support (ipc).................. 67 dcmds . 68 Walkers . ..
Recommended publications
  • Oracle Solaris Administration IP Services
    Oracle® Solaris Administration: IP Services Part No: 821–1453–11 March 2012 Copyright © 1999, 2012, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT END USERS. Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including anyoperating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government. This software or hardware is developed for general use in a variety of information management applications.
    [Show full text]
  • Wdd-Ebook.Pdf
    The illumos Writing Device Drivers Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more U.S. patents or pending patent applications in the U.S. and in other countries. U.S. Government Rights – Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. This distribution may include materials developed by third parties. Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. Sun, Sun Microsystems, the Sun logo, the Solaris logo, the Java Coffee Cup logo, docs.sun.com, Java, and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. or its subsidiaries in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. The OPEN LOOK and Sun™ Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun’s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements.
    [Show full text]
  • Oracle Solaris 11 Express What's
    ORACLE SOLARIS 11 EXPRESS 2010.11 | WHAT’S NEW ORACLE SOLARIS 11 EXPRESS 2010.11 WHAT’S NEW Oracle Solaris is the industry leading operating system for the enterprise. Oracle Solaris 11 Express 2010.11 raises the bar on the innovation introduced in Oracle Solaris 10, with a unique feature set NEW FEATURE HIGHLIGHTS that few other operating systems can offer. Oracle Solaris 11 Express 2010.11 has been tested and • Oracle Solaris 10 Zones for business optimized for Oracle hardware and software, and is an integral part of Oracle's combined hardware investment protection and software portfolio. • Built-in network virtualization and resource Oracle Solaris 11 Express 2010.11 provides customers with the latest access to Oracle Solaris 11 management for enhanced server workload technology, allowing developers, architects and administrators to test and deploy within an consolidation enterprise environments and greatly simplify their day to day operations. Oracle Solaris 11 Express 2010.11 has the reliability, availability, and serviceability that you'd expect from a leading • Greatly reduced planned and unplanned downtime with new package management tools enterprise operating system. with safe system upgrade With new features such as network based package management tools to greatly decrease planned • New optimizations and features designed to system downtime and provide for a completely safe system upgrade, built-in network virtualization deliver proven scalability and reliability as an and resource control management for an unprecedented level of flexibility for application integrated component of Oracle's Exadata and consolidation, and on-disk ZFS encryption to provide the highest levels of security in your data Exalogic systems center, Oracle Solaris 11 Express 2010.11 is the most exciting release of the Oracle Solaris platform to date.
    [Show full text]
  • April 2006 Volume 31 Number 2
    APRIL 2006 VOLUME 31 NUMBER 2 THE USENIX MAGAZINE OPINION Musings RIK FARROW OpenSolaris:The Model TOM HAYNES PROGRAMMING Code Testing and Its Role in Teaching BRIAN KERNIGHAN Modular System Programming in MINIX 3 JORRIT N. HERDER, HERBERT BOS, BEN GRAS, PHILIP HOMBURG, AND ANDREW S. TANENBAUM Some Types of Memory Are More Equal Than Others DIOMEDIS SPINELLIS Simple Software Flow Analysis Using GNU Cflow CHAOS GOLUBITSKY Why You Should Use Ruby LU KE KANIES SYSADMIN Unwanted HTTP:Who Has the Time? DAVI D MALONE Auditing Superuser Usage RANDOLPH LANGLEY C OLUMNS Practical Perl Tools:Programming, Ho Hum DAVID BLANK-EDELMAN VoIP Watch HEISON CHAK /dev/random ROBERT G. FERRELL STANDARDS USENIX Standards Activities NICHOLAS M. STOUGHTON B O OK REVIEWS Book Reviews ELIZABETH ZWICKY, WITH SAM STOVER AND RI K FARROW USENIX NOTES Letter to the Editor TED DOLOTTA Fund to Establish the John Lions Chair C ONFERENCES LISA ’05:The 19th Large Installation System Administration Conference WORLDS ’05: Second Workshop on Real, Large Distributed Systems FAST ’05: 4th USENIX Conference on File and Storage Technologies The Advanced Computing Systems Association Upcoming Events 3RD SYMPOSIUM ON NETWORKED SYSTEMS 2ND STEPS TO REDUCING UNWANTED TRAFFIC ON DESIGN AND IMPLEMENTATION (NSDI ’06) THE INTERNET WORKSHOP (SRUTI ’06) Sponsored by USENIX, in cooperation with ACM SIGCOMM JULY 6–7, 2006, SAN JOSE, CA, USA and ACM SIGOPS http://www.usenix.org/sruti06 MAY 8–10, 2006, SAN JOSE, CA, USA Paper submissions due: April 20, 2006 http://www.usenix.org/nsdi06 2006
    [Show full text]
  • Oracle Solaris 11.2
    ® Transitioning From Oracle Solaris 10 to Oracle Solaris 11.2 Part No: E39134-03 December 2014 Copyright © 2011, 2014, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT END USERS. Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.
    [Show full text]
  • Managing Network Datalinks in Oracle® Solaris 11.4
    ® Managing Network Datalinks in Oracle Solaris 11.4 Part No: E60990 November 2020 Managing Network Datalinks in Oracle Solaris 11.4 Part No: E60990 Copyright © 2011, 2020, Oracle and/or its affiliates. License Restrictions Warranty/Consequential Damages Disclaimer This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. Warranty Disclaimer The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. Restricted Rights Notice If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software"
    [Show full text]
  • Oracle Solaris Trusted Extensions Administrator's Procedures Guide Provides Procedures for Configuring Trusted Extensions on the Solaris Operating System
    Oracle® SolarisTrusted Extensions Administrator's Procedures Part No: 819–0872–17 August 2011 Copyright © 1992, 2011, Oracle and/or its affiliates. All rights reserved. License Restrictions Warranty/Consequential Damages Disclaimer This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. Warranty Disclaimer The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. Restricted Rights Notice If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract,and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007).
    [Show full text]
  • Administering TCP/IP Networks, IPMP, and IP Tunnels in Oracle Solaris 11.3 Part No: E54741 Copyright © 2011, 2019, Oracle And/Or Its Affiliates
    Administering TCP/IP Networks, IPMP, ® and IP Tunnels in Oracle Solaris 11.3 Part No: E54741 March 2019 Administering TCP/IP Networks, IPMP, and IP Tunnels in Oracle Solaris 11.3 Part No: E54741 Copyright © 2011, 2019, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs.
    [Show full text]
  • DS2OS - Deliverable B Operating System Technologies
    Consiglio Nazionale delle Ricerche Istituto di Calcolo e Reti ad Alte Prestazioni DS2OS - Deliverable B Operating System Technologies Giovanni Schmid, Alessandra Rossi RT-ICAR-NA-2010-03 Dicembre 2010 Consiglio Nazionale delle Ricerche, Istituto di Calcolo e Reti ad Alte Prestazioni (ICAR) – Sede di Napoli, Via P. Castellino 111, I-80131 Napoli, Tel: +39-0816139508, Fax: +39- 0816139531, e-mail: [email protected], URL: www.na.icar.cnr.it 1 Consiglio Nazionale delle Ricerche Istituto di Calcolo e Reti ad Alte Prestazioni DS2OS - Deliverable B Operating System Technologies Giovanni Schmid1, Alessandra Rossi Rapporto Tecnico N.: Data: RT-ICAR-NA-2010-03 Dicembre 2010 1 Istituto di Calcolo e Reti ad Alte Prestazioni, ICAR-CNR, Sede di Napoli, Via P. Castellino 111, 80131 Napoli I rapporti tecnici dell’ICAR-CNR sono pubblicati dall’Istituto di Calcolo e Reti ad Alte Prestazioni del Consiglio Nazionale delle Ricerche. Tali rapporti, approntati sotto l’esclusiva responsabilità scientifica degli autori, descrivono attività di ricerca del personale e dei collaboratori dell’ICAR, in alcuni casi in un formato preliminare prima della pubblicazione definitiva in altra sede. 2 DS2OS - Deliverable B Operating System Technologies Giovanni Schmid, Alessandra Rossi December 1, 2010 1 Introduction The Distributed Security-Oriented Operating Systems (DS2OS) Project aims to integrate Dynamic Delegation facilities into open-source operating systems technologies, in order to obtain the building blocks of fully scalable and interoperable distributed environments. Dynamic Delegation (DD) is an access control facility which allows users or applications on a given host to grant specific authorizations to remote principals about resources they own as a result of their accounting profiles on such host.
    [Show full text]
  • Getting to Know the Solaris Iscsi Stack Ryan Matteson [email protected] Presentation Overview
    Getting to know the Solaris iSCSI stack Ryan Matteson [email protected] http://prefetch.net Presentation overview • Tonight we are going to cover the iSCSI protocol, and how to use the iSCSI stack that comes with Solaris • I plan to split my 60-minutes into two parts. The first part will provide an overview of the protocol, and the second half will show how to use the Solaris initiator and target What is iSCSI? • iSCSI is a protocol that allows SCSI commands to be transmitted over a TCP/IP network • The protocol was published in draft form by the IETF in 2001, and has since been ratified and documented in RFC 3720 Why should I consider using iSCSI? • Reduce costs – iSCSI uses TCP/IP, so low cost Ethernet adaptors are all that are required to utilize the protocol (no need to buy expensive FC HBAs) – Ethernet switches can be used for both storage and public network traffic (this reduces the need to buy expensive fibre channel switches) • Existing tools (e.g., wireshark, snoop) can be used to debug storage problems (who has the money for fibre channel analyzers?!?) • Existing IP management and monitoring frameworks can be used with iSCSI networks Does Solaris support iSCSI? • It sure does!!!!! • Solaris 10 GA shipped with an iSCSI initiator that has been certified by a number of tier one storage vendors (and it has been improved in subsequent Solaris 10 updates) • Nevada (the development build leading up to the next version of Solaris) contains an iSCSI target, which will be available in the next Solaris 10 update (7/07?) • An iSNS server
    [Show full text]
  • Oracle Solaris 11 ISV Adoption Guide Oracle Solaris 11 Express ISV Adoption Guide
    An Oracle White Paper May 2012 Oracle Solaris 11 ISV Adoption Guide Oracle Solaris 11 Express ISV Adoption Guide Executive Overview............................................................................ 1 Introduction......................................................................................... 2 Recommended Strategy..................................................................... 3 Oracle Solaris Binary Guarantee........................................................3 Oracle Solaris Zone Support...............................................................4 • Features with High Impact to ISVs..................................................... 6 • Features with Medium Impact to ISVs................................................ 7 • Features with Limited or No Impact on ISVs......................................8 • Creating and installing an Oracle Solaris 10 Zone on Oracle Solaris 11 based on an Existing Oracle Solaris 10 System or Flash Archive Image............................. 10 • Creating an Oracle Solaris 10 Zone in Oracle Solaris 11 based on a Single Oracle Solaris 10 Native Zone............................................. 12 • Creating an Oracle Solaris 10 Zone on Oracle Solaris 11 based on an System with Oracle Solaris 10 Native Zone (P2V and V2V)..........12 • Compatibility Issues That Could Prevent an Application from Running in a Oracle Solaris Zone................................................................... 12 • Reduced Process Privileges............................................................
    [Show full text]
  • Oracle Solaris Administration Oracle Solaris Zones Oracle Solaris 10
    Oracle® Solaris Administration: Oracle Solaris Zones, Oracle Solaris 10 Zones, and Resource Management Part No: 821–1460–12 March 2012 Copyright © 2004, 2012, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS. Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms setforth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007).
    [Show full text]