pax_global_header00006660000000000000000000000064135736503010014515gustar00rootroot0000000000000052 comment=a1c28262e48607368a209be0f04b0f5b10bdb8ca zshdb-1.1.2/000077500000000000000000000000001357365030100126305ustar00rootroot00000000000000zshdb-1.1.2/.circleci/000077500000000000000000000000001357365030100144635ustar00rootroot00000000000000zshdb-1.1.2/.circleci/config.yml000066400000000000000000000107131357365030100164550ustar00rootroot00000000000000# This configuration was automatically generated from a CircleCI 1.0 config. # It should include any build commands you had along with commands that CircleCI # inferred from your project structure. We strongly recommend you read all the # comments in this file to understand the structure of CircleCI 2.0, as the idiom # for configuration has changed substantially in 2.0 to allow arbitrary jobs rather # than the prescribed lifecycle of 1.0. In general, we recommend using this generated # configuration as a reference rather than using it in production, though in most # cases it should duplicate the execution of your original 1.0 config. version: 2 jobs: build: working_directory: ~/rocky/zshdb parallelism: 1 shell: /bin/bash --login # CircleCI 2.0 does not support environment variables that refer to each other the same way as 1.0 did. # If any of these refer to each other, rewrite them so that they don't or see https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables . environment: CIRCLE_ARTIFACTS: /tmp/circleci-artifacts CIRCLE_TEST_REPORTS: /tmp/circleci-test-results # In CircleCI 1.0 we used a pre-configured image with a large number of languages and other packages. # In CircleCI 2.0 you can now specify your own image, or use one of our pre-configured images. # The following configuration line tells CircleCI to use the specified docker image as the runtime environment for you job. # We have selected a pre-built image that mirrors the build environment we use on # the 1.0 platform, but we recommend you choose an image more tailored to the needs # of each job. For more information on choosing an image (or alternatively using a # VM instead of a container) see https://circleci.com/docs/2.0/executor-types/ # To see the list of pre-built images that CircleCI provides for most common languages see # https://circleci.com/docs/2.0/circleci-images/ docker: - image: circleci/buildpack-deps:disco steps: # Machine Setup # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each # The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out. - checkout # Prepare for artifact and test results collection equivalent to how it was done on 1.0. # In many cases you can simplify this from what is generated here. # 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/' - run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS # Checkout # This would typically go in either a build or a build-and-test job when using workflows # This is based on your 1.0 configuration file or project settings - run: sudo apt-get -y install zsh python-pygments - run: sh ./autogen.sh # Dependencies # This would typically go in either a build or a build-and-test job when using workflows # Restore the dependency cache - restore_cache: keys: # This branch if available - v2-dependencies-{{ .Branch }}- # Default branch if not - v2-dependencies-master- # Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly - v2-dependencies- # Save dependency cache - save_cache: key: v2-dependencies-{{ .Branch }}-{{ epoch }} paths: # This is a broad list of cache paths to include many possible development environments # You can probably delete some of these entries - vendor/bundle - ~/virtualenvs - ~/.m2 - ~/.ivy2 - ~/.bundle - ~/.go_workspace - ~/.gradle - ~/.cache/bower # Test # This would typically be a build job when using workflows, possibly combined with build # This is based on your 1.0 configuration file or project settings - run: CIRCLECI=1 make check # Teardown # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each # Save test results - store_test_results: path: /tmp/circleci-test-results # Save artifacts - store_artifacts: path: /tmp/circleci-artifacts - store_artifacts: path: /tmp/circleci-test-results zshdb-1.1.2/.gitignore000066400000000000000000000004241357365030100146200ustar00rootroot00000000000000/*.tar.bz2 /*.tar.gz /*~ /.python-version /Makefile /Makefile /Makefile.in /aclocal.m4 /autom4te.cache /bug /config.log /config.status /configure /dbg-trace.sh /dist /install-sh /missing /test/*/*.log /test/*/*.trs /test/integration/*.log /tmp /zshdb /zshdb-1* INSTALL README zshdb-1.1.2/.travis.yml000066400000000000000000000004701357365030100147420ustar00rootroot00000000000000dist: bionic install: # Install zsh. - "sudo apt-get install zsh" addons: artifacts: working_dir: /home/circleci/rocky/zshdb/test paths: - $(du -a /home/circleci/rocky/zshdb/test | grep log$ | cut -f 2 | tr "\n" ":") debug: true # run the tests script: zsh ./autogen.sh && make check zshdb-1.1.2/AUTHORS000066400000000000000000000002661357365030100137040ustar00rootroot00000000000000R. Bernstein (rocky@gnu.org) Kate Ward is the author of shunit2 used in unit testing Stéphane Chazelas is the author of getopts_long.sh for GNU long options processing zshdb-1.1.2/COPYING000066400000000000000000001045131357365030100136670ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . zshdb-1.1.2/ChangeLog000066400000000000000000004171061357365030100144130ustar00rootroot000000000000002019-12-05 rocky * .travis.yml: Travis CI artifact upload try 4 2019-12-05 rocky * .travis.yml: Travis CI artifact upload try 3 2019-12-05 rocky * .travis.yml, command/show_sub/prompt.sh: Add missing show prompt subcmd... and Travis CI 2nd attempt to get artifacts 2019-12-05 rocky * .travis.yml, command/show.sh: add "dir" to show list and ... attempt to get Travis to upload artifacts 2019-12-05 rocky * command/show.sh, lib/term-highlight.py, test/data/setshow-5.4.1.right: Get all Pygments style a user has installed not just builtins ... Patch is due to John Purnell (in bashdb). Also, "help show" now includes "prompt". 2019-11-28 rocky * ChangeLog, test/unit/test-fns.sh.in: Another Ddg -> Dbg typo 2019-11-28 R. Bernstein * : Merge pull request #22 from MenkeTechnologies/master ddg to dbg typo fix 2019-11-17 rocky * ChangeLog, docs/commands/set/trace-commands.rst, docs/commands/show/trace-commands.rst: More RST doc typos 2019-11-17 rocky * ChangeLog, docs/commands/set.rst, docs/commands/show/trace-commands.rst: More RsT link corrections 2019-11-17 rocky * ChangeLog, docs/commands/set/different.rst, docs/commands/show/trace-commands.rst: RsT link typos 2019-11-17 rocky * NEWS.md: Update news for release 2019-11-17 rocky * ChangeLog, docs/commands/set/different.rst, docs/commands/set/trace-commands.rst: Small doc changes 2019-11-17 rocky * ChangeLog, admin/how-to-make-a-release.md, command/show_sub/different.sh, command/show_sub/linetrace.sh, configure.ac, docs/commands/set.rst, docs/commands/set/linetrace.rst, docs/commands/set/{cmdtrace.rst => trace-commands.rst}, docs/commands/show.rst, docs/commands/show/linetrace.rst, docs/commands/show/{cmdtrace.rst => trace-commands.rst}, test/data/delete.right, test/data/next.right, test/data/setshow-5.4.1.right, test/data/skip.right, test/data/step.right: Get ready for release 1.1.1 2019-11-16 rocky * command/set.sh, command/set_sub/autolist.sh, command/show.sh, command/show_sub/autoeval.sh, command/show_sub/autolist.sh, command/show_sub/basename.sh, command/show_sub/listsize.sh, command/show_sub/width.sh, test/data/setshow-5.4.1.right: Fill out show commands more: add autoeval, autolist listsize, width 2019-11-15 rocky * command/show.sh, lib/help.sh, lib/setshow.sh, test/data/action.right, test/data/delete.right, test/data/export-5.4.1.right, test/data/list.right, test/data/next.right, test/data/setshow-5.4.1.right, test/data/skip.right, test/data/step.right, test/data/subshell-5.4.1.right: DRY show a little... this time, for sure! 2019-11-15 rocky * command/show_sub/copying.sh, command/show_sub/debug.sh, command/show_sub/highlight.sh, command/show_sub/history.sh, lib/help.sh, test/data/setshow-5.4.1.right: More "help show" fixes/improvements 2019-11-14 rocky * command/show.sh, lib/help.sh, test/data/action.right, test/data/delete.right, test/data/export-5.4.1.right, test/data/list.right, test/data/next.right, test/data/setshow-5.4.1.right, test/data/skip.right, test/data/step.right, test/data/subshell-5.4.1.right: Simplify and regularize help set/show... sync with kshdb 2019-11-14 rocky * command/set_sub/confirm.sh, command/show_sub/alias.sh, command/show_sub/basename.sh, command/show_sub/commands.sh, command/show_sub/confirm.sh, command/show_sub/copying.sh, command/show_sub/debug.sh, command/show_sub/editing.sh, command/show_sub/highlight.sh, command/show_sub/history.sh, command/show_sub/style.sh, command/show_sub/warranty.sh, dbg-opts.sh, lib/help.sh, lib/msg.sh: Add set/show confirm... Go over "show" rSt formatting 2019-11-11 rocky * README.md: Small doc tweak 2019-11-08 rocky * test/example/bug-args.sh: Remove a derived file 2019-11-08 rocky * docs/install.rst, test/example/bug-args.sh: Small typo 2019-11-08 rocky * ChangeLog, zterm-background.sh: Silence "stty echo" failures 2019-11-07 rocky * ChangeLog, test/data/Makefile.am: Add debug test file 2019-11-07 rocky * : commit b474867da814037b7b2a56827d6267ea3b2bf38c Author: rocky Date: Thu Nov 7 17:14:23 2019 -0500 2019-11-07 rocky * docs/commands/running/kill.rst, test/integration/test-file-with-spaces: Doc tweak 2019-11-06 rocky * : commit 073f1d8109dffd2ce3dc4978f1a9bb6484475589 Author: rocky Date: Wed Nov 6 12:46:43 2019 -0500 2019-11-06 rocky * command/kill.sh, docs/commands/running/kill.rst, lib/hook.sh, lib/msg.sh: Add ! suffix to "kill" command. 2019-11-06 rocky * command/debug.sh: cut-n-paste typo 2019-11-06 rocky * command/debug.sh, docs/commands/running/debug.rst: debug doc tweak 2019-11-06 rocky * docs/commands/running.rst, docs/commands/running/debug.rst: Tweaks to "debug" doc 2019-11-06 rocky * command/continue.sh, command/debug.sh, docs/commands/running.rst, docs/commands/running/continue.rst, docs/commands/running/debug.rst: Doc "debug" and go over docs. 2019-11-06 rocky * configure.ac, dbg-trace.sh.in, lib/hook.sh, test/data/bug-args.cmd, test/data/bug-args.right, test/example/bug-args.sh, test/example/bug-args.sh.in, test/zsh/ok4zshdb.sh, zshdb.in: track $0 changes in debugged code... bump minimum version of zshdb to a version that doesn't have memory problems when $0 is changed. 2019-11-05 rocky * .travis.yml: I said, use *bionic* 2019-11-05 rocky * .travis.yml, command/eval.sh: Travis zenial zsh has problems... try bionic instead 2019-11-05 rocky * command/eval.sh, command/shell.sh, lib/set-d-vars.sh, test/data/action.cmd, test/data/action.right, test/data/frame.right, zshdb.in: Fix setting $0 ... inside "eval" and "shell" commands 2019-11-05 rocky * command/set_sub/different.sh, command/skip.sh, docs/commands/running/skip.rst: Small doc tweaks 2019-11-03 rocky * admin/how-to-make-a-release.md, command/backtrace.sh: Small doc typo 2019-10-31 rocky * command/set_sub/style.sh, command/show.sh, command/skip.sh, lib/filecache.sh: Some small typos and tweaks 2019-10-27 rocky * test/integration/test-skip.in: Travis is giving us problesm.... silence travis. 2019-10-27 rocky * ChangeLog, test/zsh/ok4zshdb.sh: Show zsh versiosn in configure 2019-10-27 rocky * ChangeLog, NEWS.md, admin/how-to-make-a-release.md, configure.ac, test/data/Makefile.am, test/example/Makefile.am: Get ready for release 1.1.0 2019-10-26 rocky * .gitignore, .travis.yml, docs/commands/running/skip.rst: Imporve "skip" doc artifact logging; more ignore 2019-10-26 rocky * .travis.yml: Save travis artifacts 2019-10-26 rocky * command/skip.sh, command/stepping.sh, configure.ac, docs/commands/running/skip.rst, lib/hook.sh, test/data/skip.cmd, test/data/skip.right, test/data/step.cmd, test/data/step.right, test/example/.gitignore, test/example/Makefile.am, test/example/skip.sh.in, test/integration/test-skip.in: Allow **count** to "skip" command... Some minor doc fixes 2019-10-25 rocky * command/skip.sh, docs/commands/running.rst, docs/commands/running/skip.rst, test/data/skip.cmd, test/data/skip.right: Doc skip command 2019-10-25 R. Bernstein * : Merge pull request #21 from rocky/add-skip-command Add "skip" command 2019-10-24 rocky * command/debug.sh, lib/term-highlight.py: Add "debug" command ... term-highlight.py: Remove stray schmutz from beginning of file 2019-10-19 rocky * command/eval.sh: Typo. 2019-10-10 rocky * lib/term-highlight.py: Keep up with pygmentize... Use default TERMINAL_COLORS. It's simpler. 2019-10-08 rocky * test/integration/README.md: Spelling errors 2019-10-08 rocky * ChangeLog, lib/hist.sh, test/integration/.gitignore: Small changes 2019-10-08 rocky * configure.ac, test/integration/.gitignore, test/integration/Makefile.am, test/integration/README.md, test/integration/test-file-with-spaces, test/integration/test-file-with-spaces.in, test/unit/Makefile.am: Start guide on writing tests... and some administrivia. 2019-09-27 rocky * configure.ac, test/integration/.gitignore, test/integration/Makefile.am, test/integration/{test-bug-delete => test-bug-delete.in}: Convert test-bug-delete to auto-generation. Fixes #18 2019-09-22 rocky * command/eval.sh, command/examine.sh, command/kill.sh, command/quit.sh, command/run.sh, command/set_sub/annotate.sh, command/set_sub/args.sh, command/set_sub/autoeval.sh, command/show_sub/annotate.sh, docs/commands/data/eval.rst, docs/commands/data/examine.rst, docs/commands/running.rst, docs/commands/running/continue.rst, docs/commands/running/exit.rst, docs/commands/running/kill.rst, docs/commands/running/quit.rst, docs/commands/running/restart.rst, docs/commands/running/run.rst, docs/commands/running/skip.rst, docs/commands/set.rst, docs/commands/set/annotate.rst, docs/commands/set/args.rst, docs/commands/set/autoeval.rst, docs/commands/set/basename.rst, docs/commands/set/cmdtrace.rst, docs/commands/set/confirm.rst, docs/commands/set/different.rst, docs/commands/set/editing.rst, docs/commands/set/highlight.rst, docs/commands/set/listsize.rst, docs/commands/set/maxstring.rst, docs/commands/set/skip.rst, docs/commands/set/style.rst, docs/commands/set/trace.rst, docs/commands/set/width.rst, docs/commands/show.rst, docs/commands/show/aliases.rst, docs/commands/show/annotate.rst, docs/commands/show/args.rst, docs/commands/show/autoeval.rst, docs/commands/show/basename.rst, docs/commands/show/cmdtrace.rst, docs/commands/show/confirm.rst, docs/commands/show/different.rst, docs/commands/show/editing.rst, docs/commands/show/highlight.rst, docs/commands/show/listsize.rst, docs/commands/show/maxstring.rst, docs/commands/show/skip.rst, docs/commands/show/style.rst, docs/commands/show/trace.rst, docs/commands/show/width.rst, docs/commands/support/help.rst, docs/conf.py: Go over docs, yet again. 2019-09-22 R. Bernstein * README.md: Update README.md 2019-09-22 R. Bernstein * README.md: Update README.md 2019-09-21 rocky * README.md: Add repology badges 2019-09-19 rocky * command/info_sub/breakpoints.sh, command/info_sub/line.sh, command/info_sub/program.sh, command/info_sub/source.sh, docs/commands/info.rst, docs/commands/info/breakpoints.rst, docs/commands/info/line.rst, docs/commands/info/program.rst, docs/commands/info/source.rst, docs/commands/info/stack.rst: Docs yet again. 2019-09-19 rocky * doc/toRsT.py, docs/commands/info.rst, docs/commands/info/{break.rst => breakpoints.rst}: More doc stuff 2019-09-18 rocky * docs/commands/info.rst, docs/commands/set.rst, docs/commands/show.rst: More doc stuff 2019-09-17 rocky * command/set_sub/editing.sh, docs/commands/set.rst, docs/commands/set/annotate.rst, docs/commands/set/editing.rst, docs/commands/set/events.rst, docs/commands/set/flush.rst, docs/commands/set/substitute.rst, docs/commands/show.rst, docs/commands/show/annotate.rst, docs/commands/show/editing.rst, docs/features.rst, docs/index.rst, docs/manpage.rst: Update zshdb doc yet again 2019-09-16 rocky * test/integration/test-setshow.in: skip setshow on Travis 2019-09-16 rocky * command/show.sh, command/show_sub/annotate.sh, command/show_sub/basename.sh, docs/commands/set/annotate.rst, docs/commands/show.rst, docs/commands/show/annotate.rst, docs/commands/show/autoeval.rst, docs/manpage.rst, test/data/action.right, test/data/next.right, test/data/setshow-5.4.1.right: Go over docs.. zshdb manual show annotate, basename and show in general 2019-09-11 rocky * command/load.sh: Doc for load improvement 2019-09-11 rocky * docs/commands/data.rst, docs/commands/data/load.rst, docs/commands/info/display.rst: More small RsT doc fixes 2019-09-11 rocky * command/info_sub/files.sh, command/load.sh, docs/commands/data/display.rst, docs/commands/data/load.rst, docs/commands/data/undisplay.rst, docs/commands/info/display.rst, docs/commands/info/files.rst: Add "load" command 2019-09-11 rocky * docs/commands/data/display.rst: Rst typo 2019-09-11 rocky * : commit ce73940bb86175637cd8b65ed5a61c10d29efacc Author: rocky Date: Wed Sep 11 15:24:15 2019 -0400 2019-09-11 rocky * command/info_sub/display.sh, command/info_sub/signals.sh, docs/commands/info.rst, docs/commands/info/display.rst, lib/sig.sh: Add routine to show signal handlers; update docs 2019-09-11 rocky * docs/commands/info.rst: Add link in doc to "info variables" 2019-09-11 rocky * README.md, docs/commands/info/variables.rst, docs/index.rst: More doc updates 2019-09-11 rocky * docs/index.rst, docs/install.md, docs/install.rst: Convert install to RST 2019-09-10 rocky * test/integration/test-bugIFS.in, test/integration/test-bugIFS2.in: TravisCI take 4 2019-09-10 rocky * test/integration/test-bugIFS.in, test/integration/test-bugIFS2.in: TravisCI take 3 2019-09-10 rocky * test/unit/test-save-restore.sh.in: Travis test 2 2019-09-10 rocky * test/unit/test-save-restore.sh.in: See if this addresses TravisCI 2019-09-10 rocky * configure.ac, lib/hist.sh, lib/save-restore.sh, test/data/bugIFS2.cmd, test/data/bugIFS2.right, test/example/bugIFS2.sh, test/integration/.gitignore, test/integration/Makefile.am, test/integration/test-bugIFS2.in: Fixes #7 2019-09-10 rocky * .circleci/config.yml: Try upding circleci dependencies 2019-09-10 rocky * ChangeLog: Update ChangeLog 2019-09-10 rocky * NEWS.md, test/integration/test-enable.in: Get ready for release 1.0.1 2019-09-10 rocky * configure.ac: NEWS->NEWS.md problem 2019-09-10 rocky * .travis.yml, ChangeLog, admin/how-to-make-a-release.md: Now it is Travis acting up 2019-09-10 rocky * ChangeLog, Makefile.am, NEWS, configure.ac: Get ready for release ZSHDB_VERSION 2019-09-10 rocky * .circleci/config.yml: CircleCI try 2 2019-09-10 rocky * .circleci/config.yml, .gitignore: CircleCI Try 1 - use ubuntu disco 2019-09-10 rocky * : commit 1615809238e8a992128c50558d011d49929b7c69 Author: rocky Date: Tue Sep 10 04:33:51 2019 -0400 2018-10-27 rocky * ChangeLog: Update Changelog 2018-10-27 rocky * ChangeLog, NEWS, admin/how-to-make-a-release.md, configure.ac: Get ready for release 1.0.0 2018-10-19 rocky * lib/processor.sh: Untabify 2018-10-12 R. Bernstein * : Merge pull request #17 from rocky/rogalmic-safe-changes Minor safe changes. 2018-10-07 rocky * lib/tty.sh: Minor space strip change 2018-09-30 rocky * dbg-opts.sh, lib/hook.sh: More rogalmic changes 2018-09-30 rocky * command/action.sh, command/break.sh, command/eval.sh, command/set.sh, dbg-opts.sh, lib/hook.sh, lib/processor.sh, test/Makefile.am, test/data/lopts.right: rogalmic's bashdb patches applied to zshdb Tolerance for path names with embedded blanks. Adds --tty_in --terminal_in 2018-06-26 rocky * circle.yml: Remove CircleCI 1.1 2018-06-26 rocky * command/kill.sh, command/quit.sh: Small RsT doc changes on some commands 2018-06-25 rocky * .circleci/config.yml, admin/how-to-make-a-release.md, command/frame.sh, command/shell.sh: Some typos and try CircleCI 2.0 2018-04-15 rocky * lib/gdb.sh: Bump copyright 2018-04-15 rocky * .gitignore, command/backtrace.sh, lib/gdb.sh: backtrace with more features... Allow negative count. Option -s or --source show source-code line in backtrace 2018-04-13 rocky * test/README.md: Add most rudimentary README.md for tests 2017-12-22 rocky * docs/conf.py: Typo 2017-10-02 rocky * docs/conf.py: Go over conf 2017-09-30 rocky * docs/index.rst: Doc correction 2017-09-30 rocky * docs/commands/data/eval.rst, docs/features.rst: More doc tweaks 2017-09-30 rocky * docs/features.rst, docs/index.rst: overview->features 2017-09-30 rocky * docs/index.rst: overview -> features 2017-09-30 rocky * docs/index.rst, docs/overview.rst: Revise readthedocs index page 2017-09-29 rocky * docs/commands/show/aliases.rst, docs/commands/show/args.rst, docs/commands/show/autoeval.rst, docs/commands/show/autolist.rst, docs/commands/show/basename.rst, docs/commands/show/cmdtrace.rst, docs/commands/show/confirm.rst, docs/commands/show/different.rst, docs/commands/show/highlight.rst, docs/commands/show/listsize.rst, docs/commands/show/maxstring.rst, docs/commands/show/skip.rst, docs/commands/show/style.rst, docs/commands/show/trace.rst, docs/commands/show/width.rst: Last of subindexed command doc 2017-09-29 rocky * docs/commands/set/autoeval.rst, docs/commands/set/autolist.rst, docs/commands/set/basename.rst, docs/commands/set/cmdtrace.rst, docs/commands/set/confirm.rst, docs/commands/set/different.rst, docs/commands/set/events.rst, docs/commands/set/flush.rst, docs/commands/set/highlight.rst, docs/commands/set/listsize.rst, docs/commands/set/maxstring.rst, docs/commands/set/skip.rst, docs/commands/set/style.rst, docs/commands/set/substitute.rst, docs/commands/set/trace.rst, docs/commands/set/width.rst, docs/commands/show/aliases.rst, docs/commands/show/args.rst, docs/commands/show/autoeval.rst, docs/commands/show/autolist.rst, docs/commands/show/basename.rst, docs/commands/show/cmdtrace.rst, docs/commands/show/confirm.rst, docs/commands/show/different.rst, docs/commands/show/highlight.rst, docs/commands/show/listsize.rst, docs/commands/show/maxstring.rst, docs/commands/show/skip.rst, docs/commands/show/style.rst, docs/commands/show/trace.rst, docs/commands/show/width.rst, docs/commands/support/source.rst: More sub-indexed commands 2017-09-29 rocky * docs/commands/running/continue.rst, docs/commands/running/exit.rst, docs/commands/running/kill.rst, docs/commands/running/next.rst, docs/commands/running/quit.rst, docs/commands/running/restart.rst, docs/commands/running/run.rst, docs/commands/running/skip.rst, docs/commands/running/step.rst, docs/commands/stack/backtrace.rst, docs/commands/stack/down.rst, docs/commands/stack/frame.rst, docs/commands/stack/up.rst, docs/commands/support/alias.rst, docs/commands/support/help.rst, docs/commands/support/source.rst, docs/commands/support/unalias.rst: More command index entries 2017-09-29 rocky * docs/commands/breakpoints/break.rst, docs/commands/breakpoints/condition.rst, docs/commands/breakpoints/delete.rst, docs/commands/breakpoints/disable.rst, docs/commands/breakpoints/enable.rst, docs/commands/breakpoints/tbreak.rst, docs/commands/data/display.rst, docs/commands/data/eval.rst, docs/commands/data/examine.rst, docs/commands/data/undisplay.rst, docs/commands/files/edit.rst, docs/commands/files/list.rst, docs/commands/info/break.rst, docs/commands/info/files.rst, docs/commands/info/line.rst, docs/commands/info/program.rst, docs/commands/info/source.rst, docs/index.rst: Start a command index 2017-09-29 rocky * : commit 7a529f084211fb9cdf1de0d72b6d6a75bf775b66 Author: rocky Date: Fri Sep 29 13:22:10 2017 -0400 2017-09-29 rocky * docs/index.rst, docs/manpage.rst: Doc title change 2017-09-29 rocky * command/set_sub/style.sh, docs/commands/set/style.rst: plain "set style" lists all styles Beef up help doc too. 2017-09-29 rocky * docs/commands/data/eval.rst: eval doc typo 2017-09-29 rocky * docs/overview.rst: Fix overview links 2017-09-29 rocky * command/eval.sh: eval doc 2017-09-29 rocky * docs/commands/data/eval.rst: eval doc 2017-09-29 rocky * command/list.sh, docs/commands/files/list.rst, docs/overview.rst, test/data/list.right: update list help 2017-09-29 rocky * README.md, docs/overview.rst: More doc hacking 2017-09-29 rocky * docs/commands.rst: More doc hacking 2017-09-29 rocky * command/condition.sh, command/eval.sh, docs/commands/data/eval.rst: More doc changes 2017-09-29 rocky * docs/conf.py: remove schmutz 2017-09-29 rocky * docs/commands.rst: Start doc for commands 2017-09-29 rocky * docs/overview.rst: Small doc change 2017-09-29 rocky * docs/commands/Makefile, docs/commands/breakpoints.rst, docs/commands/breakpoints/Makefile, docs/commands/breakpoints/break.rst, docs/commands/breakpoints/condition.rst, docs/commands/breakpoints/delete.rst, docs/commands/breakpoints/disable.rst, docs/commands/breakpoints/enable.rst, docs/commands/breakpoints/tbreak.rst, docs/commands/data.rst, docs/commands/data/Makefile, docs/commands/data/display.rst, docs/commands/data/eval.rst, docs/commands/data/examine.rst, docs/commands/data/pr.rst, docs/commands/data/undisplay.rst, docs/commands/files.rst, docs/commands/files/Makefile, docs/commands/files/edit.rst, docs/commands/files/list.rst, docs/commands/info.rst, docs/commands/info/Makefile, docs/commands/info/break.rst, docs/commands/info/files.rst, docs/commands/info/line.rst, docs/commands/info/program.rst, docs/commands/info/source.rst, docs/commands/running.rst, docs/commands/running/Makefile, docs/commands/running/continue.rst, docs/commands/running/exit.rst, docs/commands/running/kill.rst, docs/commands/running/next.rst, docs/commands/running/quit.rst, docs/commands/running/restart.rst, docs/commands/running/run.rst, docs/commands/running/skip.rst, docs/commands/running/step.rst, docs/commands/set.rst, docs/commands/set/Makefile, docs/commands/set/autoeval.rst, docs/commands/set/autolist.rst, docs/commands/set/basename.rst, docs/commands/set/cmdtrace.rst, docs/commands/set/confirm.rst, docs/commands/set/different.rst, docs/commands/set/events.rst, docs/commands/set/flush.rst, docs/commands/set/highlight.rst, docs/commands/set/listsize.rst, docs/commands/set/maxstring.rst, docs/commands/set/skip.rst, docs/commands/set/style.rst, docs/commands/set/substitute.rst, docs/commands/set/trace.rst, docs/commands/set/width.rst, docs/commands/show.rst, docs/commands/show/Makefile, docs/commands/show/aliases.rst, docs/commands/show/args.rst, docs/commands/show/autoeval.rst, docs/commands/show/autolist.rst, docs/commands/show/basename.rst, docs/commands/show/cmdtrace.rst, docs/commands/show/confirm.rst, docs/commands/show/different.rst, docs/commands/show/events.rst, docs/commands/show/flush.rst, docs/commands/show/highlight.rst, docs/commands/show/listsize.rst, docs/commands/show/maxstring.rst, docs/commands/show/skip.rst, docs/commands/show/style.rst, docs/commands/show/trace.rst, docs/commands/show/width.rst, docs/commands/stack.rst, docs/commands/stack/Makefile, docs/commands/stack/backtrace.rst, docs/commands/stack/down.rst, docs/commands/stack/frame.rst, docs/commands/stack/up.rst, docs/commands/support.rst, docs/commands/support/Makefile, docs/commands/support/alias.rst, docs/commands/support/debug.rst, docs/commands/support/help.rst, docs/commands/support/source.rst, docs/commands/support/unalias.rst, docs/conf.py, docs/syntax/command.rst, docs/syntax/suffixes.rst: Fill in docs on zsh commnads 2017-09-29 rocky * docs/.gitignore, docs/Makefile, docs/conf.py, docs/index.rst, docs/install.md, docs/make.bat, docs/manpage.rst, docs/overview.rst, docs/syntax.rst, test-driver: Try readthedocs 2017-09-05 rocky * circle.yml, test/integration/test-enable.in: Diable a test in CircleCI for now 2017-09-05 rocky * command/break.sh, command/delete.sh, command/disable.sh, command/enable.sh, command/info_sub/breakpoints.sh, lib/break.sh, lib/msg.sh: allo gdb-style enable/disable/delete all brkpts 2017-09-03 rocky * lib/journal.sh: _Dbg_write_journal_avar for zsh 5.1 and 5.4 2017-09-03 rocky * dbg-opts.sh, lib/break.sh, lib/journal.sh, test/data/export-5.4.1.right, test/integration/test-export.in: Assoc array journal writing for zsh 5.4 At some point, zsh "typeset -p" output changed and eval can now read unvarnished "typeset -p" output Fixes issue #12 Fixes #10 2017-09-01 rocky * test/data/Makefile.am: Filename typo 2017-09-01 rocky * configure.ac, test/data/Makefile.am, test/data/examine-5.4.1.right, test/data/setshow-5.4.1.right, test/data/subshell-5.4.1.right, test/integration/check-common.sh.in, test/integration/test-examine.in, test/integration/test-multi.in, test/integration/test-setshow.in, test/integration/test-subshell.in, test/unit/test-examine.sh.in: Zsh changes typeset output Remove failures associated with that. One bug still remains related to some other zsh version change. 2017-08-30 rocky * lib/break.sh: Revert gdb multiple breakpoint numbers 2017-08-30 rocky * command/break.sh, command/delete.sh, command/disable.sh, command/enable.sh, lib/break.sh, lib/frame.sh, lib/setshow.sh, test/unit/test-get-sourceline.sh.in: Sync with bashdb. Closer gdb conformance 2017-08-30 R. Bernstein * : Merge pull request #11 from irl/task/9 Fix test for funcfiletrace on later zshdb in ok4zshdb.sh (Closes: #9) 2017-05-07 rocky * .gitignore, COPYING, ChangeLog, command/stepping.sh, command/trace.sh: Small changes 2016-07-06 Rocky Bernstein * ChangeLog, NEWS, configure.ac: Get ready for releaes 0.92 2016-07-06 Rocky Bernstein * command/continue.sh, command/display.sh, command/enable.sh, command/eval.sh, command/examine.sh, command/export.sh, command/frame.sh, command/handle.sh, command/next.sh, command/pwd.sh, command/quit.sh, command/return.sh, command/run.sh, command/shell.sh, command/source.sh, command/stepping.sh: Markdown format remaining commands. 2016-06-27 rocky * command/help.sh, command/info_sub/breakpoints.sh, command/info_sub/display.sh, command/info_sub/line.sh, command/info_sub/program.sh, command/info_sub/source.sh, command/info_sub/variables.sh, command/info_sub/warranty.sh, command/set_sub/different.sh: Revise info help for RsT 2016-06-26 rocky * command/set_sub/linetrace.sh, lib/filecache.sh: Small changes 2016-06-25 rocky * command/edit.sh, command/set_sub/annotate.sh, command/set_sub/args.sh, command/set_sub/autoeval.sh, command/set_sub/autolist.sh, command/set_sub/basename.sh, command/set_sub/different.sh, command/set_sub/editing.sh, command/set_sub/highlight.sh, command/set_sub/history.sh, command/set_sub/linetrace.sh, command/set_sub/listsize.sh, command/set_sub/prompt.sh, command/set_sub/style.sh, command/set_sub/width.sh, test/data/list.right: Revise help 2016-06-25 rocky * command/alias.sh, command/backtrace.sh, command/break.sh, command/complete.sh, command/condition.sh, command/delete.sh, command/disable.sh, command/down.sh, command/help.sh, command/kill.sh, command/list.sh, command/undisplay.sh, command/up.sh, lib/help.sh, lib/{info.sh => info-help.sh}, test/data/list.right: Correct info help. Start rSt for commands 2016-06-23 rocky * command/action.sh, command/alias.sh, command/help.sh, command/set_sub/args.sh, command/set_sub/highlight.sh, command/set_sub/style.sh, command/set_sub/width.sh, command/trace.sh, lib/filecache.sh, lib/help.sh, lib/msg.sh, lib/term-highlight.py: Start using ReStructuredText in help strings 2016-06-22 rocky * dbg-opts.sh: Update year 2016-06-22 rocky * command/set_sub/style.sh, lib/filecache.sh, lib/help.sh: small changes and sync with bashdb * abbrevs in help set set_sub/style.sh: on error show columnized list. Single check of whether term-highlight.py works 2016-06-21 rocky * command/set_sub/style.sh, lib/help.sh: Small fixes 2016-06-21 rocky * ChangeLog, circle.yml, command/set_sub/style.sh, dbg-opts.sh, lib/help.sh, test/data/lopts.right: Small style fixes. Fix CircleCI? 2016-06-21 rocky * circle.yml, command/set_sub/style.sh, command/show_sub/style.sh, dbg-opts.sh: Add top-level set Style Address CircleCI failure? 2016-06-21 rocky * lib/term-highlight.py: Add top-level option for setting style 2016-06-21 rocky * command/set_sub/highlight.sh, command/set_sub/style.sh, command/show_sub/highlight.sh, command/show_sub/style.sh, lib/filecache.sh, lib/rstext.py, lib/term-highlight.py: Allow setting pygments style Use set/show style to change 2016-05-30 rocky * ChangeLog, NEWS, configure.ac, test/data/delete.right: Get ready for release 0.91 2016-05-30 rocky * command/delete.sh, lib/break.sh, test/data/brkpt1.right, test/data/bug-delete.right, test/data/delete.right: Report deleted breakpoints This helps front-ends like realgud 2015-12-19 rocky * circle.yml: CircleCI typo 2015-12-19 rocky * circle.yml: I said try CircleCI 2015-12-19 rocky * .travis.yml, README.md: Try CircleCI 2015-12-19 rocky * lib/term-highlight.py: Most of Eiriner's small formatting changes. 2015-12-19 rocky * test/data/examine.cmd, test/data/examine.right, test/unit/test-examine.sh.in: Handle both print forms (1,2,3) and ( 1, 2, 3) for typeset -p array 2015-12-18 rocky * .travis.yml, lib/term-highlight.py: Make highlight program fully Python3-compatible. Try travis without installing zsh 2015-12-18 rocky * lib/term-highlight.py, lib/tox.ini, test/data/examine.right, test/unit/test-examine.sh.in: Fix some of the highlight bugs more feature remain. zsh typeset -p array formatting has change. Track that. 2015-09-05 rocky * README.md, command/set_sub/highlight.sh, command/show_sub/highlight.sh, lib/term-highlight.py: Remove and point to installation instructions 2015-02-09 rocky * README.md: Revise README 2015-01-23 rocky * README.md: Remove coderwall endorses count 2015-01-23 rocky * command/eval.sh, command/help.sh, command/set_sub/highlight.sh, command/show_sub/highlight.sh, dbg-opts.sh, lib/filecache.sh, lib/gdb.sh, lib/msg.sh, lib/processor.sh, lib/term-highlight.py, test/data/lopts.right, test/integration/test-opts.in, test/unit/test-get-sourceline.sh.in, test/unit/test-msg.sh.in, test/unit/test-pre.sh.in: --highlight changed from taking no parameters to --highlight=dark|light. And we now accomdate dark terminals more properly. 2015-01-15 rocky * command/info_sub/breakpoints.sh, lib/action.sh, lib/msg.sh, test/data/action.right, test/data/brkpt1.right, test/data/condition.right, test/data/delete.right, test/data/enable.right, test/data/tbreak.right: Add more sectioning commands. Non-syntax highlight sectioning adds a line underneath of dashes. 2014-12-16 rocky * command/help.sh, command/quit.sh, command/shell.sh, command/show.sh, lib/complete.sh, lib/hist.sh: More work on completion. help includes aliases in completion Other small changes and cleanups. 2014-12-15 rocky * command/set_sub/history.sh, test/data/setshow.cmd, test/data/setshow.right: Add "set history filename" 2014-12-15 rocky * test/data/setshow.cmd, test/data/setshow.right: In setshow test we need to set histsize (now that this works) before running a generic "show". 2014-12-15 rocky * command/info.sh, command/quit.sh, command/set.sh, command/set_sub/annotate.sh, command/set_sub/basename.sh, command/set_sub/history.sh, command/set_sub/listsize.sh, command/show.sh, command/show_sub/history.sh, dbg-main.sh, dbg-opts.sh, lib/hist.sh, lib/hook.sh, lib/processor.sh, test/data/setshow.right, zshdb.in: Go over history and history saving. Use more of the subcommand-automated system and less hacked into the subcommand managers. Prompt has to keep more of its own count and not use command history since that may start at a large number. 2014-12-15 rocky * command/show_sub/commands.sh, dbg-trace.sh.in, lib/complete.sh, lib/hist.sh, lib/hook.sh, zshdb.in: zshdb.in: we need --interactive for any kind of history to work show_sub/commands.sh: "show commands" now works as in gdb lib/hook.sh: put on fc -W, but still save history file. 2014-12-15 rocky * ChangeLog, lib/help.sh: I hate conflicted merges. 2014-12-15 rocky * : commit 03cdd913fcd58243bddbf7c08dad045830df37b6 Author: rocky Date: Mon Dec 15 10:40:52 2014 -0500 2014-12-15 rocky * ChangeLog, command/down.sh, command/frame.sh, command/up.sh, lib/complete.sh: Allow frame number values to come out in the order they were given. Thanks go to Bart Schaefer for showing the way. 2014-12-14 rocky * ChangeLog, command/help.sh, command/set.sh, command/set_sub/annotate.sh, command/set_sub/autoeval.sh, command/set_sub/autolist.sh, command/set_sub/basename.sh, command/set_sub/debug.sh, command/set_sub/different.sh, command/set_sub/editing.sh, command/set_sub/highlight.sh, command/set_sub/linetrace.sh, command/set_sub/listsize.sh, command/set_sub/trace-commands.sh, command/show.sh, lib/help.sh: Add help completion. Allow subcommand to be run standalone 2014-12-14 rocky * ChangeLog, command/help.sh, command/set.sh, command/set_sub/annotate.sh, command/set_sub/autoeval.sh, command/set_sub/autolist.sh, command/set_sub/basename.sh, command/set_sub/debug.sh, command/set_sub/different.sh, command/set_sub/editing.sh, command/set_sub/highlight.sh, command/set_sub/linetrace.sh, command/set_sub/listsize.sh, command/set_sub/trace-commands.sh, command/show.sh, lib/help.sh: Add help completion. Allow subcommand to be run standalone 2014-12-14 rocky * command/info.sh, command/info_sub/Makefile.am, command/info_sub/breakpoints.sh, command/info_sub/brkpts.sh, command/info_sub/display.sh, command/info_sub/files.sh, command/info_sub/line.sh, command/info_sub/program.sh, command/info_sub/source.sh, command/info_sub/variables.sh, command/info_sub/warranty.sh, command/set.sh, command/set_sub/annotate.sh, command/set_sub/autoeval.sh, command/set_sub/autolist.sh, command/set_sub/basename.sh, command/set_sub/debug.sh, command/set_sub/different.sh, command/set_sub/editing.sh, command/set_sub/highlight.sh, command/set_sub/linetrace.sh, command/set_sub/showcommand.sh, lib/complete.sh, lib/processor.sh, test/data/action.right, test/data/brkpt1.cmd, test/data/brkpt1.right, test/data/condition.cmd, test/data/condition.right, test/data/delete.cmd, test/data/delete.right, test/data/enable.cmd, test/data/enable.right, test/data/tbreak.cmd, test/data/tbreak.right: Command completion of "info" subcommands. Make info subcommand handling more programmatic like "set" and" show" commands. 2014-12-13 rocky * README.md: Put in a plug for trepanning 2014-12-13 rocky * command/down.sh, command/frame.sh, command/set_sub/annotate.sh, command/set_sub/autoeval.sh, command/set_sub/autolist.sh, command/set_sub/basename.sh, command/set_sub/debug.sh, command/set_sub/different.sh, command/set_sub/editing.sh, command/set_sub/highlight.sh, command/set_sub/linetrace.sh, command/set_sub/trace-commands.sh, command/show_sub/highlight.sh, command/up.sh, lib/complete.sh, lib/frame.sh, lib/msg.sh, lib/processor.sh, test/unit/test-frame.sh.in: Add frame number completion on up, down, frame. Start 2nd level completion of set commands, e.g. set basename, set editing, set highlight. Add terminal underline attribute. Use highlight setting to figure out whether to underline prompt. Docstring for set/show highlight mentions terminal now instead of source-code listing. 2014-12-13 rocky * command/eval.sh, command/frame.sh, lib/complete.sh, lib/frame.sh, test/unit/test-frame.sh.in: "frame" command now has frame-number completion 2014-12-13 rocky * command/eval.sh, configure.ac, lib/complete.sh: Command completion for eval. Next version will be 0.91 2014-12-13 rocky * ChangeLog, Makefile.am, configure.ac, make-check-filter.rb, test/integration/lopts.tests, test/integration/sopts.tests: *opts.tests: make sure we use --no-highlight sync make-chekc-filter.rb with that used in bashdb Bump version to dev. 2014-12-12 rocky * ChangeLog, NEWS: Wrong date in NEWS. Release 0.9 2014-12-12 rocky * ChangeLog, Makefile.am, make-check-filter.rb, test/integration/check-common.sh.in: Makefile.am: use remake comment targets. Add check-short target check-common.sh.in: split typeset and assignment which makes it work on a Solaris environment 2014-12-12 rocky * ChangeLog, Makefile.am, NEWS, configure.ac, dbg-opts.sh, test/data/setshow.right, test/example/Makefile.am, test/integration/check-common.sh.in, test/integration/test-bug-delete, test/unit/helper.sh, test/unit/test-get-sourceline.sh.in, test/unit/test-msg.sh.in, test/unit/test-pre.sh.in: Fix bug in delete command. Change default options for "set highlight" and "set editing". Get ready for 0.9 release. 2014-12-12 rocky * README.md: Even shorter 2014-12-12 rocky * README.md: Shorten README.md 2014-12-12 rocky * : commit 9653c3f78058fcf62427fb15d0a420482971f155 Author: rocky Date: Thu Dec 11 12:33:33 2014 -0500 2013-06-14 rocky * README.md: Ouch - that's too loud. 2013-06-14 rocky * README.md: Add coderwall endorse 2013-06-13 rocky * README.md: Build status link update again 2013-06-13 rocky * README.md: Correct travis png link. How was it working before? 2013-06-12 rocky * autogen.sh: Fix up autogen.sh - 2nd take 2013-06-12 rocky * .gitignore, autogen.sh: Make README be a copy of README.md in autogen.sh to make configure happy 2013-06-12 rocky * README.md: Markdown syntax typo 2013-06-12 rocky * Makefile.am, README, README.md: Convert README to markdown 2013-06-12 rocky * .travis.yml: Try again for travis 2013-06-12 rocky * .travis.yml: travis.yml: try with autogen.sh 2013-06-12 rocky * .travis.yml: Try out travis 2013-05-28 rocky * : commit bd17842a9ca3c1d3405a7d76f4afb936b3076b60 Author: rocky Date: Tue May 28 04:10:39 2013 -0400 2013-05-25 rocky * .gitignore, Makefile.am, command/help.sh, command/info_sub/brkpts.sh, dbg-opts.sh, lib/msg.sh, lib/rstext.py, test/data/lopts.right, test/unit/Makefile.am: msg.sh: fix bug in sectioning command. Use more sectioning commands dbg-opts.sh: add --trace option lib/rstext.py: in support of RSt help. 2013-04-04 rocky * : commit 4f271de6e03ea2df13aa4eea69095d58ed1e0ca3 Author: rocky Date: Thu Apr 4 11:55:05 2013 -0400 2013-04-04 rocky * lib/display.sh: Initialization typo. 2012-08-25 rocky * NEWS, command/delete.sh, command/down.sh, command/up.sh, test/data/frame.cmd, test/data/frame.right: Follow gdb better. alias 'u' for 'up' removed. 2012-03-09 R. Bernstein * : Merge pull request #2 from Erkan-Yilmaz/master lang. fixes 2011-12-30 rocky * Makefile.am: Add "test" target - issue #1 2011-05-27 rocky * command/set_sub/history.sh, command/show.sh, command/show_sub/commands.sh, command/show_sub/warranty.sh, lib/hist.sh, lib/processor.sh, test/unit/.gitignore, test/unit/Makefile.am: Remove traces of set/show/ history/commands until this works. 2011-05-27 rocky * configure.ac, test/unit/.gitignore, test/unit/test-fns.sh.in, test/unit/{test-eval.sh.in => test-lib-eval.sh.in}: Administrivia: test-eval.sh.in -> test-lib-eval.sh.in. test-fns.sh: Remove extra slash in sourcing files 2011-05-18 rocky * NEWS: Update NEWS 2011-05-17 rocky * test/example/.gitignore: See above. 2011-05-17 rocky * test/example/restart.sh, test/integration/test-multi: Remove a couple of derived files 2011-05-17 rocky * dbg-opts.sh, test/example/restart.sh, test/integration/test-multi, zshdb.in: Test for pygmentize with --highlight. zshdb.in - one more error output to stderr 2011-05-17 rocky * ChangeLog, NEWS, command/continue.sh, command/delete.sh, command/down.sh, command/examine.sh, command/info.sh, command/next.sh, command/up.sh, configure.ac: Untabify some files. Sync with bashdb. Get ready for release 0.08. 2011-05-17 rocky * : commit f6df1a85946bd77688ac470758ad14bb202cf5fc Author: rocky Date: Tue May 17 07:05:14 2011 -0400 2011-05-16 rocky * test/unit/Makefile.am, test/unit/test-frame.sh.in: Small changes. 2011-05-16 rocky * test/unit/test-eval.sh.in, test/unit/test-file.sh.in: Sync with kshdb. 2011-05-16 rocky * configure.ac, test/unit/test-action.sh.in, test/unit/test-alias.sh.in, test/unit/test-break.sh.in, test/unit/test-cmd-complete.sh.in, test/unit/test-columns.sh.in, test/unit/test-dbg-opts.sh.in, test/unit/test-eval.sh.in, test/unit/test-examine.sh.in, test/unit/test-file.sh.in, test/unit/test-filecache.sh.in, test/unit/test-fns.sh.in, test/unit/test-frame.sh.in, test/unit/test-get-sourceline.sh.in, test/unit/test-journal.sh.in, test/unit/test-lib-shell.sh.in, test/unit/test-msg.sh.in, test/unit/test-pre.sh.in, test/unit/test-run.sh.in, test/unit/test-save-restore.sh.in, test/unit/test-setshow.sh.in, test/unit/test-sort.sh.in, test/unit/test-tty.sh.in, test/unit/test-validate.sh.in: Regularize unit tests more so we an more easily reuse them in kshdb and bashdb. 2011-05-15 rocky * test/unit/Makefile.am, test/unit/test-file.sh.in, test/unit/test-filecache.sh.in: More DRY 2011-05-15 rocky * test/unit/Makefile.am, test/unit/helper.sh, test/unit/test-action.sh.in, test/unit/test-alias.sh.in, test/unit/test-break.sh.in, test/unit/test-cmd-complete.sh.in, test/unit/test-columns.sh.in, test/unit/test-dbg-opts.sh.in, test/unit/test-frame.sh.in, test/unit/test-run.sh.in, test/unit/test-save-restore.sh.in, test/unit/test-setshow.sh.in, test/unit/test-sort.sh.in, test/unit/test-tty.sh.in, test/unit/test-validate.sh.in: DRY unit tests by using a helper file. 2011-05-15 rocky * test/unit/Makefile.am, test/unit/test-frame.sh.in: Forgot a test. Reduce its verbosity too 2011-05-15 rocky * lib/setshow.sh, test/unit/Makefile.am, test/unit/shunit2, test/unit/test-action.sh.in, test/unit/test-break.sh.in, test/unit/test-cmd-complete.sh.in, test/unit/test-columns.sh.in, test/unit/test-dbg-opts.sh.in, test/unit/test-eval.sh.in, test/unit/test-examine.sh.in, test/unit/test-file.sh.in, test/unit/test-filecache.sh.in, test/unit/test-fns.sh.in, test/unit/test-get-sourceline.sh.in, test/unit/test-journal.sh.in, test/unit/test-lib-shell.sh.in, test/unit/test-msg.sh.in, test/unit/test-pre.sh.in, test/unit/test-run.sh.in, test/unit/test-save-restore.sh.in, test/unit/test-setshow.sh.in, test/unit/test-sort.sh.in, test/unit/test-tty.sh.in, test/unit/test-validate.sh.in: Reduce garbage verbosity in unit tests while increasing raw statistics reported. 2011-05-15 rocky * test/unit/shunit2: Show number of asserts: passed and failed. 2011-05-15 rocky * test/unit/shunit2, test/unit/test-action.sh.in, test/unit/test-break.sh.in, test/unit/test-eval.sh.in, test/unit/test-file.sh.in, test/unit/test-filecache.sh.in, test/unit/test-fns.sh.in, test/unit/test-frame.sh.in, test/unit/test-get-sourceline.sh.in, test/unit/test-journal.sh.in, test/unit/test-lib-shell.sh.in, test/unit/test-pre.sh.in, test/unit/test-save-restore.sh.in, test/unit/test-validate.sh.in: Update shunit2 to version 2.1.6 2011-05-11 rocky * command/action.sh, command/alias.sh, command/break.sh, command/complete.sh, command/condition.sh, command/down.sh, command/edit.sh, command/examine.sh, command/kill.sh, command/next.sh, command/pwd.sh, command/quit.sh, command/return.sh, command/run.sh, command/source.sh, command/up.sh, lib/{columns.sh => columnize.sh}, test/unit/test-columns.sh.in: Go over help. Sync with bashdb and kshdb. 2011-05-10 rocky * command/info.sh, command/set.sh, command/show.sh, command/show_sub/editing.sh, lib/complete.sh, lib/help.sh, test/data/Makefile.am: Start completion of subcommands set and show. test/data/Makefile.am: remove patch artifacts. 2011-05-10 rocky * lib/complete.sh: Really dumb first-level tab completion. 2011-05-07 rocky * : commit 00917e32575a356f43012c44a00d74bcaef7c110 Author: rocky Date: Sat May 7 14:10:06 2011 -0400 2011-05-07 rocky * command/examine.sh, command/show.sh, command/show_sub/{debugging.sh => debug.sh}, command/trace.sh, lib/Makefile.am, lib/fns.sh, lib/help.sh, lib/hook.sh, lib/shell.sh, test/data/setshow.right: set debug -> set debugging 2011-05-07 rocky * command/set_sub/{debugging.sh => debug.sh}: Set debugging -> set debug to follow gdb. 2011-05-06 rocky * command/set_sub/history.sh, command/show_sub/Makefile.am: Simplify pkgdata_DATA via GNU Make wildcard 2011-05-03 rocky * command/complete.sh: Replace with future zsh code. 2011-05-03 rocky * command/complete.sh, test/unit/test-cmd-complete.sh.in: bash compgen -W does not sort the result 2011-05-03 rocky * command/complete.sh, configure.ac, test/unit/.gitignore, test/unit/test-cmd-complete.sh.in: Fix up "complete" command correctly. 2011-05-02 rocky * command/complete.sh: Typo 2011-05-02 rocky * command/complete.sh: zsh syntax does not allow array initialization in typeset 2011-05-02 rocky * command/Makefile.am, command/complete.sh, command/set.sh, command/set_sub/Makefile.am, command/set_sub/autoeval.sh, command/set_sub/basename.sh, command/set_sub/debugging.sh, command/set_sub/different.sh, command/set_sub/highlight.sh, command/set_sub/history.sh, command/set_sub/prompt.sh, command/set_sub/showcommand.sh, command/set_sub/trace-commands.sh, command/set_sub/width.sh, lib/Makefile.am, lib/complete.sh, lib/help.sh: Start to DRY set subcommands and Makefiles. Makefile use GNU make wildcards for *.sh Sync with bashdb. 2011-04-17 rocky * test/data/action.right, test/data/brkpt1.right, test/data/bug-args.right, test/data/bug-errexit.right, test/data/bug-ksharrays.right, test/data/bugIFS.right, test/data/condition.right, test/data/delete.right, test/data/enable.right, test/data/examine.right, test/data/export.right, test/data/frame.right, test/data/list.right, test/data/lopts.right, test/data/multi1.right, test/data/multi2.right, test/data/multi3.right, test/data/multi4.right, test/data/next.right, test/data/setshow.right, test/data/skip.right, test/data/sopts.right, test/data/step.right, test/data/subshell.right, test/data/tbreak.right: Add termination message. 2011-04-17 rocky * command/quit.sh, command/set_sub/history.sh, command/show_sub/history.sh, lib/hist.sh, zshdb.in: _Dbgr_history_save -> _Dbgr_set_history like other _Dbgr_set vars. Sync with bashdb. Add termination message. 2011-04-15 rocky * command/backtrace.sh, lib/frame.sh, lib/gdb.sh, test/data/frame.right: Add frame line when switching lines. It helps front-ends understand what frame one is out. And gdb does it that way too. 2011-04-01 rocky * lib/fns.sh, test/unit/test-eval.sh.in: Need echo's in ev? for assignments. 2011-04-01 rocky * command/eval.sh, lib/fns.sh, test/unit/test-eval.sh.in: eval? now handles the expression part of an assignment statement. 2011-03-27 rocky * command/eval.sh, dbg-main.sh, lib/processor.sh, test/data/subshell.cmd, test/data/subshell.right: Fix bug in sourcing startup profile. Fix bug in "print" Workaround typeset weirdness. 2011-03-27 rocky * command/kill.sh, lib/hook.sh, lib/journal.sh: Try to clean up before a KILL -9. 2011-03-17 rocky * command/info_sub/Makefile.am, command/set_sub/Makefile.am: Remove patch shlock on "make clean" 2011-03-17 rocky * command/action.sh, command/alias.sh, command/backtrace.sh, command/break.sh, command/condition.sh, command/continue.sh, command/delete.sh, command/disable.sh, command/display.sh, command/down.sh, command/edit.sh, command/enable.sh, command/eval.sh, command/examine.sh, command/export.sh, command/frame.sh, command/handle.sh, command/help.sh, command/info.sh, command/info_sub/brkpts.sh, command/info_sub/display.sh, command/info_sub/files.sh, command/info_sub/line.sh, command/info_sub/program.sh, command/info_sub/source.sh, command/info_sub/variables.sh, command/info_sub/warranty.sh, command/kill.sh, command/list.sh, command/next.sh, command/quit.sh, command/return.sh, command/run.sh, command/set.sh, command/set_sub/annotate.sh, command/set_sub/args.sh, command/set_sub/autolist.sh, command/set_sub/editing.sh, command/set_sub/highlight.sh, command/set_sub/history.sh, command/set_sub/linetrace.sh, command/set_sub/listsize.sh, command/set_sub/showcommand.sh, command/set_sub/trace-commands.sh, command/set_sub/width.sh, command/shell.sh, command/show.sh, command/show_sub/alias.sh, command/show_sub/copying.sh, command/show_sub/debugging.sh, command/show_sub/editing.sh, command/show_sub/highlight.sh, command/show_sub/history.sh, command/source.sh, command/stepping.sh, command/trace.sh, command/undisplay.sh, command/up.sh: Replace tabs with spaces. Thanks again to Lukas Fleischer. 2011-03-17 rocky * command/set_sub/highlight.sh, configure.ac: Correct test for pygmentize and call to error message. Thanks to Lukas Fleischer. 2011-03-15 rocky * NEWS: Got version number wrong 2011-03-15 rocky * command/set_sub/Makefile.am, command/show_sub/Makefile.am: Forgot to add set/show highlight 2011-03-15 rocky * command/eval.sh, lib/fns.sh, lib/gdb.sh: More futzing with eval and eval? 2011-03-15 rocky * command/eval.sh: Revise how we get the source string for eval and eval? 2011-03-15 rocky * dbg-opts.sh: Change banner slightly 2011-03-15 rocky * dbg-opts.sh: Sync with kshdb 2011-03-14 rocky * lib/fns.sh, lib/save-restore.sh, test/unit/test-eval.sh.in: Revise expand_eval_fn so we don't use external sed, but Regexps. 2011-03-14 rocky * : commit d7fff0fdbcb6c14dcf885d1459173ad40ce83682 Author: rocky Date: Mon Mar 14 15:59:24 2011 -0400 2011-03-14 rocky * command/source.sh: More conventional shell-style indentation. 2011-03-14 rocky * : commit 70ab3cbdb08948308abc4f031c3f66bc5f9fdc49 Author: rocky Date: Sun Mar 13 13:56:29 2011 -0400 2011-03-13 rocky * command/eval.sh, lib/help.sh: Regularize indentation and sync with kshdb. 2011-03-05 rocky * lib/hook.sh: More agressive rm of evalfile 2011-03-05 rocky * : commit f7bac140e6a7998c858f1ceb492943af6995eef8 Author: rocky Date: Sat Mar 5 12:50:41 2011 -0500 2011-03-05 rocky * dbg-opts.sh: Update copyright date 2011-03-04 rocky * command/Makefile.am, command/export.sh, configure.ac, lib/break.sh, lib/fns.sh, lib/hook.sh, lib/journal.sh, lib/setshow.sh, lib/validate.sh, test/data/Makefile.am, test/data/export.cmd, test/data/export.right, test/integration/.gitignore, test/integration/test-export.in: Fix bug in setting breakpoint in subshell; Add export command 2011-03-04 rocky * test/integration/Makefile.am: Fix bug in setting breakpoint in subshell; Add export command 2011-03-03 rocky * command/info_sub/brkpts.sh: Better sync with kshdb and bashdb. Still a little off in breakpoints. 2011-03-03 rocky * command/display.sh, command/info.sh, command/info_sub/display.sh: Sync with kshdb. 2011-03-02 rocky * lib/display.sh: Sync with kshdb 2011-03-02 rocky * Makefile.am: Administrivia 2011-03-02 rocky * : commit 11c2d3675a5814f67b31e89b78b57d8f965451f8 Author: rocky Date: Wed Mar 2 20:14:14 2011 -0500 2011-03-01 rocky * Makefile.am, command/shell.sh, data/shell.sh, lib/shell.sh: Sync with bashdb 2011-02-28 rocky * Makefile.am, command/Makefile.am, data/Makefile.am, lib/Makefile.am, test/Makefile.am, test/unit/Makefile.am: 'clean'target should remove patch' *.{orig,rej} 2011-02-28 rocky * Makefile.am, command/shell.sh, configure.ac, data/.gitignore, data/Makefile.am, data/shell.sh, lib/fns.sh, lib/shell.sh, test/unit/.gitignore: Add ability to save variables inside nested shell. Suggestion for code which doesn't use eval (but is very zsh-specific) suggested by Bart Schaefer. 2011-02-28 rocky * lib/fns.sh: Sync with bashdb 2011-02-28 rocky * command/eval.sh, lib/fns.sh: in "eval?" extract expression in "case", and echo that. 2011-02-27 rocky * command/shell.sh, lib/shell.sh, test/unit/test-lib-shell.sh.in: Revise how exports work to be more reliable. Thanks to Bart Schaefer for the suggestion and pointer to the parameter module 2011-02-27 rocky * test/data/frame.right, test/unit/test-eval.sh.in: Correct unit tests expectations 2011-02-27 rocky * configure.ac, test/unit/Makefile.am, test/unit/test-lib-shell.sh.in: Add unit test for recent shell lib stuff 2011-02-27 rocky * command/Makefile.am, command/shell.sh, lib/Makefile.am, lib/fns.sh, lib/shell.sh: Add more proper filtering of typeset -p for debugger shell command. 2011-02-27 rocky * dbg-pre.sh: A separator in the tempfiles looks a little nicer 2011-02-26 rocky * command/shell.sh: Start shell command. 2011-02-25 rocky * command/eval.sh, zshdb.in: Update eval help 2011-02-25 rocky * command/eval.sh, lib/display.sh, lib/processor.sh, test/data/action.right, test/data/bug-args.cmd, test/data/bug-args.right, test/data/bug-ksharrays.right, test/data/bugIFS.cmd, test/data/bugIFS.right, test/data/multi1.cmd, test/data/multi1.right, test/data/multi2.cmd, test/data/multi2.right, test/data/multi3.cmd, test/data/multi3.right, test/data/setshow.right, test/data/subshell.right: Show return code in eval. "pr" is an alias for "print" no longer "p". This matches current Ruby abbreviations. 2011-02-25 rocky * command/eval.sh, configure.ac, lib/filecache.sh, lib/fns.sh, lib/processor.sh, test/data/list.right, test/unit/Makefile.am, test/unit/test-eval.sh.in: Add eval? 2011-02-19 rocky * command/eval.sh, command/quit.sh: Add q! alias for quit. Show eval source text and note set autoeval in help 2011-02-19 rocky * command/eval.sh: eval command with no args eval's the current source line. YAY! 2011-02-09 rocky * command/down.sh, command/frame.sh, command/up.sh, lib/Makefile.am, lib/filecache.sh, lib/msg.sh, lib/validate.sh, test/data/setshow.right, test/unit/test-msg.sh.in, test/unit/test-validate.sh.in: Parameter checkin on up/down/frame. chmod +x for Python highlight program. Sync with bashdb. 2011-02-09 rocky * : commit fdefc71c324e96154c843cf0ba69cadc14d56ce2 Author: rocky Date: Wed Feb 9 11:07:05 2011 -0500 2011-02-09 rocky * : commit 47a5c56d96db70a757c8e19ad8db8260b1970ff1 Author: rocky Date: Wed Feb 9 10:33:53 2011 -0500 2011-02-07 rocky * lib/filecache.sh: Remove duplicate statement. 2011-02-07 rocky * command/show_sub/highlight.sh, dbg-opts.sh, getopts_long.sh, lib/file.sh, lib/msg.sh, test/data/lopts.right: Add --highlight and --no-highlight options. Update getopts_long.sh 2011-02-07 rocky * lib/filecache.sh: Got off by one in source line trying merge bash temp pygmentize code 2011-02-07 rocky * command/set_sub/highlight.sh, command/show_sub/highlight.sh, lib/filecache.sh, lib/gdb.sh: Add syntax highlighting via pygmentize 2011-02-06 rocky * command/set.sh, command/set_sub/Makefile.am, command/set_sub/annotate.sh, command/set_sub/args.sh, command/set_sub/autolist.sh, command/set_sub/editing.sh, command/set_sub/history.sh, command/set_sub/listsize.sh, command/set_sub/showcommand.sh, command/set_sub/{linewidth.sh => width.sh}, command/show.sh: Move subcommand dispatch into hash in set commands. Add help although not used yet. 2011-02-06 rocky * ChangeLog, command/show.sh, command/show_sub/alias.sh, command/show_sub/copying.sh, command/show_sub/debugging.sh, command/show_sub/editing.sh, lib/help.sh: Start dynamic subcommands handling via associative arrays like we did for commands. Sync with bashdb 2011-01-16 rocky * command/continue.sh, dbg-trace.sh.in, lib/dbg-call.sh, lib/hook.sh, zshdb.in: _Dbg_hook -> _Dbg_trap_handler 2011-01-16 rocky * lib/alias.sh, lib/processor.sh: Sync with bashdb 2011-01-11 rocky * command/set_sub/linetrace.sh, command/show.sh, dbg-opts.sh, lib/break.sh, lib/help.sh, lib/hook.sh, test/data/frame.right, test/example/hanoi.sh.in, test/unit/test-dbg-opts.sh.in: _Dbg_linetrace -> _Dbg_set_linetrace 2011-01-11 rocky * lib/list.sh: Sync with kshdb 2011-01-11 rocky * dbg-main.sh, lib/save-restore.sh: Sync with kshdb 2011-01-11 rocky * command/break.sh, dbg-trace.sh.in: Sync with kshdb 2011-01-11 rocky * dbg-main.sh, dbg-opts.sh: More lint changes via ksh -n. 2011-01-10 rocky * ChangeLog, lib/save-restore.sh: Small lint-like thing from ksh -n 2011-01-10 rocky * command/action.sh, command/break.sh, command/examine.sh, command/handle.sh, command/kill.sh, command/list.sh, command/show.sh, command/stepping.sh: Remove lint warnings courtesy of ksh -n and zsh -n 2011-01-10 rocky * lib/action.sh, lib/break.sh, lib/filecache.sh, lib/fns.sh, lib/frame.sh, lib/help.sh, lib/hook.sh, lib/list.sh, lib/processor.sh, lib/setshow.sh, lib/sig.sh, lib/tty.sh: Remove lint warnings courtesy of ksh -n 2010-12-28 rocky * lib/processor.sh: Small spelling typo in comment 2010-12-28 rocky * ChangeLog, configure.ac: Bump release number 2010-12-24 rocky * .gitignore, lib/action.sh, lib/alias.sh, lib/break.sh: Synchronize with bashdb 2010-12-24 rocky * command/continue.sh, command/return.sh, command/stepping.sh, lib/processor.sh: Start using _Dbg_continue_rc to signal continuing execution 2010-12-10 rocky * ChangeLog, NEWS, configure.ac: Giant Madagascar Day release 2010-12-06 rocky * ChangeLog, configure.ac, test/data/restart.cmd, test/data/restart.right, test/data/restart2.cmd, test/integration/.gitignore, test/integration/Makefile.am, test/integration/test-multi.in: Make testing work more generally. 2010-12-06 rocky * NEWS, command/list.sh, test/data/frame.right, test/data/list.cmd, test/data/list.right, test/data/restart.right: Center list lines by default. Add list> and l> aliases to change the default. 2010-12-02 rocky * ChangeLog, Makefile.am, command/Makefile.am, command/handle.sh, lib/processor.sh, lib/sig.sh, lib/tty.sh, test/data/frame.right, zshdb.in: Fix small bugs in non-interactive read and in duplicating $TTY descriptor. Add interrupt handler code, although it is not ready for use yet. 2010-11-30 rocky * ChangeLog, command/Makefile.am, command/kill.sh, test/integration/Makefile.am: kill: command return codes have to be 0 for now. Forgot to add to makefile. Makefile.am: something weird with auto .in substitution. 2010-11-30 rocky * command/set.sh, test/data/Makefile.am, test/data/multi1.cmd, test/data/multi1.right, test/data/multi2.cmd, test/data/multi2.right, test/data/multi3.cmd, test/data/multi3.right, test/data/multi4.right, test/example/Makefile.am, test/example/multi.sh, test/integration/Makefile.am, test/integration/check-common.sh.in, test/integration/test-multi: Add subshell test from bashdb. 2010-11-30 rocky * test/integration/check-common.sh.in: Administivia: Allow more possibilities for building outside of source dir. Sync with bashdb. 2010-11-30 rocky * ChangeLog, configure.ac, test/integration/check-common.sh.in: check-common.sh.in: generalize a little more. configure.ac: .git.tar.{bz2,gz} -> .dev.tar.{bz2} 2010-11-29 rocky * command/list.sh, dbg-opts.sh, lib/list.sh, test/data/frame.right, zshdb.in: Adjust columns in "help *" for initial blanks in list. Sync with bashdb. 2010-11-27 rocky * test/data/frame.right, zshdb.in: Erroneously had removed @prefix@ needed by @PACKAGEDATADIR@ in zshdb.in 2010-11-27 rocky * : commit 6be62015ab7c011e307c987af21f2d7d266a0029 Author: rocky Date: Sat Nov 27 17:58:51 2010 -0500 2010-11-26 rocky * command/return.sh, dbg-main.sh: dbg-main.sh: Combine two for loops. return.sh: remove set -x 2010-11-26 rocky * test/data/frame.right: zshdb.in: one more extraneous line removed. 2010-11-26 rocky * zshdb.in: zshdb.in: one more extraneous line removed. 2010-11-26 rocky * zshdb.in: Go over and comment better. 2010-11-24 rocky * lib/frame.sh, lib/list.sh, lib/save-restore.sh: list now lists where it last left off. Keep in sync with bashdb. 2010-11-23 rocky * ChangeLog, configure.ac, test/integration/test-restart.in: Make "distcheck work". configure.ac: remove emacs lispdir check 2010-11-23 rocky * dbg-main.sh: More --no-init bugs found/fixed. 2010-11-23 rocky * lib/help.sh: Uuse more accurate variable name. 2010-11-23 rocky * command/backtrace.sh, command/break.sh, command/continue.sh, command/down.sh, command/edit.sh, command/help.sh, command/up.sh: edit.sh: fix return codes. rest: sync with bashdb. 2010-11-22 rocky * lib/help.sh, lib/processor.sh, test/data/restart.right: Better sync with bashdb. 2010-11-16 rocky * test/data/restart.right: Adjust test case for recent changes 2010-11-16 rocky * command/Makefile.am, command/alias.sh, command/backtrace.sh, command/break.sh, command/condition.sh, command/continue.sh, command/delete.sh, command/disable.sh, command/down.sh, command/edit.sh, command/enable.sh, command/eval.sh, command/examine.sh, command/frame.sh, command/help.sh, command/info.sh, command/kill.sh, command/list.sh, command/quit.sh, command/return.sh, command/run.sh, command/set.sh, command/show.sh, command/source.sh, command/stepping.sh, command/trace.sh, command/up.sh, lib/alias.sh, lib/help.sh, lib/processor.sh, test/data/action.right, test/data/bug-args.right, test/data/bug-ksharrays.right, test/data/bugIFS.right, test/data/enable.right, test/data/examine.right, test/data/frame.right, test/data/list.right, test/data/next.right, test/data/restart.right, test/data/step.right, test/data/subshell.right: Make command selection simpler and more dynamic using an associate array of commands rather than a case statement with fixed strings 2010-11-14 rocky * command/{where.sh => backtrace.sh}, command/{tracefn.sh => trace.sh}: Simplify, shorten and generalize command-selection code using an associative array for command selection rather than a case statement. 2010-10-31 rocky * Makefile.am, configure.ac, emacs/.gitignore, emacs/Makefile.am, emacs/dbg-test.el.in, emacs/elk-test.el, emacs/zshdb.el: Remove emacs code. If you want run from Emacs, please use emacs-dbgr. See http://github.com/rocky/emacs-dbgr 2010-10-31 rocky * lib/Makefile.am: Administrivia: Forgot to add lib/display.sh 2010-10-29 rocky * README: We've got more done now. 2010-10-29 rocky * command/display.sh, command/info.sh, command/info_sub/display.sh, command/undisplay.sh, configure.ac, lib/display.sh, lib/msg.sh, lib/processor.sh, test/data/Makefile.am, test/data/display.cmd, test/data/display.right, test/integration/.gitignore, test/integration/test-display.in: Add display expressions. Debugger cmmands "display", "undisplay" and "info display". 2010-10-27 rocky * configure.ac: Update version in prepration for release. 2010-10-26 rocky * NEWS: What's up 2010-10-25 rocky * configure.ac, test/example/Makefile.am, test/example/restart.sh, test/example/restart.sh.in, test/integration/test-opts.in: Gaurd against building when zsh is in a funny place and names something other than a plain "zsh". 2010-10-25 rocky * ChangeLog, command/set.sh, command/set_sub/annotate.sh, command/set_sub/showcommand.sh, command/set_sub/trace-commands.sh, command/show.sh: Sync with bashdb. Variable names more regular and small stuff like that. 2010-10-25 rocky * ChangeLog, command/set_sub/Makefile.am: Forgot to add a listsize to distribution 2010-10-25 rocky * command/list.sh, command/set.sh, command/set_sub/Makefile.am, command/set_sub/annotate.sh, command/set_sub/args.sh, command/set_sub/autolist.sh, command/set_sub/history.sh, command/set_sub/linetrace.sh, command/set_sub/linewidth.sh, command/set_sub/listsize.sh, command/set_sub/showcommand.sh, command/set_sub/trace-commands.sh, command/show.sh, lib/gdb.sh, lib/list.sh, test/data/setshow.right: Move pretty much the rest of the set subcommands to the set_sub directory. Go over code to be more regular. 2010-10-25 rocky * lib/filecache.sh: test-delete Was giving an warning in cygwin's zsh. Fix that. Sync with bashdb. 2010-10-24 rocky * NEWS: What's up. 2010-10-24 rocky * command/set_sub/Makefile.am: Listed wrong subdirectory. 2010-10-24 rocky * ChangeLog, command/show_sub/Makefile.am, lib/Makefile.am, test/data/Makefile.am: More build administrivia. 2010-10-24 rocky * ChangeLog, command/Makefile.am, command/set.sh, command/set_sub/Makefile.am: Build Administrivia. 2010-10-24 rocky * command/set.sh, command/set_sub/.gitignore, command/set_sub/Makefile.am, command/set_sub/annotate.sh, command/set_sub/editing.sh, command/set_sub/history.sh, command/show.sh, command/show_sub/Makefile.am, command/show_sub/editing.sh, command/show_sub/history.sh, configure.ac, dbg-opts.sh, lib/file.sh, lib/processor.sh, test/unit/test-dbg-opts.sh.in, test/unit/test-file.sh.in: Move more show subcommand code into a show-subcommand directory. 2010-10-23 rocky * command/show.sh, command/show_sub/editing.sh, lib/setshow.sh: Synch with bashb. A couple of bugs found/fixed. 2010-10-23 rocky * command/frame.sh, command/set.sh, command/show.sh, command/show_sub/debugging.sh, command/where.sh, lib/setshow.sh, test/data/setshow.right, test/unit/.gitignore, test/unit/test-setshow.sh.in: More show DRY-ness. Forgot to add lib/setshow and unit test for that previously. 2010-10-23 rocky * command/examine.sh, command/info_sub/files.sh, command/run.sh, command/set.sh, command/show.sh, command/show_sub/debugging.sh, command/stepping.sh, command/tracefn.sh, configure.ac, dbg-opts.sh, dbg-pre.sh, lib/file.sh, lib/filecache.sh, lib/fns.sh, lib/frame.sh, lib/gdb.sh, lib/help.sh, lib/hook.sh, lib/processor.sh, test/unit/Makefile.am, test/unit/test-dbg-opts.sh.in, test/unit/test-file.sh.in, test/unit/test-frame.sh.in: DRY set/show code and help of some of these. 2010-10-23 rocky * README: Update README to show how to change source code to call the debugger 2010-10-22 rocky * lib/help.sh, lib/processor.sh: Remove debug output on runnign hook, and change min abbrev on "show directory" "show dir" because we now have "show different". 2010-10-22 rocky * command/set.sh, command/show.sh, test/data/action.right, test/data/delete.right, test/data/next.right, test/data/setshow.right, test/data/skip.right, test/data/step.right, test/data/subshell.right: Echo show subcommand after running an on/off set command. 2010-10-22 rocky * lib/help.sh: A small "show autolist" bug fixed. 2010-10-22 rocky * lib/help.sh: "show help" for directories was missing. 2010-10-22 rocky * NEWS, command/set.sh, command/show.sh, lib/help.sh, lib/processor.sh, test/data/setshow.right: Add set/show autolist. Add more general cmdloop hook mechanism. 2010-10-11 rocky * test/unit/test-filecache.sh.in, test/unit/test-get-sourceline.sh.in: Small changes. 2010-10-11 rocky * command/info_sub/files.sh, configure.ac, lib/filecache.sh, test/example/dir with spaces/bug.sh, test/unit/.gitignore, test/unit/Makefile.am, test/unit/test-filecache.sh.in, test/unit/test-get-sourceline.sh.in: Make sure we can debug filenames whose path has a space one of its directory names. That was the case before but we've added a test and did made changes to make more compatible with bash. filecache.sh: silence zmodload message. 2010-09-16 rocky * ChangeLog, lib/file.sh, lib/filecache.sh: Set cdir properly. More-specific internal-error messages. (Keeping in synch with bashdb). 2010-07-30 R. Bernstein * command/info.sh, command/info_sub/brkpts.sh, command/info_sub/files.sh, command/info_sub/line.sh, command/info_sub/program.sh, command/info_sub/source.sh, command/info_sub/variables.sh, command/info_sub/warranty.sh, command/show.sh, command/show_sub/alias.sh, command/show_sub/copying.sh, command/show_sub/editing.sh: bashdb -> zshdb 2010-07-30 R. Bernstein * configure.ac, dbg-pre.sh: Smallish things to help keep in synch with zshdb. 2010-07-10 rocky * command/show.sh, command/show_sub/.gitignore, command/show_sub/Makefile.am, command/show_sub/alias.sh, command/show_sub/copying.sh, command/show_sub/debugging.sh: Move more "show" subcommands into a "show subcommand" directory. 2010-07-10 rocky * command/Makefile.am, command/break.sh, command/info.sh, command/info_sub/.gitignore, command/info_sub/Makefile.am, command/info_sub/brkpts.sh, command/info_sub/files.sh, command/info_sub/line.sh, command/info_sub/program.sh, command/info_sub/source.sh, command/info_sub/variables.sh, command/info_sub/warranty.sh, command/show.sh, command/show_sub/.gitignore, command/show_sub/Makefile.am, command/show_sub/alias.sh, configure.ac, lib/gdb.sh, lib/processor.sh, test/data/enable.right: Move "info" subcommands for into its own folder. Start the same with "show" subcommands. "info program" now show command next up. 2010-07-08 rocky * dbg-main.sh: use ~ for debugger startup of $HOME is not set. 2010-07-06 R. Bernstein * command/down.sh, command/frame.sh, command/up.sh, command/where.sh, lib/frame.sh, test/data/frame.right, test/unit/test-frame.sh.in: DRY frame code to move common location printing to adjust_frame. 2010-07-06 R. Bernstein * command/Makefile.am, command/down.sh, command/frame.sh, command/up.sh: Split off debugger "up" and "down" commands. Update help text. 2010-07-01 rocky * lib/frame.sh: Even better ksh conformance. 2010-07-01 rocky * : commit f77d1d642186cfca51d7272777bd1e66f2e8559a Author: rocky Date: Thu Jul 1 00:53:19 2010 -0400 2010-06-21 R. Bernstein * command/action.sh, command/kill.sh, lib/action.sh, test/data/action.cmd, test/data/action.right: Fix prompt on deleting all actions. Test it and better checks. 2010-06-21 R. Bernstein * lib/hook.sh: Closer synchronization with bashdb. 2010-06-21 R. Bernstein * command/action.sh, lib/action.sh, test/unit/test-action.sh.in: Small improvements and changes to keep in sync with bashdb. 2010-06-20 R. Bernstein * NEWS: What's up 2010-06-20 rocky * ChangeLog, configure.ac: Update version number 2010-06-20 rocky * command/Makefile.am, command/action.sh, command/alias.sh, configure.ac, dbg-opts.sh, lib/action.sh, lib/hook.sh, lib/processor.sh, test/data/action.cmd, test/data/action.right, test/data/brkpt1.right, test/integration/.gitignore, test/integration/Makefile.am, test/integration/test-action.in, test/unit/test-action.sh.in: Actton command is now implemented sort of as it is in bash. 2010-06-20 rocky * lib/action.sh, test/unit/test-action.sh.in: Add function arg validation on _Dbg_do_clear_action 2010-06-20 rocky * lib/action.sh, test/unit/test-action.sh.in: More work on implementing action. Much more work to go. 2010-06-20 rocky * lib/break.sh: Add another use of _Dbg_is_int. 2010-06-20 rocky * lib/action.sh, lib/break.sh, test/unit/test-break.sh.in, test/unit/test-validate.sh.in: Small improvments like validiating in params and comment fixes. 2010-06-20 rocky * lib/action.sh, test/unit/test-action.sh.in: Bang more on action. More bugs found, more tests added. 2010-06-20 rocky * configure.ac, lib/Makefile.am, lib/action.sh, lib/fns.sh, lib/validate.sh, test/unit/.gitignore, test/unit/Makefile.am, test/unit/test-action.sh.in, test/unit/test-examine.sh.in, test/unit/test-fns.sh.in, test/unit/test-validate.sh.in: input validation routines split off from fns.sh. Start action testing. 2010-06-19 rocky * lib/Makefile.am: One more file. 2010-06-19 rocky * lib/action.sh, lib/fns.sh, test/unit/test-fns.sh.in: Start action. test parse_linespec. 2010-06-18 rocky * lib/hook.sh: filename vs. full_filename - this time for sure! 2010-06-18 rocky * lib/hook.sh: Code inspection reveal what smells like a bug. fullname -> full_filename and filename -> full_filename. 2010-06-16 rocky * lib/frame.sh, lib/list.sh: Small changes to keep in sync with bashdb and possible a bug fix due to a variable name typo. 2010-06-16 rocky * lib/break.sh: Indentation style is default shell now 2010-06-16 rocky * test/unit/test-filecache.sh.in: Load possibly used file in unit test 2010-06-16 rocky * lib/file.sh: Cosmetic changes 2010-06-16 rocky * lib/filecache.sh: Comment spelling typo 2010-06-16 rocky * lib/filecache.sh, test/integration/test-brkpt1: filecache.sh: variable _Dbg_bogus_file was not initialized. test-brkpt1: file is derived. 2010-02-12 rocky * doc/Makefile.am: Perhaps a better clean target 2010-02-12 rocky * ChangeLog, doc/Makefile.am, test/Makefile.am: make distcheck (building outside of source tree) should now work. 2010-01-02 rocky * command/break.sh: Fix bug in running a simple "break" command. 2010-01-02 rocky * test/integration/.gitignore, test/integration/test-bug-args, test/integration/test-bug-errexit, test/integration/test-bug-ksharrays, test/integration/test-bugIFS, test/integration/test-condition, test/integration/test-delete, test/integration/test-enable, test/integration/test-examine, test/integration/test-frame, test/integration/test-list, test/integration/test-next, test/integration/test-opts, test/integration/test-restart, test/integration/test-setshow, test/integration/test-skip, test/integration/test-step, test/integration/test-subshell, test/integration/test-tbreak: command/break.sh: unnecessary guard test but keeps in sync with kshdb. test/integration/test-*: these are auto generated. 2009-12-22 rocky * : commit 51bf2104f0a4d5d39dbb0dab63ab2f07f5c47521 Author: rocky Date: Tue Dec 22 13:09:45 2009 +0100 2009-12-18 rocky * : commit 417ee0a3cd5392cfcd41f9d109af4f3ef49e2b9b Author: Rocky Bernstein (VCDImager Developer) Date: Fri Dec 18 23:44:28 2009 +0100 2009-10-27 rocky * ChangeLog, NEWS, configure.ac: Get ready for release 0.04. 2009-10-23 R. Bernstein * NEWS: NEWS preening 2009-10-23 rocky * : commit 12071f882c391dda96787dfc85fa90f09e5e43c0 Author: rocky Date: Fri Oct 23 13:12:01 2009 -0400 2009-10-23 R. Bernstein * dbg-main.sh, emacs/zshdb.el: dbg-main.sh: Change another debugger variable to be prefaced with _Dbg_ zshdb.el: Remove compile warnings. 2009-09-24 rocky * command/break.sh: Misplaced quotes. 2009-09-21 R. Bernstein * command/break.sh, lib/break.sh, lib/filecache.sh, lib/fns.sh, test/data/file with spaces.cmd, test/data/file with spaces.right, test/example/file with spaces.sh, test/integration/check-common.sh.in, test/integration/test-file-with-spaces: Handling of files with embedded blanks works better. More filename quoting in "info break" Still one bug in _Dbg_glob_filename remains. 2009-09-21 rocky * test/unit/test-file.sh.in: Some more (better?) file globbing tests 2009-09-20 rocky * command/info.sh, command/list.sh, command/run.sh, dbg-pre.sh, lib/filecache.sh, lib/fns.sh, zshdb.in: Better tolerance for files with embedded blanks. Not perfect yet though. Need to redo parse_linespec. 2009-09-20 rocky * command/break.sh, lib/file.sh, lib/filecache.sh, lib/fns.sh, lib/list.sh, test/data/list.right: Make sure to quote filenames in argment passing so as to be able to handle files with embedded blanks. Keep in sync with kshdb and bashdb. 2009-08-21 R. Bernstein * NEWS, dbg-opts.sh: Small changes to dbg-opts to Keep in sync with bashdb and kshdb 2009-07-04 R. Bernstein * configure.ac: Get ready for 0.03 release 2009-07-04 R. Bernstein * : commit 827a95a17d7c1c95d7a6dcb64bae6fd394550c10 Merge: 58bd4e2 fbabb4e Author: rocky Date: Tue Jun 30 22:45:49 2009 -0400 2009-06-30 rocky * configure.ac, test/integration/Makefile.am, test/integration/test-brkpt1.in, test/integration/test-bug-args.in, test/integration/test-bug-errexit.in, test/integration/test-bug-ksharrays.in, test/integration/test-bugIFS.in, test/integration/test-condition.in, test/integration/test-delete.in, test/integration/test-enable.in, test/integration/test-examine.in, test/integration/test-frame.in, test/integration/test-list.in, test/integration/test-next.in, test/integration/test-opts.in, test/integration/test-restart.in, test/integration/test-setshow.in, test/integration/test-skip.in, test/integration/test-step.in, test/integration/test-subshell.in, test/integration/test-tbreak.in: Need to add name of shell into integration tests. "make check" doesn't seem to have a provision for this. 2009-06-30 R. Bernstein * : commit 7a005d3f607e79ff0883c679bed5e416ecc7a615 Merge: 6a53924 8c19920 Author: R. Bernstein Date: Tue Jun 30 10:38:16 2009 -0400 2009-06-30 R. Bernstein * ChangeLog, NEWS: Remove in preparation for release on July 4th. 2009-06-24 rocky * test/zsh/ok4zshdb.sh: Remove (erroneous) Debian lintian error. 2009-06-23 R. Bernstein * command/break.sh, lib/processor.sh: Wrong condition test for breakpoint number parsing. 2009-06-23 R. Bernstein * command/condition.sh, test/data/condition.right: Now that we added condition, why not go over it to make it better (and more correct). 2009-06-23 R. Bernstein * command/Makefile.am, command/condition.sh, lib/break.sh, lib/processor.sh, test/data/Makefile.am, test/data/brkpt1.cmd, test/data/brkpt1.right, test/data/condition.cmd, test/data/condition.right, test/data/lopts.right, test/integration/Makefile.am, test/integration/test-condition: Add "condition" command and integration test. Correct option output. 2009-06-22 R. Bernstein * doc/zshdb-man.pod: Small doc changes. 2009-06-22 R. Bernstein * doc/Makefile.am: Administrivia - More common and general wrt other debuggers 2009-06-22 R. Bernstein * doc/zshdb-man.pod: Minor doc change 2009-06-22 R. Bernstein * ChangeLog, Makefile.am, configure.ac, dbg-opts.sh, doc/.gitignore, doc/Makefile.am, test/example/dbg-test2.sh: Start adding doc. In particular start with a manual page. 2009-06-22 R. Bernstein * doc/.gitignore, doc/Makefile.am, doc/zshdb-man.pod: Start writing documentation. In particular, a manual page. 2009-06-19 R. Bernstein * README: Revise as appropriate 2009-06-19 rocky * dbg-main.sh, lib/processor.sh: Add _Dbg_DEBUGGER_LEVEL in advance of "debug" command. 2009-06-18 rocky * dbg-pre.sh: See previous commit 2009-06-18 rocky * command/info.sh, dbg-pre.sh, lib/hook.sh, lib/save-restore.sh: Clean up code with respect to setting current breakpoint number 2009-06-18 rocky * test/data/enable.cmd, test/data/enable.right: Add "info program" check 2009-06-18 rocky * lib/hook.sh: More precise breakpoint reason in "info program" 2009-06-15 rocky * test/integration/check-common.sh.in: Make sure srcdir is set in integration tests 2009-06-15 rocky * lib/msg.sh: Typo: while ; -> while : 2009-06-14 rocky * dbg-main.sh, dbg-opts.sh: Deal with tty weirdness. Probably this won't be the last of it. Update copyright. 2009-06-14 rocky * command/kill.sh, lib/msg.sh, lib/processor.sh, lib/save-restore.sh: Add debugger kill command. Add library routine confirm() to prompt before doing dangerous commands like "kill". 2009-06-14 rocky * configure.ac, test/integration/Makefile.am, test/integration/test-restart, test/unit/test-filecache.sh.in: In 0.03git territory now. Make "make distcheck" work. 2009-06-13 R. Bernstein * configure.ac, test/unit/Makefile.am, test/unit/test-examine.sh.in: Add unit test for examine. 2009-06-13 R. Bernstein * configure.ac, lib/msg.sh, test/unit/.gitignore, test/unit/Makefile.am, test/unit/test-break.sh.in, test/unit/test-msg.sh.in: Add test/unit/msg of lib/msg and fix bugs in the latter. Other small bugs fixed and some alignment with kshdb. 2009-06-11 R. Bernstein * lib/break.sh, lib/msg.sh, lib/processor.sh, test/data/setshow.right: break.sh: Start using function form to match ksh processor.sh, msg.sh: use common undefined-command routine. 2008-12-12 R. Bernstein * command/frame.sh, lib/help.sh: Update help for frame and set inferior-tty 2008-12-12 R. Bernstein * lib/tty.sh: Clarify use of redirection on open and close. 2008-12-11 R. Bernstein * command/source.sh, lib/tty.sh: Small changes 2008-12-11 R. Bernstein * lib/processor.sh, lib/tty.sh, test/unit/test-tty.sh.in: Yet another iteration of dealing with inferior ttys. 2008-12-11 R. Bernstein * lib/tty.sh: tty-testing code along the lines suggested by David Korn. 2008-12-10 R. Bernstein * lib/tty.sh, test/unit/test-tty.sh.in: Use the terminal test suggested by Stéphane Chazelas 2008-12-10 R. Bernstein * lib/msg.sh, lib/tty.sh: No space around <> to be ksh compatible 2008-12-09 R. Bernstein * lib/tty.sh: Possibly better for redirecting stdin/stdout 2008-12-08 R. Bernstein * command/set.sh, configure.ac, dbg-main.sh, dbg-opts.sh, lib/Makefile.am, lib/help.sh, lib/tty.sh, test/data/lopts.right, test/unit/.gitignore, test/unit/Makefile.am, test/unit/test-tty.sh.in: Stab at set-inferior-tty. Output redirection is okay, but input redirection doesn't work. 2008-11-17 R. Bernstein * .gitignore: Administrivia 2008-11-15 R. Bernstein * ChangeLog, Makefile.am, NEWS: Makefile.am: create ChangeLog. More preparation for 0.02 release. 2008-11-15 R. Bernstein * command/continue.sh, command/where.sh, lib/fns.sh: Sync with kshdb. 2008-11-15 R. Bernstein * command/break.sh, command/disable.sh, command/edit.sh, command/examine.sh, command/help.sh, configure.ac: Synch up with bashdb. Get ready for release. 2008-11-08 R. Bernstein * lib/break.sh: Sync with bashdb. 2008-11-06 R. Bernstein * : commit 694574abe5fbcd4d60717ec0f2f1655868ce10ba Author: R. Bernstein Date: Thu Nov 6 12:36:23 2008 -0500 2008-11-06 R. Bernstein * command/break.sh, command/continue.sh, lib/break.sh, lib/hook.sh: Minor tweaks. Synch with kshdb. 2008-11-06 R. Bernstein * lib/break.sh, test/unit/test-break.sh.in: Minor tweaks 2008-11-06 R. Bernstein * configure.ac: Hey, we're in 0.02 territory now. 2008-11-06 R. Bernstein * lib/break.sh, test/unit/test-break.sh.in: More breakpoint tests added; more breakpoint bugs fixed 2008-11-05 R. Bernstein * lib/break.sh, test/data/enable.right, test/unit/test-break.sh.in: More tests of breakpoint code, more bugs found. 2008-11-04 R. Bernstein * lib/break.sh, test/unit/test-break.sh.in: More break set/unset tests 2008-11-04 R. Bernstein * configure.ac, dbg-opts.sh, lib/break.sh, test/unit/.gitignore, test/unit/Makefile.am, test/unit/test-break.sh.in: Bugs in clearing breakpoint by file/line. Add a breakpoint unit test. 2008-11-02 R. Bernstein * emacs/zshdb.el, lib/break.sh: Add more parameter checking; journal more. Mostly minor changes. 2008-10-30 R. Bernstein * dbg-opts.sh: Minor comment typo 2008-10-30 R. Bernstein * test/data/frame.right: Line number plox 2008-10-30 R. Bernstein * command/show.sh, configure.ac, dbg-opts.sh, dbg-pre.sh, test/unit/.gitignore, test/unit/Makefile.am, test/unit/test-pre.sh.in, zshdb.in: Fix bugs in --version and "show version" 2008-10-27 R. Bernstein * configure.ac: Release 0.01 2008-10-25 R. Bernstein * Makefile.am: Create distribution tar.bz2 as well as tar.gz 2008-10-21 R. Bernstein * test/zsh/ok4zshdb.sh: Use dev2 2008-10-20 R. Bernstein * : commit 3443a3d0e318cce080cda8cd3d86e0cde8971736 Author: R. Bernstein Date: Sat Oct 18 13:03:59 2008 -0400 2008-10-18 R. Bernstein * configure.ac: Correct Emacs disabling 2008-10-17 R. Bernstein * test/example/Makefile.am: Add restart files 2008-10-17 R. Bernstein * test/data/Makefile.am: Add restart files 2008-10-15 R. Bernstein * Makefile.am: Make more like kshdb and bashdb. 2008-10-14 R. Bernstein * test/unit/test-fns.sh.in: Reinstate a double-quote test 2008-10-14 R. Bernstein * configure.ac: Require Emacs 22 or better 2008-10-14 R. Bernstein * dbg-pre.sh, test/data/restart.cmd, test/data/restart.right, test/data/restart2.cmd, test/example/restart.sh, test/integration/Makefile.am, test/integration/test-restart: Add restart regression test. 2008-10-13 R. Bernstein * dbg-opts.sh: print -> echo 2008-10-13 R. Bernstein * dbg-opts.sh, test/data/lopts.right: Usage typo. 2008-10-13 R. Bernstein * test/data/frame.right: Sync up 2008-10-13 R. Bernstein * : I hate failed merges 2008-10-13 R. Bernstein * dbg-opts.sh, lib/hook.sh, test/data/frame.right, test/data/lopts.right, zshdb.in: Add --command or -c option. 2008-10-10 R. Bernstein * test/data/frame.right, test/unit/shunit2, test/unit/test-filecache.sh.in, test/zsh/ok4zshdb.sh: Bump zsh verseion test. Update shunit2 to latest code. Add unit test for _Dbg_check_line. 2008-10-10 R. Bernstein * lib/break.sh, test/data/frame.right: Synch with kshdb - minor changes. 2008-10-09 R. Bernstein * lib/fns.sh, test/data/frame.right: Fix list bug when frames are moved. 2008-10-09 R. Bernstein * lib/fns.sh: Minor changes 2008-10-09 R. Bernstein * command/list.sh, lib/break.sh, lib/filecache.sh, lib/fns.sh, test/data/list.right, zshdb.in: Remove temporary default testing.sh script. Some other minor changes. 2008-10-09 R. Bernstein * command/tracefn.sh, lib/fns.sh, test/unit/test-fns.sh.in: Lame attempt at tracing aliases. 2008-10-08 R. Bernstein * : commit 1087d1e535e05237cc92f71a8b76cf5bdf6dc35a Author: R. Bernstein Date: Wed Oct 8 21:16:56 2008 -0400 2008-10-08 R. Bernstein * command/eval.sh, command/info.sh, lib/info.sh: Small "info var" bugs. 2008-10-08 R. Bernstein * lib/processor.sh, test/data/Makefile.am, test/data/frame.right, test/data/subshell.cmd, test/data/subshell.right, test/example/Makefile.am, test/example/subshell.sh, test/integration/Makefile.am, test/integration/test-subshell: Add subshell test. Fix bug in saving commands on history only after subshell return. 2008-10-02 R. Bernstein * lib/filecache.sh, lib/help.sh, lib/save-restore.sh: Code sync with kshdb 2008-10-02 R. Bernstein * test/data/frame.right: Administrivia 2008-10-02 R. Bernstein * command/set.sh, test/example/hanoi.sh.in: Small bugfixes 2008-10-01 R. Bernstein * dbg-opts.sh: Better handling of erroneous options. 2008-10-01 R. Bernstein * command/run.sh, dbg-opts.sh, dbg-pre.sh: Add exports to some global debugger variables that need it 2008-10-01 R. Bernstein * command/quit.sh, command/return.sh, lib/dbg-call.sh, lib/hook.sh, lib/processor.sh, zshdb.in: Document quit and return commands better. Small cleanups. 2008-10-01 R. Bernstein * test/data/frame.right: Administrivia - the cost of doing tests this way. 2008-10-01 R. Bernstein * : commit a6383c2924b3bc577a6c9cce4db110ea76b243ad Author: R. Bernstein Date: Wed Oct 1 11:38:07 2008 -0400 2008-09-30 R. Bernstein * dbg-opts.sh, dbg-pre.sh, zshdb.in: Cross debugger fixes and other small things 2008-09-30 R. Bernstein * lib/processor.sh, test/example/subshell.sh: Fix bug in not exporting file descriptor used in eval/print output. Thanks to Peter Stephenson for focusing my attention on the problem 2008-09-29 R. Bernstein * Makefile.am, dbg-opts.sh: Minor changes. 2008-09-29 R. Bernstein * test/unit/test-dbg-opts.sh.in: Test of no options. 2008-09-29 R. Bernstein * AUTHORS, Makefile.am, THANKS, configure.ac, dbg-main.sh, dbg-opts.sh, dbg-pre.sh, getopt-test.sh, getopts_long.sh, test/unit/.gitignore, test/unit/Makefile.am, test/unit/shunit2, test/unit/test-columns.sh.in, test/unit/test-dbg-opts.sh.in: Convert options processing to getopts_long by Stéphane Chazelas. Thanks Stéphane! 2008-09-28 R. Bernstein * command/eval.sh, configure.ac, lib/processor.sh: Minor small bug fixes and tweaks. 2008-09-27 R. Bernstein * test/example/hanoi.sh.in, test/integration/test-frame, test/integration/test-opts: Skip some integration tests when building outside of source. 2008-09-27 R. Bernstein * command/Makefile.am, test/integration/test-opts, test/unit/shunit2, test/unit/test-filecache.sh.in: Fixes for build outside of source tree. 2008-09-27 R. Bernstein * test/unit/shunit2, test/unit/test-filecache.sh.in: Start to add descriptions to asserts. Update shunit2. 2008-09-26 R. Bernstein * test/unit/test-alias.sh.in, test/unit/test-columns.sh.in, test/unit/test-file.sh.in, test/unit/test-filecache.sh.in, test/unit/test-fns.sh.in, test/unit/test-frame.sh.in, test/unit/test-journal.sh.in, test/unit/test-run.sh.in, test/unit/test-save-restore.sh.in, test/unit/test-sort.sh.in: Facilitate build outside of source tree as per observation of Clint Adams. 2008-09-26 R. Bernstein * configure.ac: Remove test for long options processing; zshdb uses zparseopt. Thanks to Clint Adams. 2008-09-26 R. Bernstein * Makefile.am, configure.ac, dbg-trace.sh.in, lib/hook.sh: Don't run Emacs testing if no Emacs (Clint Adams). Remove stray debugging print. 2008-09-26 R. Bernstein * lib/hook.sh, test/example/subshell.sh: Start subshell testing. 2008-09-25 R. Bernstein * lib/help.sh: Add "show commands" to help show and tweak text a little. 2008-09-25 R. Bernstein * test/data/lopts.right: Clean up help text 2008-09-25 R. Bernstein * dbg-opts.sh: Clean up help text. 2008-09-25 R. Bernstein * configure.ac, test/zsh/Makefile.am, test/zsh/ok4zshdb.sh, test/zsh/ok4zshdb2.sh, test/zsh/ok4zshdb3.sh: More stringent zsh test and correct --with-zsh option. 2008-09-25 R. Bernstein * lib/list.sh: Edit of wrong file. 2008-09-25 R. Bernstein * command/list.sh, lib/list.sh, lib/processor.sh, test/data/list.cmd, test/data/list.right, test/integration/test-setshow: Small "list" command fixes. 2008-09-25 R. Bernstein * command/list.sh, lib/frame.sh, lib/list.sh, lib/processor.sh, test/data/Makefile.am, test/data/list.cmd, test/data/list.right, test/integration/Makefile.am, test/integration/test-list: Work on list command and add integration test. 2008-09-24 R. Bernstein * command/quit.sh, command/run.sh, lib/hook.sh, lib/save-restore.sh: Regularize variables names. 2008-09-24 R. Bernstein * command/quit.sh, command/run.sh, lib/hook.sh, lib/save-restore.sh: Work on quit and restart in the face of being inside a subshell. 2008-09-24 R. Bernstein * command/eval.sh, lib/journal.sh, lib/msg.sh, lib/processor.sh, lib/save-restore.sh, test/unit/test-fns.sh.in, test/unit/test-save-restore.sh.in, zshdb.in: Get journaled values back into parent shells. eval sets return code properly and we output errors to debugger terminal 2008-09-24 R. Bernstein * lib/gdb.sh, lib/msg.sh: Debugger output should go to debugger file descriptor output not debugged program output. Not perfect here, but more correct. 2008-09-24 R. Bernstein * command/set.sh, dbg-opts.sh, lib/processor.sh, test/data/setshow.right: Work on "annotate" mode. 2008-09-24 R. Bernstein * lib/fns.sh: Simplify (and is probably more correct) 2008-09-23 R. Bernstein * command/info.sh, command/show.sh, lib/info.sh: More minor changes 2008-09-23 R. Bernstein * lib/gdb.sh, lib/help.sh: Minor changes 2008-09-22 R. Bernstein * command/set.sh, dbg-trace.sh.in, lib/frame.sh, lib/gdb.sh, lib/hist.sh, lib/hook.sh, lib/processor.sh, lib/save-restore.sh, test/data/frame.right, zshdb.in: Go back to non-interactive from the start. Reduce debugger global/local pollution. 2008-09-22 R. Bernstein * command/help.sh, command/info.sh, command/show.sh, lib/fns.sh, lib/list.sh, lib/processor.sh: Small changes 2008-09-22 R. Bernstein * command/info.sh: DRY. 2008-09-22 R. Bernstein * command/show.sh, lib/list.sh, test/data/setshow.right: Minor changes. 2008-09-21 R. Bernstein * command/set.sh, command/show.sh, lib/hist.sh: Work on saving history to a file. 2008-09-21 R. Bernstein * command/info.sh, command/list.sh, dbg-main.sh, dbg-opts.sh, lib/list.sh, lib/processor.sh, test/integration/check-common.sh.in, test/integration/lopts.tests, test/integration/sopts.tests: .zshdbrc works now (with one bug). Move option variables to _Dbg_ space. Add --no-init to tests 2008-09-20 R. Bernstein * lib/save-restore.sh, test/data/Makefile.am, test/data/bug-ksharrays.cmd, test/data/bug-ksharrays.right, test/example/Makefile.am, test/example/bug-ksharrays.sh, test/integration/Makefile.am, test/integration/test-bug-ksharrays: Bug in restoring ksharray option inside debugger "eval". 2008-09-20 R. Bernstein * command/help.sh: DRY 2008-09-20 R. Bernstein * command/show.sh, lib/Makefile.am, lib/columns.sh, lib/list.sh, test/unit/test-columns.sh.in: Fix bug in columnize. Remove hoakiness in working around that bug. 2008-09-20 R. Bernstein * command/info.sh, command/list.sh, lib/columns.sh, lib/fns.sh, lib/hist.sh, lib/hook.sh, lib/info.sh, lib/list.sh, lib/save-restore.sh: Add lots of "info var" attributes and place "info fun" under that. More with "info source" 2008-09-20 R. Bernstein * command/show.sh, dbg-main.sh, lib/hist.sh, lib/hook.sh, lib/processor.sh, test/data/setshow.right, zshdb.in: Bang on debugger history. 2008-09-20 R. Bernstein * lib/filecache.sh, lib/fns.sh: Add patterns "info functions" 2008-09-20 R. Bernstein * lib/filecache.sh: DRY filecache.sh code 2008-09-20 R. Bernstein * lib/filecache.sh: Take into account last line w/o carriage return 2008-09-19 R. Bernstein * command/info.sh, command/list.sh, command/tracefn.sh, dbg-opts.sh, lib/fns.sh, lib/info.sh: Add "info functions" via "typeset -fp". Redo trace via va "typeset -ft". 2008-09-19 R. Bernstein * lib/hook.sh, test/integration/test-examine, test/unit/test-filecache.sh.in: More of the same. emulation save/restore. A testing bug fixed. 2008-09-19 R. Bernstein * lib/frame.sh, lib/hook.sh: Attempt again to deal with breakage caused by emulation. I don't understand what's going on but this seems to help. 2008-09-19 R. Bernstein * lib/frame.sh: ksharrays seems to get unset. Punt for now. 2008-09-19 R. Bernstein * lib/filecache.sh, test/data/brkpt1.right, test/unit/test-filecache.sh.in: Read in blank lines in file correctly. Thanks to Peter Stephenson and Bart Schaefer. 2008-09-19 R. Bernstein * command/list.sh, lib/frame.sh, lib/hook.sh, lib/list.sh, test/unit/test-journal.sh.in: Variable name consistency 2008-09-18 R. Bernstein * command/list.sh, lib/filecache.sh, lib/frame.sh, lib/list.sh, lib/processor.sh, test/unit/test-filecache.sh.in, test/unit/test-frame.sh.in: Remove some bugs in the "list" command. 2008-09-18 R. Bernstein * command/Makefile.am, command/list.sh, lib/Makefile.am, lib/filecache.sh, lib/list.sh, lib/processor.sh: Start "list" command. 2008-09-18 R. Bernstein * command/info.sh, dbg-main.sh, lib/Makefile.am, lib/filecache.sh, lib/hist.sh, lib/processor.sh, test/data/brkpt1.cmd, test/data/brkpt1.right, test/unit/test-filecache.sh.in: Save file lines. Therefore we now check if breakpoint line numbers are beyond the end of file. Thanks to Bart Schaefer. 2008-09-17 R. Bernstein * command/info.sh, command/set.sh, command/show.sh, dbg-main.sh, lib/file.sh, lib/filecache.sh, lib/hook.sh, lib/save-restore.sh, test/data/frame.right, test/data/setshow.right: "info files" shows list of files seen. Some work towards saving history. Generalize .zshdbrc vi _Dbg_debugger_name. 2008-09-17 R. Bernstein * command/break.sh, lib/file.sh, lib/filecache.sh, lib/save-restore.sh, zshdb.in: Bugs: in setting cwd which changes unqualified file names (but that had its own additional bug); setting condition (not used yet even if it is a bug). Use newer PS4 %x:%I which has bugs of its own which I need to report. 2008-09-17 R. Bernstein * lib/save-restore.sh: Minor cleanup. 2008-09-17 R. Bernstein * lib/hook.sh, lib/save-restore.sh, test/unit/test-save-restore.sh.in: save/restore environment cleanup. 2008-09-17 R. Bernstein * command/show.sh, lib/fns.sh, lib/frame.sh, lib/hook.sh, lib/processor.sh, lib/save-restore.sh, test/unit/test-save-restore.sh.in: Need to save options to "set" as well as "unset". Some slight cleanup here as well. 2008-09-16 R. Bernstein * lib/hook.sh, lib/save-restore.sh, test/data/Makefile.am, test/data/examine.cmd, test/data/examine.right, test/example/Makefile.am, test/example/exam.sh, test/integration/Makefile.am, test/integration/test-examine: Yet another option save/restore bug quashed (for now). Add "examine" command integration test. 2008-09-16 R. Bernstein * test/integration/check-common.sh.in, test/integration/sopts.tests, test/unit/test-columns.sh.in, test/unit/test-file.sh.in, test/unit/test-filecache.sh.in, test/unit/test-frame.sh.in, test/unit/test-journal.sh.in, test/unit/test-save-restore.sh.in, test/unit/test-sort.sh.in: Change internal PS4 setting to %x:%I. 2008-09-16 R. Bernstein * lib/hook.sh, lib/save-restore.sh: Possibly more towards a correct hook to save/restore ksharrays and opts. 2008-09-16 R. Bernstein * command/examine.sh, test/data/frame.right, test/data/lopts.right, test/integration/Makefile.am, test/integration/test-opts, test/integration/test-setshow, zshdb.in: Misc bugs and tweaks. zshdb.in: start out with initial zsh defaults. examine.sh: fake variables better. test/integration: correct test testing; add "test" and "test-integraiton" targets" 2008-09-15 R. Bernstein * lib/hook.sh, lib/save-restore.sh, test/unit/Makefile.am, test/unit/test-save-restore.sh.in: Fix bugs in saving and restoring the user settings (more) properly. 2008-09-15 R. Bernstein * test/data/Makefile.am, test/data/tbreak.cmd, test/data/tbreak.right, test/integration/Makefile.am, test/integration/test-tbreak: Add temporary break and integration test. 2008-09-15 R. Bernstein * lib/fns.sh: Use return code on declare -p. Thanks Peter! 2008-09-14 R. Bernstein * command/Makefile.am, command/examine.sh, lib/fns.sh: Small "examine" bug fixes. 2008-09-13 R. Bernstein * command/examine.sh, lib/fns.sh, lib/processor.sh, test/data/setshow.right, test/unit/test-fns.sh.in: Add examine command and defined function. Needs a little more work in edge casess though. 2008-09-13 R. Bernstein * command/break.sh, command/continue.sh, lib/break.sh, lib/hook.sh, lib/processor.sh: Add one-time breakpoint tbreak and handle one-time on "continue" as well. 2008-09-13 R. Bernstein * lib/hook.sh: Clean up hook code: add common routine, remove hacky cleanup2. 2008-09-12 R. Bernstein * command/break.sh, lib/break.sh, lib/hook.sh, test/data/Makefile.am, test/data/delete.right, test/data/enable.cmd, test/data/enable.right, test/integration/Makefile.am, test/integration/test-enable: Integration test added for enable and disable. Bugs found and fixed. 2008-09-12 R. Bernstein * command/break.sh, lib/break.sh, lib/hook.sh, test/data/delete.right: Enable/disable now do something. (Tests needed) Show breakpoint number before stopping and counts in "info break". 2008-09-11 R. Bernstein * command/Makefile.am, command/disable.sh, command/enable.sh, lib/break.sh, lib/gdb.sh, lib/hook.sh, lib/processor.sh, lib/save-restore.sh: Add enable/disable commands. More facist about setting needed zsh options. 2008-09-11 R. Bernstein * lib/filecache.sh, lib/frame.sh, lib/gdb.sh: Some bug fixing or bug avoidance. 2008-09-11 R. Bernstein * command/source.sh, lib/gdb.sh, lib/processor.sh, lib/save-restore.sh: Better way to make use of command reading and testing for interactive terminals . Thanks to Bart Schaefer. 2008-09-11 R. Bernstein * : commit d9fb9f829caa8545d55e181e1ebf3588846a25b5 Author: R. Bernstein Date: Thu Sep 11 08:52:55 2008 -0400 2008-09-10 R. Bernstein * test/data/Makefile.am, test/data/delete.cmd, test/data/delete.right, test/example/stepping.sh, test/integration/Makefile.am, test/integration/test-delete: delete (breakpoint) integration test. 2008-09-10 R. Bernstein * command/delete.sh, lib/break.sh, lib/msg.sh, lib/processor.sh, test/data/brkpt1.right, test/data/lopts.right, test/data/sopts.right: Add delete (breakpoint) command. 2008-09-09 R. Bernstein * command/break.sh, command/info.sh, lib/fns.sh, lib/frame.sh, lib/processor.sh, test/data/Makefile.am, test/data/brkpt1.cmd, test/data/brkpt1.right, test/example/Makefile.am, test/example/dbg-test1.sh, test/example/dbg-test1.sub, test/integration/Makefile.am, test/integration/check-common.sh.in, test/integration/test-brkpt1: First breakpoint regression test for the meager code we have. Lots of little bug fixes and more idiomatic usage. 2008-09-09 R. Bernstein * command/info.sh, command/show.sh, configure.ac, lib/Makefile.am, lib/sort.sh, test/data/setshow.cmd, test/data/setshow.right, test/unit/.gitignore, test/unit/Makefile.am, test/unit/test-sort.sh.in: Columnize info and show subcommand lists on error output. Add list sorting routine. 2008-09-08 R. Bernstein * command/Makefile.am, command/help.sh, command/info.sh, command/run.sh, lib/Makefile.am, lib/help.sh, lib/info.sh, lib/processor.sh: Start "info" command. 2008-09-08 R. Bernstein * configure.ac, lib/break.sh, lib/journal.sh, test/unit/.gitignore, test/unit/Makefile.am, test/unit/test-frame.sh.in, test/unit/test-journal.sh.in, test/unit/test-save-restore.sh.in: Add a basic journal test. 2008-09-06 R. Bernstein * command/break.sh, command/continue.sh, dbg-pre.sh, lib/file.sh, lib/frame.sh, lib/journal.sh, test/unit/test-file.sh.in, test/unit/test-filecache.sh.in: Add full-blown continue command. A number of other small bug fixes. 2008-09-06 R. Bernstein * command/help.sh, command/set.sh, command/show.sh, lib/gdb.sh, lib/help.sh, lib/journal.sh, test/data/setshow.cmd, test/data/setshow.right: Add command to set and show line width (set/show width). Some other minor fixes. 2008-09-05 R. Bernstein * README, command/run.sh, dbg-opts.sh, dbg-pre.sh, lib/fns.sh, lib/hook.sh, lib/journal.sh, lib/processor.sh, test/data/setshow.right, test/integration/Makefile.am, test/unit/shunit2, test/unit/test-file.sh.in, test/unit/test-filecache.sh.in, test/unit/test-fns.sh.in, testing.sh: Use ZSH subshell in journaling and the prompt display. 2008-09-05 R. Bernstein * lib/gdb.sh, lib/hook.sh, test/data/bug-args.right, test/data/bug-errexit.right, test/data/bugIFS.right, test/data/frame.right, test/data/lopts.right, test/data/next.right, test/data/setshow.right, test/data/skip.right, test/data/sopts.right, test/data/step.right: Print command via ZSH_DEBUG_CMD with location. Thanks yet again to Peter Stephenson. 2008-09-05 R. Bernstein * test/data/Makefile.am, test/example/Makefile.am, test/integration/Makefile.am: More administrivia: make "make dist" work. 2008-09-05 R. Bernstein * Makefile.am: Administrivia 2008-09-05 R. Bernstein * command/break.sh, command/set.sh, getopt-test.sh, lib/break.sh, lib/filecache.sh, lib/frame.sh, lib/hook.sh: Used by configure to see if getopt works 2008-09-04 R. Bernstein * command/Makefile.am, lib/Makefile.am: Administrivia. 2008-09-04 R. Bernstein * command/break.sh, configure.ac, lib/break.sh, lib/file.sh, lib/filecache.sh, lib/gdb.sh, lib/msg.sh, lib/processor.sh, test/unit/.gitignore, test/unit/Makefile.am, test/unit/test-file.sh.in, test/unit/test-filecache.sh.in: More progress towards adding breakpoints. More code towards gathering file information. Still need code in processor.sh to check/stop at breakpoints and code to read in file lines. 2008-09-04 R. Bernstein * test/data/Makefile.am, test/data/skip.cmd, test/data/skip.right, test/integration/Makefile.am, test/integration/test-skip: Add skip integration test. 2008-09-03 R. Bernstein * configure.ac, lib/file.sh, lib/fns.sh, lib/processor.sh, test/data/frame.right, test/unit/.gitignore, test/unit/Makefile.am, test/unit/test-file.sh.in, zshdb.in: Fill in more of the file routines. Much more work is needed. 2008-09-02 R. Bernstein * : I hate failed merges 2008-09-02 R. Bernstein * command/help.sh, command/show.sh, lib/columns.sh, test/unit/test-columns.sh.in: Columnize "show aliases" 2008-08-31 R. Bernstein * configure.ac, dbg-main.sh, dbg-pre.sh, dbg-trace.sh.in, lib/frame.sh, lib/processor.sh, test/data/frame.right, test/zsh/ok4zshdb.sh, zshdb.in: Make more portable across shells. Check zsh version. Some small code reorganization. 2008-08-30 R. Bernstein * lib/Makefile.am: Include columns.sh when installing and making distribution. 2008-08-30 R. Bernstein * command/help.sh, command/stepping.sh, configure.ac, lib/columns.sh, lib/help.sh, lib/hook.sh, test/example/Makefile.am, test/unit/.gitignore, test/unit/Makefile.am, test/unit/test-columns.sh.in: Better handling of column output. Administrivia. 2008-08-30 R. Bernstein * test/data/next.cmd, test/data/next.right, test/example/nexting.sh, test/integration/test-next: Add integration test for "next", "n+", "n-" 2008-08-30 R. Bernstein * test/integration/Makefile.am: Add integration test for next 2008-08-30 R. Bernstein * README, command/stepping.sh: Revise README for what's up. Remove a debug statement. 2008-08-30 R. Bernstein * command/help.sh, command/stepping.sh, lib/alias.sh, lib/dbg-call.sh, lib/frame.sh, lib/hook.sh, lib/processor.sh, lib/save-restore.sh, test/data/Makefile.am, test/integration/Makefile.am, zshdb.in: Add next, next-, next+ commands: stepping over functions. Reduce verbosity on set -x tracing. 2008-08-29 R. Bernstein * test/data/bug-errexit.cmd, test/data/bug-errexit.right, test/example/bug-errexit.sh, test/integration/test-bug-errexit: Add integration test for "set -o errexit" and "set -u". 2008-08-28 R. Bernstein * command/continue.sh, lib/processor.sh: entering debugger loop kills prior step ignore counts 2008-08-28 R. Bernstein * test/example/stepping.sh: Small things 2008-08-27 R. Bernstein * command/stepping.sh, lib/hook.sh: Minor 2008-08-27 R. Bernstein * : commit 25c9f909f5b242e4ce0ca3bdc70e53cab7301560 Author: R. Bernstein Date: Wed Aug 27 21:38:01 2008 -0400 2008-08-27 R. Bernstein * test/data/step.cmd, test/data/step.right, test/example/stepping.sh, test/integration/Makefile.am, test/integration/test-step: Add step, step+, step- and set/show force integration test. 2008-08-27 R. Bernstein * test/integration/Makefile.am: setshow.tests no longer needed 2008-08-27 R. Bernstein * test/integration/check-common.sh.in, test/integration/test-bug-args, test/integration/test-bugIFS, test/integration/test-frame, test/integration/test-setshow: Dry regression tests 2008-08-27 R. Bernstein * test/integration/setshow.tests: Dry integration tests more. 2008-08-26 R. Bernstein * command/stepping.sh: Typo 2008-08-26 R. Bernstein * lib/hook.sh, test/data/frame.cmd, test/data/frame.right, test/data/setshow.right: Correct regression tests and make test-frame less debugger specific. 2008-08-26 R. Bernstein * : commit 62e4ab1cdb8cb420008a8c925a4fecdae2bf15ad Author: R. Bernstein Date: Tue Aug 26 11:25:36 2008 -0400 2008-08-26 R. Bernstein * command/set.sh, command/show.sh, command/stepping.sh, dbg-pre.sh, lib/frame.sh, lib/help.sh, lib/hook.sh, lib/processor.sh, zshdb.in: Start "set/show force" step+ and step-. Frame regression test is broken which probably means this is broken. 2008-08-26 R. Bernstein * command/run.sh, lib/run.sh: Bang on restart a bit. 2008-08-25 R. Bernstein * lib/frame.sh, test/data/frame.right: Reset frame position every time debugger is entered. 2008-08-24 R. Bernstein * command/alias.sh, command/continue.sh, command/edit.sh, command/frame.sh, command/quit.sh, command/run.sh, command/source.sh, dbg-main.sh, dbg-opts.sh, dbg-trace.sh.in, lib/processor.sh, test/data/bug-args.right, test/data/bugIFS.right, test/data/frame.right, test/data/lopts.right, test/data/setshow.right, test/data/sopts.right: Remove bogusity in handling stacked input descriptors. Bang on help text some more. 2008-08-23 R. Bernstein * test/data/bug-args.right, test/data/frame.right, test/example/bug-args.sh, test/example/hanoi.sh.in: Small stuff 2008-08-23 R. Bernstein * README, command/eval.sh, test/integration/check-common.sh.in: Minor changes. 2008-08-23 R. Bernstein * .gitignore, Makefile.am, configure.ac, zshdb-trace.in => dbg-trace.sh.in, emacs/.gitignore, emacs/Makefile.am, emacs/{zshdb-test.el.in => dbg-test.el.in}, test/example/settrace.sh: Infrstructure more generic and common with other *shdb debuggers 2008-08-23 R. Bernstein * lib/Makefile.am, lib/{sig.sh => hook.sh}, lib/processor.sh: sig.sh -> hook.sh. 2008-08-23 R. Bernstein * .gitignore, command/show.sh, configure.ac, lib/dbg-call.sh, lib/frame.sh, lib/help.sh, lib/save-restore.sh, test/data/frame.right, test/data/settrace.cmd, test/data/settrace.right, test/example/settrace.sh, test/unit/test-save-restore.sh.in, zshdb-trace.in, zshdb.in: Add ability to hard-code calls to the debugger from inside a script: source zshdb-trace and call _Dbg_debugger. 2008-08-23 R. Bernstein * command/stepping.sh, lib/sig.sh: Remove some of my bugs in handling skip. 2008-08-22 R. Bernstein * command/stepping.sh, lib/frame.sh, lib/processor.sh, lib/sig.sh, test/data/frame.cmd, test/data/frame.right, test/example/hanoi.sh.in, test/unit/test-fns.sh.in, test/unit/test-frame.sh.in, zshdb.in: Add skip command. This time, for sure! Add stack saving routine. 2008-08-22 R. Bernstein * test/integration/Makefile.am, test/integration/test-frame: Add an integration test for frame motion. Yay! 2008-08-22 R. Bernstein * command/set.sh, configure.ac, dbg-opts.sh, lib/gdb.sh, lib/processor.sh, lib/sig.sh, test/data/frame.cmd, test/data/frame.right, test/data/setshow.right, test/example/.gitignore, test/example/Makefile.am, test/example/hanoi.sh.in, test/integration/check-common.sh.in, test/integration/test-frame, test/unit/.gitignore, test/unit/test-alias.sh.in, test/unit/test-frame.sh.in: Handle "set linetrace on/off". Closer to having frame integration test working. 2008-08-22 R. Bernstein * lib/frame.sh, test/unit/test-frame.sh.in: Small potatoes 2008-08-21 R. Bernstein * command/frame.sh, command/help.sh, configure.ac, lib/frame.sh, lib/sig.sh, test/unit/Makefile.am: More stringent checking of frame. More bugs found. Show aliases on command help (this time, for sure!) 2008-08-21 R. Bernstein * lib/gdb.sh: Another stack frame bug. It's really time to port over some unit tests... 2008-08-21 R. Bernstein * command/frame.sh: Update help 2008-08-21 R. Bernstein * command/where.sh, lib/frame.sh: Fix frame adjustment. We're now using zero origin. 2008-08-21 R. Bernstein * dbg-opts.sh: Comment annotate for now. 2008-08-21 R. Bernstein * command/help.sh, command/stepping.sh, lib/alias.sh, lib/processor.sh, lib/save-restore.sh, test/unit/test-alias.sh.in, testing.sh, zshdb.in: Show aliases in help for a command. 2008-08-20 R. Bernstein * command/help.sh, command/show.sh, lib/help.sh: More compatible with kshdb 2008-08-20 R. Bernstein * AUTHORS, README, command/alias.sh, command/help.sh, command/set.sh, command/show.sh, command/stepping.sh, dbg-opts.sh, lib/help.sh, lib/msg.sh, lib/processor.sh, lib/sig.sh, test/data/Makefile.am, test/data/bug-args.cmd, test/data/bug-args.right, test/data/bugIFS.cmd, test/data/bugIFS.right, test/data/lopts.right, test/data/quit.cmd, test/data/setshow.cmd, test/data/setshow.right, test/data/sopts.right, test/example/dbg-test2.sh, test/integration/Makefile.am, test/integration/setshow.tests, test/integration/test-setshow: Add more set/show things and an integration test for these. 2008-08-20 R. Bernstein * lib/Makefile.am: Add file to make "make install work" 2008-08-20 R. Bernstein * command/Makefile.am, command/alias.sh, command/edit.sh, command/frame.sh, command/help.sh, command/set.sh, command/show.sh, command/source.sh, lib/help.sh, lib/processor.sh: Add set and show commands. Check parameter counts on more functions. 2008-08-19 R. Bernstein * command/alias.sh, command/help.sh, lib/alias.sh, lib/help.sh, test/.gitignore, test/data/lopts.right, test/data/quit.cmd, test/data/sopts.right, test/example/dbg-test1.sh, test/integration/Makefile.am, test/integration/check-common.sh.in, test/integration/lopts.tests, test/integration/sopts.tests, test/integration/test-opts: Add option integration test. Remove some zshisms 2008-08-19 R. Bernstein * test/unit/test-alias.sh.in, test/unit/test-save-restore.sh.in, testing.sh: More stringent alias and save/restore unit tests. testing.sh has an example of something which changes when shwordsplit is used. 2008-08-18 R. Bernstein * command/continue.sh, command/edit.sh, command/frame.sh, command/help.sh, command/run.sh, lib/fns.sh, lib/frame.sh, lib/gdb.sh, lib/processor.sh, lib/run.sh, lib/save-restore.sh: _Dbg_adjust_frame -> _Dbg_frame_adjust aliases for more commands. Add some linespec routines _Dbg_frame_line -> _Dbg_frame_lineno. 2008-08-18 R. Bernstein * command/edit.sh: Add edit command which pulls in some linespec stuff and adds _Dbg_frame_file and _Dbg_frame_line. Regularize names a little adjust_frame -> frame_adjust. We now save and restore shwordsplit. Be better about checkin parameters. 2008-08-17 R. Bernstein * command/frame.sh, command/run.sh, command/stepping.sh, dbg-main.sh, dbg-pre.sh, lib/processor.sh: More bashdb/kshdb alignment. 2008-08-16 R. Bernstein * command/source.sh: local->typeset. 2008-08-16 R. Bernstein * configure.ac, test/integration/check-common.sh.in, test/unit/test-alias.sh.in, test/unit/test-fns.sh.in, test/unit/test-run.sh.in, zshdb.in: ZSH_PROG -> SH_PROG 2008-08-15 R. Bernstein * command/alias.sh, command/continue.sh, command/eval.sh, command/frame.sh, command/help.sh, command/quit.sh, command/run.sh, command/source.sh, command/stepping.sh, command/tracefn.sh, command/where.sh, lib/help.sh, lib/processor.sh: More regularization of function names add_help -> help_add. Use aliases in more commands. 2008-08-14 R. Bernstein * command/alias.sh, command/help.sh, command/quit.sh, command/run.sh, command/stepping.sh, command/where.sh, lib/alias.sh, lib/processor.sh, test/unit/test-alias.sh.in: Regularize alias command names add_alias -> alias_add, remove_alias -> alias_remove, etc. 2008-08-14 R. Bernstein * acinclude.m4, command/eval.sh, configure.ac: More zsh and ksh compatible. 2008-08-13 R. Bernstein * command/help.sh, command/stepping.sh, lib/alias.sh, lib/processor.sh, lib/sig.sh, test/zsh/ok4zshdb.sh: Should work now from current zsh without any additional patching. Turn 's', 'n', and 'next' to command aliases of step. 2008-08-13 R. Bernstein * command/tracefn.sh: declare, local => typeset for ksh compatiblity. 2008-08-12 R. Bernstein * lib/.gitignore, lib/save-restore.sh: Break off save/restore routines 2008-08-12 R. Bernstein * command/continue.sh, command/help.sh, command/quit.sh, command/run.sh, command/source.sh, command/stepping.sh, command/tracefn.sh, command/where.sh, lib/processor.sh, test/integration/.gitignore: Tidy help text a little. 2008-08-12 R. Bernstein * command/where.sh, lib/frame.sh, lib/gdb.sh, lib/processor.sh, lib/sig.sh: Fix some stack-handling bugs and clean up code a little. 2008-08-11 R. Bernstein * command/where.sh, lib/frame.sh: Slightly more bash and ksh compatible. 2008-08-11 R. Bernstein * command/where.sh, configure.ac, lib/.gitignore, lib/fns.sh, lib/frame.sh, lib/gdb.sh, lib/set-d-vars.sh, test/unit/.gitignore, test/unit/Makefile.am, test/unit/test-fns.sh.in, test/unit/test-save-restore.sh.in, testing.sh, zshdb.in: Force bash- and ksh-comptable indexing. Either way, we have to force a specific ordering since it can change arbitrarily in the debugged program. 2008-08-11 R. Bernstein * dbg-opts.sh, lib/Makefile.am, lib/fns.sh, lib/msg.sh, zshdb.in: Move message routines to its own file. 2008-08-10 R. Bernstein * command/frame.sh, command/quit.sh, command/run.sh, command/where.sh, configure.ac, lib/alias.sh, lib/frame.sh, lib/processor.sh, lib/run.sh, test/unit/Makefile.am: Add help for quit command and put it in the list of commands. local->typeset to be more compatible with kshdb. 2008-08-10 R. Bernstein * command/alias.sh, command/frame.sh, command/run.sh, command/stepping.sh, command/where.sh, dbg-main.sh, lib/Makefile.am, lib/alias.sh, lib/fns.sh, lib/{stack.sh => frame.sh}, lib/gdb.sh, lib/help.sh, lib/processor.sh, lib/sig.sh: add_help->_Dbg_add_help and a number of other small typos and cleanups. 2008-08-09 R. Bernstein * configure.ac: I'm too clever for my own good. Use $srcdir for $srcdir, not $ac_srcdir. 2008-08-09 R. Bernstein * README, configure.ac, test/Makefile.am, test/zsh/.gitignore, test/zsh/Makefile.am, test/zsh/README, test/zsh/ok4zshdb.sh, test/zsh/ok4zshdb1.sh, test/zsh/ok4zshdb2.sh, test/zsh/trap-bug1.sh: Test for a zshdb-compatible zsh. 2008-08-09 R. Bernstein * Makefile.am, command/Makefile.am, configure.ac, lib/Makefile.am, test/Makefile.am, test/data/.gitignore, test/data/Makefile.am, test/example/.gitignore, test/example/Makefile.am, test/integration/Makefile.am, test/integration/check-common.sh.in, test/integration/test-bug-args, test/integration/test-bugIFS, test/unit/test-alias.sh.in, test/unit/test-fns.sh.in, test/unit/test-run.sh.in: "make distcheck" now works. 2008-08-09 R. Bernstein * Makefile.am, README, autogen.sh, command/stepping.sh, dbg-opts.sh, lib/processor.sh, zshdb.in: Disable skip command. get configured libdir set properly on zshdb start-up. 2008-08-09 R. Bernstein * THANKS: Prepration for initial zsh-workers announcement. 2008-08-09 R. Bernstein * .gitignore: The bane of version control 2008-08-09 R. Bernstein * zshdb: zshdb is derived from zshdb.in 2008-08-09 R. Bernstein * test/integration/test-bug-args: Add 2nd integration test. Argument evaluation. 2008-08-09 R. Bernstein * Makefile.am, configure.ac, test/data/bug-args.cmd, test/data/bug-args.right, test/example/bug-args.sh, test/integration/Makefile.am, test/integration/test-bugIFS: Add 2nd integration test. Argument evaluation. 2008-08-08 R. Bernstein * ChangeLog: . 2008-08-08 R. Bernstein * command/eval.sh: We're not bash here. 2008-08-08 R. Bernstein * .gitignore: The usual 2008-08-08 R. Bernstein * autogen.sh: Remove tracing shmutz. 2008-08-08 R. Bernstein * AUTHORS, ChangeLog, NEWS, README, autogen.sh: Fill in some automess stuff. First github commit! 2008-08-08 R. Bernstein * test/integration/test-bugIFS: Add the integration test 2008-08-08 R. Bernstein * configure.ac, test/data/bugIFS.right, test/integration/check-common.sh.in, test/unit/test-fns.sh.in, zshdb: My first integration test passes! 2008-08-08 R. Bernstein * dbg-pre.sh, test/integration/check-common.sh.in, zshdb, zshdb.in: Closer to working integration test. Command parsing is still a problem. 2008-08-08 R. Bernstein * command/eval.sh, command/where.sh, configure.ac, dbg-main.sh, dbg-opts.sh, lib/fns.sh, lib/sig.sh, test/Makefile.am, test/data/.gitignore, test/data/bugIFS.cmd, test/data/bugIFS.right, test/example/bugIFS.sh, test/example/dbg-test1.sh, test/integration/.gitignore, test/integration/Makefile.am, test/integration/check-common.sh.in, zshdb, zshdb.in: Closer to getting integration tests working. In the process some bugs discovered: count handling in the "where" command. Saving/restoring IFS on debugger entry. Give a better error message if dbg-main.sh is not found. 2008-08-07 R. Bernstein * dbg-opts.sh, lib/gdb.sh: Add basename option 2008-08-07 R. Bernstein * dbg-main.sh, dbg-opts.sh, dbg-pre.sh: Add --nx option. Reorg dbg-pre.sh to hopefully be more logical. 2008-08-07 R. Bernstein * dbg-main.sh, dbg-opts.sh, dbg-pre.sh, init.inc, zshdb, zshdb.in: Remove init.inc by merging with dbg-pre.sh. Add quiet option and show version. 2008-08-07 R. Bernstein * Makefile.am, command/Makefile.am, command/{alias.cmd => alias.sh}, command/{continue.cmd => continue.sh}, command/{eval.cmd => eval.sh}, command/{frame.cmd => frame.sh}, command/{help.cmd => help.sh}, command/{quit.cmd => quit.sh}, command/{run.cmd => run.sh}, command/source.sh, command/{stepping.cmd => stepping.sh}, command/{tracefn.cmd => tracefn.sh}, command/{where.cmd => where.sh}, dbg-main.sh, dbg-opts.sh, dbg-pre.inc => dbg-pre.sh, lib/Makefile.am, lib/{alias.inc => alias.sh}, lib/file.sh, lib/{fns.inc => fns.sh}, lib/{gdb.inc => gdb.sh}, lib/{help.inc => help.sh}, lib/{journal.inc => journal.sh}, lib/{processor.inc => processor.sh}, lib/{run.inc => run.sh}, lib/{set-d-vars.inc => set-d-vars.sh}, lib/{sig.inc => sig.sh}, lib/{stack.inc => stack.sh}, main.inc, opts.inc, test/unit/.gitignore, test/unit/test-alias.sh.in, test/unit/test-fns.sh.in, test/unit/test-run.sh.in, zshdb, zshdb.in: Work usage help and add -x --command option. remove .cmd and .inc prefixes in favor of the more normal .sh 2008-08-06 R. Bernstein * command/alias.cmd, command/continue.cmd, command/eval.cmd, command/frame.cmd, command/quit.cmd, command/run.cmd, command/stepping.cmd, command/where.cmd, configure.ac, lib/alias.inc, lib/processor.inc, lib/run.inc, test/unit/.gitignore, test/unit/Makefile.am, test/unit/test-alias.sh.in, test/unit/test-fns.sh.in, zshdb, zshdb.in: Get "source" command running! add_alias -> _Dbg_add_alias; same with remove_alias. More _Dbg_not_running tests. A number of other cleanups too. 2008-08-06 R. Bernstein * command/Makefile.am: add Makefile.am 2008-08-06 R. Bernstein * lib/sig.inc, test/unit/test-alias.sh, test/unit/test-fns.sh: remove derived files 2008-08-06 R. Bernstein * lib/sig.inc: Remove derived files 2008-08-06 R. Bernstein * command/Makefile.am, command/continue.cmd, command/down.cmd, command/eval.cmd, command/frame.cmd, command/help.cmd, command/print.cmd, command/step.cmd, command/{skip.cmd => stepping.cmd}, command/{trace.cmd => tracefn.cmd}, command/untrace.cmd, command/up.cmd, configure.ac, emacs/zshdb.el, lib/help.inc, lib/run.inc, main.inc, test/unit/test-alias.sh, test/unit/test-alias.sh.in, test/unit/test-fns.sh, test/unit/test-fns.sh.in, zshdb, zshdb.in: Figure out list of commands from help message. This means we can now combine small related commands. Add substitutions via autoconf. 2008-08-05 R. Bernstein * .gitignore, command/.gitignore, command/Makefile.am, emacs/.gitignore, lib/.gitignore, lib/Makefile.am, test/.gitignore, test/unit/.gitignore: More housekeeping. 2008-08-05 R. Bernstein * opts.inc: Housekeeping. 2008-08-05 R. Bernstein * Makefile.am, command/print.cmd, configure.ac, dbg-pre.inc, lib/fns.inc, lib/set-d-vars.inc, pre.inc, zshdb: print.cmd, fns.inc, lib/set-d-vars.inc: fix problem in quoting zshdb, dbg-pre.inc: handle -L --libdir option. configure, Makefile.am: more automess. 2008-08-05 R. Bernstein * .gitignore, Makefile.am, configure.ac, emacs/.gitignore, emacs/Makefile.am, emacs/zshdb-test.el.in, test/unit/.gitignore: More automess. 2008-08-05 R. Bernstein * Makefile.am, configure.ac, test/.gitignore, test/Makefile.am, test/unit/.gitignore, test/unit/Makefile.am, zshtrace.sh => zshdb: Start automess. 2008-08-05 R. Bernstein * .gitignore: Start automess. 2008-08-05 R. Bernstein * command/skip.cmd, command/step.cmd, lib/fns.inc, lib/processor.inc, lib/sig.inc, pre.inc: Add skip command. zsh patching does not seem to have worked though. 2008-08-04 R. Bernstein * .gitignore, command/.gitignore, command/eval.cmd, command/print.cmd, init.inc, lib/.gitignore, lib/help.inc, lib/set-d-vars.inc, lib/sig.inc, pre.inc, zshtrace.sh: Get $? working. 2008-08-04 R. Bernstein * command/eval.cmd, command/print.cmd, command/run.cmd, command/trace.cmd, command/untrace.cmd, lib/processor.inc, lib/run.inc, main.inc, zshtrace.sh: print/eval.cmd: restore IFS and PS4 Add trace/untrace commands. Yay! Make run/restart work. 2008-08-04 R. Bernstein * command/down.cmd, command/frame.cmd, command/up.cmd, lib/stack.inc, zshtrace.sh: Fix for 0 origin stack display 2008-08-04 R. Bernstein * init.inc, lib/fns.inc, test/unit/shunit2, test/unit/test-alias.sh, test/unit/test-fns.sh, zshtrace.sh: Loop debugger 2008-08-03 R. Bernstein * lib/set-d-vars.inc: We do have _Dbg_set_dol_q 2008-08-03 R. Bernstein * command/continue.cmd, command/help.cmd, command/step.cmd, init.inc, lib/alias.inc, lib/journal.inc, lib/processor.inc, lib/set-d-vars.inc, lib/sig.inc: Not sure. 2008-08-03 R. Bernstein * lib/processor.inc: Add stepping. 2008-08-03 R. Bernstein * command/continue.cmd: Continue command. 2008-08-03 R. Bernstein * command/step.cmd, lib/journal.inc: Add stepping. 2008-08-02 R. Bernstein * testing.sh, zshtrace.sh: Small bug in script parameter handling. 2008-08-02 R. Bernstein * command/alias.cmd, command/down.cmd, command/eval.cmd, command/frame.cmd, command/help.cmd, command/print.cmd, command/run.cmd, command/up.cmd, command/where.cmd, init.inc, lib/alias.inc, lib/fns.inc, lib/gdb.inc, lib/processor.inc, lib/set-d-vars.inc, lib/sig.inc, lib/stack.inc, main.inc, test/unit/test-fns.sh, zshtrace.sh: Some work on getting argument passing right 2008-08-02 R. Bernstein * command/run.cmd: Add run command. Start on getting zshtrace.sh to pass a real command name. 2008-08-02 R. Bernstein * dbg-main.inc, dbg-init.inc => init.inc, lib/alias.inc, dbg-fns.inc => lib/fns.inc, dbg-gdb.inc => lib/gdb.inc, dbg-processor.inc => lib/processor.inc, dbg-set-d-vars.inc => lib/set-d-vars.inc, dbg-sig.inc => lib/sig.inc, dbg-stack.inc => lib/stack.inc, main.inc, test/unit/test-alias.sh: Create lib directory and move files there. Add help. 2008-08-01 R. Bernstein * command/alias.cmd, command/help.cmd, command/print.cmd, command/quit.cmd, command/up.cmd, command/{backtrace.cmd => where.cmd}, dbg-processor.inc, dbg-set-d-vars.inc, dbg-sig.inc, emacs/elk-test.el, emacs/zshdb-test.el.in, emacs/zshdb.el, testing.sh, zshtrace.sh: Attempt full substitution in print and eval. Add alias command. Add alias for "bt". Add emacs. 2008-07-30 R. Bernstein * command/eval.cmd, command/print.cmd, dbg-set-d-vars.inc, dbg-sig.inc, testing.sh, zshtrace.sh: Set to run DEBUG trap before command, not after. 2008-07-29 R. Bernstein * command/eval.cmd, command/print.cmd, dbg-fns.inc, dbg-init.inc, dbg-processor.inc, dbg-set-d-vars.inc, dbg-sig.inc, testing.sh: First stab at print and eval commands. Causes weird execution stepping when used though. 2008-07-28 R. Bernstein * command/backtrace.cmd, command/down.cmd, command/frame.cmd, command/up.cmd, dbg-fns.inc, dbg-init.inc, dbg-main.inc, dbg-processor.inc, dbg-stack.inc, zshtrace.sh: Add some frame motion commands. 2008-07-27 R. Bernstein * command/backtrace.cmd, dbg-fns.inc, dbg-init.inc, dbg-processor.inc, dbg-sig.inc, dbg-stack.inc, zshtrace.sh: Add where command. Fill in more of the files from bashdb. 2008-07-26 R. Bernstein * command/quit.cmd, dbg-fns.inc, dbg-gdb.inc, dbg-processor.inc, dbg-stack.inc, test/unit/shunit2, test/unit/test-fns.sh, zshtrace.sh: Close to a more working debugger skeleton. 2008-07-26 R. Bernstein * Start zsh debugger zshdb-1.1.2/Makefile.am000077500000000000000000000037671357365030100147040ustar00rootroot00000000000000# Copyright (C) 2008, 2011, 2014 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. RUBY ?= ruby GIT2CL ?= git2cl AUTOMAKE_OPTIONS = dist-bzip2 SUBDIRS = command lib data doc test pkgdata_DATA = \ dbg-pre.sh \ dbg-main.sh \ dbg-opts.sh \ dbg-trace.sh \ getopts_long.sh # Set up the install target. Can't figure out how to use @PACKAGE@ bin_SCRIPTS = zshdb MOSTLYCLEANFILES = *.orig *.rej EXTRA_DIST = $(pkgdata_DATA) THANKS README.md NEWS.md make-check-filter.rb #: Run all tests without bloated output check-short: $(MAKE) check 2>&1 | $(RUBY) make-check-filter.rb #: Run all tests without and show just the failure lines check-terse: $(MAKE) check 2>&1 | $(RUBY) make-check-filter.rb | grep failure #: Unit and Integration testing test: check #: Unit testing check-unit: test-unit test-unit: cd test/unit && make check #: Unit testing check-unit-short: test-unit-short test-unit-short: @cd test/unit && make check | grep -v ^make #: Integration testing test-integration: cd test/integration && make check MAINTAINERCLEANFILES = ChangeLog if MAINTAINER_MODE #: Remove change log: ChangeLog rmChangeLog: rm ChangeLog || true #: Create ChangeLog from version control ChangeLog: rmChangeLog git log --pretty --numstat --summary | $(GIT2CL) > $@ ACLOCAL_AMFLAGS=-I . endif .PHONY: test zshdb-1.1.2/NEWS000077700000000000000000000000001357365030100144202NEWS.mdustar00rootroot00000000000000zshdb-1.1.2/NEWS.md000066400000000000000000000137051357365030100137340ustar00rootroot00000000000000Version 1.1.2 2019-12-10 gecko gecko ------------------------------------ Very minor improvements - Add "show prompt" to "show" list - add "show dir" to "show" list - Show *all* Pygments sytles a has installed, not just builtins. (John Purnell in bashdb) - Fix typo which prevented syntax highlighting option from working (MenkeTechnologies) Version 1.1.1 2019-11-17 JNC ---------------------------- - clean up and document better set/show commands - autoeval, - autolist - confirm, - different - linetrace - trace-command - listsize, - width - more RsT formatting in set/show commands - Silence "stty echo" failures in terminal detection - Add set/show confirm - Add ! suffix to kill command - set $0 properly inside "eval" and "shell commands - bump min zshdb version at least 5.4.1 to avoid memory corruption when setting $0 - other small fixes and doc improvements Version 1.1.1 2019-10-27 9 x 7 ------------------------------- - Add "skip" command - Add "debug" command - Lots of little help doc fixes - Update for current pygments advances. Now use the default TERMINAL colors Version 1.0.1 2019-09-18 ------------------------- - Revise "info variables" - Update help for "info variables" - Test for pygments on install - Detect light/dark terminal using program from bash-terminal project (adjusted for zsh) Version 1.0.0 2018-10-27 ------------------------ - Untabify some sources - Better handling of paths with embedded blanks - Add --tty_in and --terminal_in - backtrace with more eatures * Allow negative count. * Option -s or --source show source-code line in backtrace - Document how tests work - More sub-indexing in command help - Other documentation improvements - "set style" lists all available pygments styles - allow gdb-style enable/disable/delete all brkpts - _Dbg_write_journal_avar for zsh 5.1 and 5.4 - unvarnished "typeset -p" output Fixes issue #12 Fixes #10 - Sync with bashdb. Closer gdb conformance - Fix test for funcfiletrace on later zshdb in ok4zshdb Version 0.92 2016-07-06 ------------------------ - Allow source-code colorization via pygments style. use "set style" - Help text now formated via Rst. - Paragraph reflow adjusts to line width - Revise help docs Version 0.91 2016-05-30 Mom - Report deleted breakpoints This helps front-ends like realgud - Fix some of the highlight bugs - add parameter to option --highlight=dark|light. We now accomdate dark terminals more properly. - 2st level completion of "set" and "show" and "info" commands - frame order on completion respected - add underline attribute and use it for errors and debugger prompt - add sectioning to on-line help - add set history filename - add help completion, - help include aliases - numerous bug fixes Version 0.9 2014-12-12 Late Gecko --------------------------------- Note there are some incompatible changes in behavior. Some changes or follow gdb more closely, others make the default settings useful. - 'u' is no longer up and 'd' is 'delete' not 'down' - set highlight on by default now. - Set editing is on by default too. - 1st level completion of "set" and "show" command - fix bug in delete - improve help - misc bug and doc fixes Version 0.08 2011-4-18 ---------------------- - add some limited tab completion - Remove hard-wiring of "info", "set", and "show" commands. - expand help text for various commands - "set debugging" is not "set debug" to match gdb - unit tests are faster and have less white space but more useful information - eval? evaluates the RHS of an assignment statement - bug fixes Version 0.07 - Ides of March 2011-3-15 -------------------------------------- - syntax coloring if the Python pygments package installed (and --highlight option used) - easy way to evaluate the current source line or expression inside the source line (debugger commands "eval" and "eval?") - ability to go into a nested shell but keeping existing variables and functions set. (debugger command "shell") With this, one needs... - ability to save variables to an outer shell ("set_vars" function inside the interactive shell) - ability to save values from inside a subshell to the outer shell (debugger command "export") - add debugger "display" and "undisplay" commands - add --init-file (akin to same option in bash) to have zsh code sourced Version 0.06 "Giant Madagascar Day" 2010-12-10 ---------------------------------------------- - Debugger "list" command carries on where we last left off. By default it centers around the selected line. Use list> to force starting at the line. - Reorganized command-processing code to simplify it, make it more dynamic, and allow for better expansion increasing DRYness. As a result some short abbreviations of commands have been dropped. Use "alias" to add back any that you want. Version 0.05 2010-10-27 ----------------------- - Add debugger "action" command - Add debugger set/show autolist - Fix bugs when file contained spaces in a directory portion of the path - "Set force" depricated. Use "set different". - Code reorganization to support subcommands (set/show/info) and allow for growth - Emacs lisp code has been removed. Please multi-debugger code from http://github.com/rocky/emacs-dbgr instead. - Other bug fixes Version 0.04 2009-10-27 Halala ngosuku lokuzalwa ------------------------------------------------ - Better tolerance for files with embedded blanks. Make sure to quote parameters in argument passing. - Add "set force", "step+", and "step-", "next+", and "next-" commands. - Preface more variable names with _Dbg_. - Remove Emacs compile warnings Version 0.03 2009-07-04 ------------------------ - add debugger "kill" command - add debugger "condition" command - add set-inferior tty and tty testing code changes - add manual page; help doc improvements - more and better unit/integration tests - works on Solaris Version 0.02 2008-11-17 ----------------------- - Fix bugs: in breakpoints, "info args", "show version" and --version Version 0.01 2008-10-27 ----------------------- First public release zshdb-1.1.2/README.md000066400000000000000000000020031357365030100141020ustar00rootroot00000000000000[![Build Status Circle](https://circleci.com/gh/rocky/zshdb.svg?&style=shield)](https://circleci.com/gh/rocky/zshdb) [![Packaging status](https://repology.org/badge/vertical-allrepos/zshdb.svg)](https://repology.org/project/zshdb/versions) *zshdb* is gdb-like debugger for [zsh](http://www.zsh.org/) scripts. It started as a port of my bash debugger [bashdb](http://bashdb.sf.net) so the commands used in both are similar. The command syntax generally follows that of the trepanning debuggers and, more generally, GNU debugger *gdb*. Therefore knowledge gained by learning this is transferable to those debuggers and vice versa. An Emacs interface is available via [realgud](https://github.com/realgud/realgud). Visual Studio integration is available from rogalmic via [ZshDebug](https://marketplace.visualstudio.com/items?itemName=rogalmic.zsh-debug). See the [documentation](http://zshdb.readthedocs.io/en/latest/) and [wiki](https://github.com/rocky/zshdb/wiki) for more information. Rocky Bernstein zshdb-1.1.2/THANKS000066400000000000000000000003601357365030100135420ustar00rootroot00000000000000Thanks to Peter Stephenson for the adding necessary support to zsh needed to get this off the ground and make debugging possible. Thanks to Kate Ward, Stéphane Chazelas and Nikolaj Schumacher for programs used in conjunction with zshdb. zshdb-1.1.2/acinclude.m4000066400000000000000000000004221357365030100150170ustar00rootroot00000000000000AC_DEFUN([AC_SUBST_DIR], [ ifelse($2,,,$1="$2") $1=`( test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" eval echo \""[$]$1"\" )` AC_SUBST($1) ]) zshdb-1.1.2/admin/000077500000000000000000000000001357365030100137205ustar00rootroot00000000000000zshdb-1.1.2/admin/how-to-make-a-release.md000066400000000000000000000020041357365030100202220ustar00rootroot00000000000000- Let people know of a pending release? - test on lots of platforms. - Look for patches and outstanding bugs - git pull - Edit from `configure.ac`'s release name. If we have this in `configure.ac`: ``` AC_INIT([zshdb],[1.1.3],[rocky@gnu.org]) ^^^^^^ ``` then: ```console $ export ZSHDB_VERSION='1.1.3' $ ./autogen.sh && make && make check ``` - Commit changes: ```console $ git commit -m"Get ready for release $ZSHDB_VERSION" . $ make Changelog ``` - Go over ChangeLog and add to `NEWS.md`. Update date of release. ```console $ git commit --amend . ``` - `make distcheck` should work - Tag release on github https://github.com/rocky/zshdb/releases - Get onto sourceforge: Use the GUI Use the GUI login, file release, add folder $ZSHDB_VERSION hit upload button. copy NEWS.md as README.md in $ZSHDB_VERSION - Update link in github/rocky.github.com/zshdb/index.html - Redo packages? - Bump version in configure.ac and add "dev". See place above in removal zshdb-1.1.2/autogen.sh000077500000000000000000000002501357365030100146260ustar00rootroot00000000000000#!/bin/zsh cp README.md README autoreconf -i && \ autoconf && { echo "Running configure with --enable-maintainer-mode $@" ./configure --enable-maintainer-mode $@ } zshdb-1.1.2/command/000077500000000000000000000000001357365030100142465ustar00rootroot00000000000000zshdb-1.1.2/command/.gitignore000066400000000000000000000000311357365030100162300ustar00rootroot00000000000000/*~ Makefile Makefile.in zshdb-1.1.2/command/Makefile.am000066400000000000000000000002641357365030100163040ustar00rootroot00000000000000SUBDIRS = info_sub set_sub show_sub pkgdatadir = ${datadir}/@PACKAGE@/command pkgdata_DATA = $(wildcard *.sh) EXTRA_DIST = $(pkgdata_DATA) MOSTLYCLEANFILES = *.orig *.rej zshdb-1.1.2/command/action.sh000066400000000000000000000116441357365030100160650ustar00rootroot00000000000000# -*- shell-script -*- # action.sh - Perldb's "action" debugger command # # Copyright (C) 2010-2011, 2016, 2018 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add action \ '**action** *linespec* *command* Run *command* when *linespec* is hit Use "A" to remove all actions and "L" to get a list of the actions in effect.' # Add action at given line number of the current file. $1 is the # line number or _Dbg_frame_last_lineno if omitted. $2 is a # condition to test for whether to stop. _Dbg_do_action() { if (( $# == 0 )) ; then _Dbg_list_action return 0 fi if (( $# == 1 )) ; then typeset n=$_Dbg_frame_last_lineno else typeset n=$1 shift fi typeset stmt="$*" typeset filename typeset -i line_number typeset full_filename _Dbg_linespec_setup $n if [[ -n "$full_filename" ]] ; then if (( line_number == 0 )) ; then _Dbg_msg "There is no line 0 to set action at." else _Dbg_check_line $line_number "$full_filename" (( $? == 0 )) && \ _Dbg_set_action "$full_filename" "$line_number" "$stmt" fi else _Dbg_file_not_read_in "$filename" fi return 0 } _Dbg_alias_add 'a' 'action' # delete action at given file:line number. If no file is given use the # current file. 0 is returned on success, nonzero on error. _Dbg_do_clear_action() { (( $# > 1 )) && return 1 typeset -r n=${1:-$_Dbg_frame_last_lineno} typeset filename typeset -i line_number typeset full_filename _Dbg_linespec_setup $n if [[ -n $full_filename ]] ; then if (( line_number == 0 )) ; then _Dbg_msg "There is no line 0 to clear action at." else _Dbg_check_line $line_number "$full_filename" (( $? == 0 )) && \ _Dbg_unset_action "$full_filename" "$line_number" if [[ $? == 0 ]] ; then _Dbg_msg "Removed action." return 0 else _Dbg_errmsg "Didn't find any actions to remove at $n." fi fi else _Dbg_file_not_read_in $filename fi return 1 } # Routine to a delete actions by entry numbers. _Dbg_do_action_delete() { typeset -r to_go=$@ typeset -i i typeset -i found=0 for del in $to_go ; do case $del in [0-9]* ) _Dbg_delete_action_entry $del ((found += $?)) ;; * ) _Dbg_msg "Invalid entry number skipped: $del" esac done [[ $found != 0 ]] && _Dbg_msg "Removed $found action(s)." return $found } # delete action at given file:line number. If no file is given # use the current file. 0 is returned on success, nonzero on error. _Dbg_do_clear_action() { (( $# > 1 )) && return 1 typeset -r n=${1:-$_Dbg_frame_last_lineno} typeset filename typeset -i line_number typeset full_filename _Dbg_linespec_setup $n if [[ -n $full_filename ]] ; then if (( line_number == 0 )) ; then _Dbg_msg "There is no line 0 to clear action at." else _Dbg_check_line $line_number "$full_filename" (( $? == 0 )) && \ _Dbg_unset_action "$full_filename" "$line_number" if [[ $? == 0 ]] ; then _Dbg_msg "Removed action." return 0 else _Dbg_errmsg "Didn't find any actions to remove at $n." fi fi else _Dbg_file_not_read_in $filename fi return 1 } # clear all actions _Dbg_do_clear_all_actions() { (( $# != 0 )) && return 1 if ((_Dbg_action_count == 0)); then _Dbg_errmsg "No actions to delete." return 1 fi typeset -l _Dbg_response _Dbg_confirm "Delete all actions? (y/N): " 'N' if [[ $_Dbg_response != 'y' ]] ; then _Dbg_msg "Delete not done - not confirmed." return 1 fi _Dbg_write_journal_eval "_Dbg_action_count=0" _Dbg_write_journal_eval "_Dbg_action_enable=()" _Dbg_write_journal_eval "_Dbg_action_line=()" _Dbg_write_journal_eval "_Dbg_action_file=()" _Dbg_write_journal_eval "_Dbg_action_stmt=()" _Dbg_write_journal_eval "_Dbg_action_file2action=()" _Dbg_write_journal_eval "_Dbg_action_file2linenos=()" return 0 } zshdb-1.1.2/command/alias.sh000066400000000000000000000032041357365030100156720ustar00rootroot00000000000000# -*- shell-script -*- # alias.sh - gdb-like "alias" debugger command # # Copyright (C) 2008, 2010, 2016 Rocky Bernstein rocky@gnu.org # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add alias \ '**alias** *alias-name* *debugger-command* Make *alias-name* be an alias for *debugger-command*. Examples: --------- alias cat list # "cat prog.py" is the same as "list prog.py" alias s step # "s" is now an alias for "step". # The above example is done by default. See also: --------- **unalias** and **show alias**. ' _Dbg_do_alias() { if (($# != 2)) ; then _Dbg_errmsg "Got $# parameter(s), but need 2." return 1 fi _Dbg_alias_add $1 $2 return 0 } _Dbg_help_add unalias \ '**unalias** *name* Remove debugger command alias *name*. Use **show aliases** to get a list the aliases in effect. ' 1 _Dbg_do_unalias() { if (($# != 1)) ; then _Dbg_errmsg "Got $# parameters, but need 1." fi _Dbg_alias_remove $1 } zshdb-1.1.2/command/backtrace.sh000066400000000000000000000052751357365030100165320ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "backtrace" debugger command # # Copyright (C) 2008, 2016, 2018, 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. # This code assumes the version of zsh where functrace has file names # and absolute line positions, not function names and offset. _Dbg_help_add backtrace \ '**backtrace** [*opts*] [*count*] Print backtrace of all stack frames, or inner-most *count* frames. With a negative argument, print outer-most -*count* frames. An arrow indicates the "current frame". The current frame determines the context used for many debugger commands such as expression evaluation or source-line listing. *opts* are: -s | --source - show source code line -h | --help - give this help Examples: --------- backtrace # Print a full stack trace backtrace 2 # Print only the top two entries backtrace -1 # Print a stack trace except the initial (least recent) call. backtrace -s # show source lines in listing backtrace --source # same as above See also: --------- **frame** and **list** ' # Print a stack backtrace. $1 after processing options is the maximum # number of entries to include. _Dbg_do_backtrace() { _Dbg_not_running && return 1 local -A shortopts typeset -i show_source=0 emulate -L sh setopt kshglob noshglob braceexpand nokshautoload shortopts=(s source) while getopts "hs" name; do case $name in [s]) OPTARG="${shortopts[$name]}" ;& s) show_source=1 shift ;; h) _Dbg_do_help backtrace return ;; esac done typeset prefix='##' typeset -i at_most=${#_Dbg_frame_stack[@]} typeset -i count=${1:-$at_most} typeset -i i=0 if (( count < 0 )) ; then (( i = at_most + count )) (( count = at_most )) fi # Loop which dumps out stack trace. for (( ; (( i < at_most && count > 0 )) ; i++ )) ; do _Dbg_print_frame $i $show_source ((count--)) done return 0 } _Dbg_alias_add bt backtrace _Dbg_alias_add T backtrace _Dbg_alias_add where backtrace zshdb-1.1.2/command/break.sh000066400000000000000000000066571357365030100157040ustar00rootroot00000000000000# -*- shell-script -*- # # Copyright (C) 2008-2011, 2016, 2018 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add break \ '**break** [*loc-spec*] Set a breakpoint at *loc-spec*. If no location specification is given, use the current line. Multiple breakpoints at one place are permitted, and useful if conditional. See also: --------- "tbreak" and "continue"' _Dbg_help_add tbreak \ '**tbreak* [*loc-spec*] Set a one-time breakpoint at *loc-spec*. Like "break" except the breakpoint is only temporary, so it will be deleted when hit. Equivalent to "break" followed by using "delete" on the breakpoint number. If no location specification is given, use the current line.' _Dbg_do_tbreak() { _Dbg_do_break_common 1 $@ return $? } _Dbg_do_break() { _Dbg_do_break_common 0 $@ return $? } # Add breakpoint(s) at given line number of the current file. $1 is # the line number or _Dbg_frame_lineno if omitted. $2 is a condition # to test for whether to stop. _Dbg_do_break_common() { typeset -i is_temp=$1 (( $# > 0 )) && shift typeset linespec if (( $# > 0 )) ; then linespec="$1" else _Dbg_frame_lineno; linespec=$_Dbg_frame_lineno fi (( $# > 0 )) && shift typeset condition=${1:-''} if [[ "$linespec" == 'if' ]]; then _Dbg_frame_lineno; linespec=$_Dbg_frame_lineno elif [[ -z $condition ]] ; then condition=1 elif [[ $condition == 'if' ]] ; then shift condition="$@" fi [[ -z $condition ]] && condition=1 typeset filename typeset -i line_number typeset full_filename _Dbg_linespec_setup "$linespec" if [[ -n "$full_filename" ]] ; then if (( line_number == 0 )) ; then _Dbg_errmsg 'There is no line 0 to break at.' return else _Dbg_check_line $line_number "$full_filename" (( $? == 0 )) && \ _Dbg_set_brkpt "$full_filename" "$line_number" $is_temp "$condition" fi else _Dbg_file_not_read_in "$filename" fi _Dbg_last_cmd="break" } # delete brkpt(s) at given file:line numbers. If no file is given # use the current file. _Dbg_do_clear_brkpt() { typeset -r n=${1:-$_Dbg_frame_last_lineno} typeset filename typeset -i line_number typeset full_filename if [[ -n $full_filename ]] ; then if (( line_number == 0 )) ; then _Dbg_msg "There is no line 0 to clear." else _Dbg_check_line $line_number "$full_filename" if (( $? == 0 )) ; then _Dbg_unset_brkpt "$full_filename" "$line_number" typeset -r found=$? if [[ $found != 0 ]] ; then _Dbg_msg "Removed $found breakpoint(s)." else _Dbg_msg "Didn't find any breakpoints to remove at $n." fi fi fi else _Dbg_file_not_read_in "$filename" fi } _Dbg_alias_add b break zshdb-1.1.2/command/complete.sh000066400000000000000000000123351357365030100164160ustar00rootroot00000000000000# complete.sh - gdb-like 'complete' command # # Copyright (C) 2010-2011, 2016 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='..' || top_dir=${dirname}/.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done fi _Dbg_help_add complete \ '**complete** *prefix-str*... Show command completion strings for *prefix-str* ' #### zsh compgen's -W (words) doesn't match bash's. #### Until we get a fix into zsh.... ## Uncomment after we get a change to zsh... ## autoload -Uz bashcompinit ## bashcompinit ## zmodload -ap zsh/parameter parameters _compgen_opt_words() { typeset -a words words=( ${~=1} ) local find try find=$2 results=(${(M)words[@]:#$find*}) } compgen() { local -a results local opts prefix suffix job OPTARG OPTIND ret=1 local -a name res results jids local -A shortopts emulate -L sh setopt kshglob noshglob braceexpand nokshautoload shortopts=( a alias b builtin c command d directory e export f file g group j job k keyword u user v variable ) while getopts "o:A:G:C:F:P:S:W:X:abcdefgjkuv" name; do case $name in [abcdefgjkuv]) OPTARG="${shortopts[$name]}" ;& A) case $OPTARG in alias) results+=( "${(k)aliases[@]}" ) ;; arrayvar) results+=( "${(k@)parameters[(R)array*]}" ) ;; binding) results+=( "${(k)widgets[@]}" ) ;; builtin) results+=( "${(k)builtins[@]}" "${(k)dis_builtins[@]}" ) ;; command) results+=( "${(k)commands[@]}" "${(k)aliases[@]}" "${(k)builtins[@]}" "${(k)functions[@]}" "${(k)reswords[@]}" ) ;; directory) setopt bareglobqual results+=( ${IPREFIX}${PREFIX}*${SUFFIX}${ISUFFIX}(N-/) ) setopt nobareglobqual ;; disabled) results+=( "${(k)dis_builtins[@]}" ) ;; enabled) results+=( "${(k)builtins[@]}" ) ;; export) results+=( "${(k)parameters[(R)*export*]}" ) ;; file) setopt bareglobqual results+=( ${IPREFIX}${PREFIX}*${SUFFIX}${ISUFFIX}(N) ) setopt nobareglobqual ;; function) results+=( "${(k)functions[@]}" ) ;; group) emulate zsh _groups -U -O res emulate sh setopt kshglob noshglob braceexpand results+=( "${res[@]}" ) ;; hostname) emulate zsh _hosts -U -O res emulate sh setopt kshglob noshglob braceexpand results+=( "${res[@]}" ) ;; job) results+=( "${savejobtexts[@]%% *}" );; keyword) results+=( "${(k)reswords[@]}" ) ;; running) jids=( "${(@k)savejobstates[(R)running*]}" ) for job in "${jids[@]}"; do results+=( ${savejobtexts[$job]%% *} ) done ;; stopped) jids=( "${(@k)savejobstates[(R)suspended*]}" ) for job in "${jids[@]}"; do results+=( ${savejobtexts[$job]%% *} ) done ;; setopt|shopt) results+=( "${(k)options[@]}" ) ;; signal) results+=( "SIG${^signals[@]}" ) ;; user) results+=( "${(k)userdirs[@]}" ) ;; variable) results+=( "${(k)parameters[@]}" ) ;; helptopic) ;; esac ;; F) COMPREPLY=() $OPTARG "${words[0]}" "${words[CURRENT-1]}" "${words[CURRENT-2]}" results+=( "${COMPREPLY[@]}" ) ;; G) setopt nullglob results+=( ${~OPTARG} ) unsetopt nullglob ;; W) _compgen_opt_words "$OPTARG" "${@[-1]}" ;; C) results+=( $(eval $OPTARG) ) ;; P) prefix="$OPTARG" ;; S) suffix="$OPTARG" ;; X) if [[ ${OPTARG[0]} = '!' ]]; then results=( "${(M)results[@]:#${OPTARG#?}}" ) else results=( "${results[@]:#$OPTARG}" ) fi ;; esac done #### End fix stuff. # support for the last, `word' option to compgen. Zsh's matching does a # better job but if you need to, comment this in and use compadd -U #shift $(( OPTIND - 1 )) #(( $# )) && results=( "${(M)results[@]:#$1*}" ) print -l -- "$prefix${^results[@]}$suffix" } _Dbg_do_complete() { typeset -a args; args=($@) _Dbg_matches=() if (( ${#args[@]} == 2 )) ; then _Dbg_subcmd_complete ${args[0]} ${args[1]} elif (( ${#args[@]} == 1 )) ; then typeset -a ary ary=(${(k)_Dbg_debugger_commands[@]}) IFS=' ' list=${ary[@]} compgen -W "${list}" "${args[0]}" fi typeset -i i for (( i=0; i < ${#_Dbg_matches[@]} ; i++ )) ; do _Dbg_msg ${_Dbg_matches[$i]} done } # Demo it. if [[ 0 == ${#funcfiletrace[@]} ]] ; then source ./help.sh source ../lib/msg.sh _Dbg_libdir='..' for _Dbg_file in ${_Dbg_libdir}/command/c*.sh ; do source $_Dbg_file done _Dbg_args='complete' _Dbg_do_help complete _Dbg_do_complete c fi zshdb-1.1.2/command/condition.sh000066400000000000000000000042061357365030100165720ustar00rootroot00000000000000# -*- shell-script -*- # condition.sh - gdb-like "condition" debugger command # # Copyright (C) 2009, 2016, 2017 Rocky Bernstein rocky@gnu.org # # zshdb is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2, or (at your option) any later # version. # # zshdb is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with zshdb; see the file COPYING. If not, write to the Free Software # Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. _Dbg_help_add condition \ "**condition** *bp_number* *condition* Break only if *condition* is true in breakpoint number *bp_number*. *bp_number* is a breakpoint number. *condition* is a zsh expression which must evaluate to *True* before the breakpoint is honored. If *condition* is absent, any existing condition is removed; i.e., the breakpoint is made unconditional. Examples: --------- condition 5 x > 10 # Breakpoint 5 now has condition x > 10 condition 5 # Remove above condition See also: --------- *break*, *tbreak*. " # Set a condition for a given breakpoint $1 is a breakpoint number # $2 is a condition. If not given, set "unconditional" or 1. # returns 0 if success or 1 if fail. function _Dbg_do_condition { if (( $# < 1 )) ; then _Dbg_errmsg 'condition: Argument required (breakpoint number).' return 0 fi typeset -r n=$1 shift typeset condition="$@" if [[ $n != [0-9]* ]]; then _Dbg_errmsg "condition: Bad breakpoint number: $n" return 0 fi if [[ -z ${_Dbg_brkpt_file[$n]} ]] ; then _Dbg_errmsg "condition: Breakpoint entry $n is not set. Condition not changed." return 0 fi if [[ -z $condition ]] ; then condition=1 _Dbg_msg "Breakpoint $n now unconditional." fi _Dbg_brkpt_cond[$n]="$condition" _Dbg_last_cmd='condition' return 1 } zshdb-1.1.2/command/continue.sh000066400000000000000000000044631357365030100164350ustar00rootroot00000000000000# -*- shell-script -*- # continue.sh - gdb-like "continue" debugger command # # Copyright (C) 2008, 2010-2011, 2016, 2019 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add continue \ '**continue** [*loc* | **-** ] Continue script execution. If *loc* or *-* is not given, continue until the next breakpoint or the end of program is reached. If **-** is given, then debugging will be turned off after continuing causing your program to run at full speed. If **loc* is given, a temporary breakpoint is set at the location. Examples: --------- continue # Continue execution continue 5 # Continue with a one-time breakpoint at line 5 See Also: --------- **next**, **skip**, and **step** provide other ways to progress execution.' function _Dbg_do_continue { _Dbg_not_running && return 3 if (( $# == 0 )) ; then _Dbg_continue_rc=0 return 0 fi typeset filename typeset -i line_number typeset full_filename if [[ $1 == '-' ]] ; then _Dbg_restore_debug_trap=0 _Dbg_continue_rc=0 return 0 fi _Dbg_linespec_setup "$1" _Dbg_last_cmd='continue' if [[ -n "$full_filename" ]] ; then if (( line_number == 0 )) ; then _Dbg_errmsg 'There is no line 0 to continue at.' return 1 else _Dbg_check_line $line_number "$full_filename" (( $? == 0 )) && \ _Dbg_set_brkpt "$full_filename" "$line_number" 1 1 _Dbg_continue_rc=0 return 0 fi else _Dbg_file_not_read_in "$filename" return 2 fi } _Dbg_alias_add 'c' 'continue' _Dbg_alias_add 'cont' 'continue' zshdb-1.1.2/command/debug.sh000066400000000000000000000051611357365030100156730ustar00rootroot00000000000000# -*- shell-script -*- # Set up to Debug into another script... # # Copyright (C) 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add debug \ "debug [*zsh-script* [*args*...]] Recursively debug into *zsh-script*. If *script* is not given, take the script name from the command that is about to be executed. Note that when the nested debug finished, you are still where you were prior to entering the debugger. See Also: --------- **skip** and **run**" # TODO: would work better if instead of using $source_line below # which might have several statements, we could just pick up the next # single statement. _Dbg_do_debug() { # _Dbg_shell_new_shell_profile typeset script_cmd=${@:-$_ZSH_DEBUG_CMD} if (( $# == 0 )) ; then script_cmd=$ZSH_DEBUG_CMD fi # We need to expand variables that might be in $script_cmd. # set_Dbg_nested_debug_cmd is set up to to be eval'd below. typeset set_Dbg_debug_cmd="typeset _Dbg_debug_cmd=\"$script_cmd\""; export SHELL=${_Dbg_shell} eval "$_seteglob" # Add appropriate zsh debugging options if (( ! _Dbg_script )) ; then set_Dbg_debug_cmd="typeset _Dbg_debug_cmd=\"$SHELL --init-file ${_Dbg_shell_temp_profile} --debugger $script_cmd\""; elif [[ $_Dbg_orig_0/// == *zshdb/// ]] ; then # Running "zshdb", so prepend "zsh zshdb .." set_Dbg_debug_cmd="typeset _Dbg_debug_cmd=\"$SHELL $_Dbg_orig_0 -q -L $_Dbg_libdir $script_cmd\""; fi eval "$_resteglob" eval $set_Dbg_debug_cmd if (( _Dbg_set_basename )) ; then _Dbg_msg "Debugging new script with $script_cmd" else _Dbg_msg "Debugging new script with $_Dbg_debug_cmd" fi typeset -r old_quit_on_quit=$_Dbg_QUIT_ON_QUIT export _Dbg_QUIT_ON_QUIT=1 export ZSHDB_BASENAME_ONLY="$_Dbg_set_basename" ((_Dbg_DEBUGGER_LEVEL++)) $_Dbg_debug_cmd ((_Dbg_DEBUGGER_LEVEL--)) # _Dbg_restore_from_nested_shell export _Dbg_QUIT_ON_QUIT=$old_quit_on_quit } zshdb-1.1.2/command/delete.sh000066400000000000000000000036701357365030100160520ustar00rootroot00000000000000# -*- shell-script -*- # delete.sh - gdb-like "delete" debugger command # # Copyright (C) 2002-2006, 2008, 2011, 2016-2017 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add delete \ "**delete** {*brkpt-num*}... Delete some breakpoints. Arguments are breakpoint numbers with spaces in between. Without arguments, clear all breaks (but first ask for confirmation). " # Routine to a delete breakpoint/watchpoint by entry numbers. _Dbg_do_delete() { _Dbg_do_delete_internal $@ return 0 } _Dbg_do_delete_internal() { typeset to_go; to_go=$@ typeset -i i typeset -i tot_found=0 if (( $# == 0 )) ; then _Dbg_confirm "Delete all breakpoints? (y/N): " 'N' if [[ $_Dbg_response == [yY] ]] ; then typeset to_go=$(_Dbg_breakpoint_list) else return fi fi _Dbg_last_cmd='delete' for del in $to_go ; do case $del in # $_watch_pat ) # _Dbg_delete_watch_entry ${del:0:${#del}-1} # ;; [0-9]* ) if _Dbg_delete_brkpt_entry $del ; then _Dbg_msg "Deleted breakpoint ${del}" ((tot_found++)) fi ;; * ) _Dbg_errmsg "Invalid entry number skipped: $del" esac done return $tot_found } _Dbg_alias_add 'd' delete _Dbg_alias_add 'unset' 'delete' zshdb-1.1.2/command/disable.sh000066400000000000000000000025351357365030100162120ustar00rootroot00000000000000# -*- shell-script -*- # disable.sh - gdb-like "disable" debugger command # # Copyright (C) 2008-2009, 2011, 2016-2017 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add disable \ '**disable** *bpnum1* [*bpnum2* ...] Disables breakopints *bpnum1*, *bpnum2*. Breakpoints numbers are given as a space-separated list of breakpoint numbers. To disable all breakpoints, give no argument. A disabled breakpoint is not forgotten, but has no effect until re-enabled. See also: --------- **enable** and **info break**.' # Disable breakpoint(s)/watchpoint(s) by entry number(s). _Dbg_do_disable() { _Dbg_enable_disable 0 'disabled' "$@" return 0 } zshdb-1.1.2/command/display.sh000066400000000000000000000032051357365030100162470ustar00rootroot00000000000000# -*- shell-script -*- # display.sh - gdb-like "(un)display" and list display debugger commands # # Copyright (C) 2002-2003, 200-2011, 2016 # Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this Program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add display \ "**display** [*stmt*] Evalute *stmt* each time the debugger is stopped. If *stmt* is omitted, evaluate all of the display statements that are active. In contrast, **info display** shows the display statements without evaluating them. Examples: --------- display echo \$x # show the current value of x each time debugger stops display # evaluate all display statements See also: --------- **undisplay** and **info display**." # Set display command or list all current display expressions _Dbg_do_display() { if (( 0 == $# )); then _Dbg_eval_all_display else typeset -i n=_Dbg_disp_max++ _Dbg_disp_exp[$n]="$@" _Dbg_disp_enable[$n]=1 _Dbg_printf '%2d: %s' $n "${_Dbg_disp_exp[$n]}" fi return 0 } zshdb-1.1.2/command/down.sh000066400000000000000000000037101357365030100155520ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "down" debugger command # # Copyright (C) 2010-2012, 2014, 2016 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='..' || top_dir=${dirname}/.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done fi # Move default values down $1 or one in the stack. _Dbg_help_add down \ '**down** [*count*] Move the current frame down in the stack trace (to an newer frame). 0 is the most recent frame. If *count* is omitted, use 1. See also: --------- **down** and **frame**.' typeset -A _Dbg_complete_level_1_data _Dbg_complete_level_1_data[down]='-f_Dbg_frame_complete -1' function _Dbg_do_down { _Dbg_not_running && return 1 typeset count=${1:-1} _Dbg_is_signed_int $count if (( 0 == $? )) ; then _Dbg_frame_adjust $count -1 typeset -i rc=$? else _Dbg_errmsg "Expecting an integer; got $count" typeset -i rc=2 fi return 0 } # Demo it if [[ 0 == ${#funcfiletrace[@]} ]] ; then for _Dbg_file in help msg sort columnize ; do source ${top_dir}/lib/${_Dbg_file}.sh done source ${top_dir}/command/help.sh _Dbg_args='down' _Dbg_do_help down fi zshdb-1.1.2/command/edit.sh000066400000000000000000000034611357365030100155330ustar00rootroot00000000000000# -*- shell-script -*- # edit.sh - Debugger edit command - enter $EDITOR # Copyright (C) 2008, 2010, 2016 Rocky Bernstein rocky@gnu.org # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. #================ VARIABLE INITIALIZATIONS ====================# _Dbg_help_add edit \ "**edit** [*line-number*] Edit specified file at *line-number*. If *line-number* is not given, use the current line number. Uses \"EDITOR\" environment variable contents as editor (or ex as default). Assumes the editor positions at a file using options \"+linenumber filename\"." _Dbg_do_edit() { if (($# > 2)) ; then _Dbg_errmsg "got $# parameters, but need 0 or 1." return 0 fi typeset editor=${EDITOR:-ex} typeset -i line_number if (( $# == 0 )) ; then _Dbg_frame_lineno line_number=$? _Dbg_frame_file ((0 != $?)) && return 0 ((line_number<=0)) && return 0 full_filename="$_Dbg_frame_filename" else _Dbg_linespec_setup "$1" fi if [[ ! -r $full_filename ]] ; then _Dbg_errmsg "File $full_filename is not readable" fi $editor +$line_number $full_filename _Dbg_last_cmd='edit' return 0 } _Dbg_alias_add 'ed' 'edit' zshdb-1.1.2/command/enable.sh000066400000000000000000000025201357365030100160270ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "enable" debugger command # # Copyright (C) 2008-2009, 2011, 2016-2017 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add enable \ '**enable** *bpnum1* [*bpnum2* ...] Enables breakpoints *bpnum1*, *bpnum2*... Breakpoints numbers are given as a space-separated list of numbers. With no subcommand, breakpoints are enabled until you command otherwise. This is used to cancel the effect of the "disable" command. See also: --------- **disable** and **info break**.' # Enable breakpoint(s)/watchpoint(s) by entry number(s). _Dbg_do_enable() { _Dbg_enable_disable 1 'enabled' "$@" return 0 } zshdb-1.1.2/command/eval.sh000066400000000000000000000117771357365030100155460ustar00rootroot00000000000000# -*- shell-script -*- # Eval and Print commands. # # Copyright (C) 2008, 2010-2011, 2014-2015, 2017, 2019 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. # temp file for internal eval'd commands typeset _Dbg_evalfile=$(_Dbg_tempname eval) # _Dbg_complete_level_1_data[eval?]=\ # '\$(typeset extracted; \ # _Dbg_eval_extract_condition "$_Dbg_source_line"; echo $extracted)' _Dbg_complete_eval() { echo $ZSH_DEBUG_CMD } _Dbg_complete_level_1_data[eval]='-Q_Dbg_complete_eval' _Dbg_help_add eval \ '**eval** *cmd* **eval** **eval?** In the first form *cmd* is a string; *cmd* is a string sent to special shell builtin eval. In the second form, use evaluate the current source line text. Often when one is stopped at the line of the first part of an "if", "elif", "case", "return", "while" compound statement or an assignment statement, one wants to eval is just the expression portion. For this, use eval?. Actually, any alias that ends in ? which is aliased to eval will do thie same thing. If no string is given, we run the string from the current source code about to be run. If the command ends `?` (via an alias) and no string is given, the following translations occur: {if|elif} [; then] => while [; do]? => return => = => See also: --------- **set autoeval** and **examine**.' typeset -i _Dbg_show_eval_rc; _Dbg_show_eval_rc=1 _Dbg_do_eval() { print "0=$_Dbg_dollar_0" > "$_Dbg_evalfile" print ". ${_Dbg_libdir}/lib/set-d-vars.sh" >> "$_Dbg_evalfile" print '_Dbg_rc=$?' >> "$_Dbg_evalfile" if (( $# == 0 )) ; then # FIXME: add parameter to get unhighlighted line, or # always save a copy of that in _Dbg_sget_source_line typeset source_line typeset highlight_save=$_Dbg_set_highlight _Dbg_set_highlight='' _Dbg_get_source_line typeset source_line_save="$source_line" # Were we called via ? as the suffix? typeset suffix suffix=${_Dbg_orig_cmd[-1,-1]} # ZSH_DEBUG_CMD is preferable to _Dbg_source_line in that we # know is a complete statement. But to determine if it is a # compound statement like "if .. ; then .. fi we'd prefer just # to go with the line shown and perhaps use eval? to shorten # that. The heuristic we use to determine a compound statement # is just whether the the length of text of the the current is less # than the length of the full command in ZSH_DEBUG_CMD if (( ${#source_line} > ${#ZSH_DEBUG_CMD} )) ; then source_line=$ZSH_DEBUG_CMD fi if [[ '?' == "$suffix" ]] ; then typeset extracted _Dbg_eval_extract_condition "$source_line" source_line="$extracted" source_line_save="$extracted" fi print "$source_line" >> "$_Dbg_evalfile" _Dbg_msg "eval: ${source_line}" _Dbg_source_line="$source_line_save" _Dbg_set_highlight=$_Dbg_highlight_save else print "$@" >> "$_Dbg_evalfile" fi typeset -i _Dbg_rc if [[ -t $_Dbg_fdi ]] ; then _Dbg_set_dol_q $_Dbg_debugged_exit_code . $_Dbg_evalfile >&${_Dbg_fdi} else _Dbg_set_dol_q $_Dbg_debugged_exit_code . $_Dbg_evalfile fi (( _Dbg_show_eval_rc )) && _Dbg_msg "\$? is $_Dbg_rc" # We've reset some variables like IFS and PS4 to make eval look # like they were before debugger entry - so reset them now. _Dbg_set_debugger_internal _Dbg_last_cmd='eval' return 0 } _Dbg_alias_add 'eval?' 'eval' _Dbg_alias_add 'ev' 'eval' _Dbg_alias_add 'ev?' 'eval' # The arguments in the last "print" command. typeset _Dbg_last_print_args='' _Dbg_help_add print \ 'print EXPRESSION -- Print EXPRESSION. EXPRESSION is a string like you would put in a print statement. See also eval. The difference between eval and print. Suppose cmd has the value "ls". print $cmd # prints "ls" eval $cmd # runs an ls command ' _Dbg_do_print() { typeset _Dbg_expr; _Dbg_expr=${@:-"$_Dbg_last_print_args"} typeset dq_expr; dq_expr=$(_Dbg_esc_dq "$_Dbg_expr") typeset -i _Dbg_show_eval_rc=0 _Dbg_do_eval _Dbg_msg "$_Dbg_expr" typeset -i rc=$? _Dbg_last_print_args="$dq_expr" return 0 # return $rc } _Dbg_alias_add 'pr' 'print' zshdb-1.1.2/command/examine.sh000066400000000000000000000050531357365030100162330ustar00rootroot00000000000000# -*- shell-script -*- # "Examine" debugger command. # # Copyright (C) 2008, 2010-2011, 2016, 2019 # Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='..' || top_dir=${dirname}/.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done fi _Dbg_help_add 'examine' \ '**examine** *expr* Print value of an expression via `typeset`, `let`, and failing these, `eval`. Single variables and arithmetic expressions do not need leading $ for their value is to be substituted. However if neither these, variables need $ to have their value substituted. In contrast to normal zsh expressions, expressions should not have blanks which would cause zsh to see them as different tokens. Examples: --------- examine x+1 # ok examine x + 1 # not ok See also: --------- **eval**.' function _Dbg_do_examine { typeset _Dbg_expr; _Dbg_expr=${@:-"$_Dbg_last_x_args"} typeset _Dbg_result if [[ -z $_Dbg_expr ]] then _Dbg_msg "$_Dbg_expr" elif _Dbg_defined $_Dbg_expr ; then _Dbg_result=$(typeset -p $_Dbg_expr) _Dbg_msg "$_Dbg_result" elif _Dbg_is_function "$_Dbg_expr" $_Dbg_set_debug; then _Dbg_result=$(typeset -f $_Dbg_expr) _Dbg_msg "$_Dbg_result" else typeset -i _Dbg_rc . ${_Dbg_libdir}/lib/set-d-vars.sh eval let _Dbg_result=$_Dbg_expr 2>/dev/null; _Dbg_rc=$? _Dbg_set_debugger_internal if (( _Dbg_rc != 0 )) ; then _Dbg_do_print "$_Dbg_expr" else _Dbg_msg "$_Dbg_result" fi fi _Dbg_last_x_args="$_Dbg_x_args" } _Dbg_alias_add 'x' 'examine' # Demo it. if [[ 0 == ${#funcfiletrace[@]} ]] ; then for _Dbg_file in fns msg ; do source $top_dir/lib/${_Dbg_file}.sh done source $top_dir/command/help.sh _Dbg_args='examine' _Dbg_do_help x _Dbg_do_examine top_dir fi zshdb-1.1.2/command/export.sh000066400000000000000000000033361357365030100161300ustar00rootroot00000000000000# -*- shell-script -*- # Copyright (C) 2011 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add export \ '**export** *var1* [**var2** ...] Marks **var1**, **var2***, to get reassigned with their current values after on subshell exit. The values are set by the debugger only after it notices that the current shell is left. Nothing is done if you aren not in a subshell. ' _Dbg_do_export() { if (( $# == 0 )) ; then _Dbg_errmsg "Expecting at least one variable name; got none." return 0 # return 1 fi if (( 0 == $ZSH_SUBSHELL )) ; then _Dbg_errmsg "You are not in a subshell, so no value(s) need saving." return 0 # return 2 fi typeset var_name for var_name in $@ ; do _Dbg_defined $var_name if (( $? == 0 )) ; then typeset val typeset val_cmd="val=\${$var_name}" eval "$val_cmd" _Dbg_write_journal "${var_name}=${val}" else _Dbg_errmsg "name: $var_name is not known to be a variable." fi done return 0 } zshdb-1.1.2/command/frame.sh000066400000000000000000000035411357365030100156770ustar00rootroot00000000000000# -*- shell-script -*- # frame.sh - gdb-like "frame" debugger commands # # Copyright (C) 2008, 2010-2011, 2014, 2016, 2018 Rocky Bernstein # rocky@gnu.org # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='..' || top_dir=${dirname}/.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done fi _Dbg_help_add frame \ '**frame** [*frame-number*]. Change the current frame to frame *frame-number* if specified, or the most-recent frame, 0, if no frame number specified. A negative number indicates the position from the other or least-recently-entered end. So **frame -1** moves to the oldest frame. See also: --------- **up**, **down** ' typeset -A _Dbg_complete_level_1_data _Dbg_complete_level_1_data[frame]='-f_Dbg_frame_complete 0' _Dbg_do_frame() { _Dbg_not_running && return 1 typeset count=${1:-1} _Dbg_is_signed_int $count if (( 0 == $? )) ; then _Dbg_frame_adjust $count 0 typeset -i rc=$? else _Dbg_errmsg "Expecting an integer; got $count" typeset -i rc=2 fi ((0 == rc)) && _Dbg_last_cmd='frame' return $rc } zshdb-1.1.2/command/handle.sh000066400000000000000000000101741357365030100160400ustar00rootroot00000000000000# -*- shell-script -*- # handle.sh - gdb-like "handle" debugger command # # Copyright (C) 2002-2006, 2008, 2010-2011, # 2016 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. # Process debugger "handle" command. ## Punt on for now... # _Dbg_help_add handle \ # "handle SIGNAL ACTION -- Specify how to handle SIGNAL. # SIGNAL is a signal name like SIGSEGV, but numeric signals like 11 # (which is usually equivalent on \*nix systems) is okay too. # ACTION is one of \"stop\", \"nostop\", \"print\", and # \"noprint\". \"Stop\" indicates entering debugger if this signal # happens. \"Print\" indicates printing a message if this signal is # encountered. \"Stack\" is like \"print\" but except the entire call # stack is printed. Prefacing these actions with \"no\" indicates not to # do the indicated action." _Dbg_help_add handle \ "**handle** *signal* *action* Specify how to handle *signal*. *signal* is a signal name like SIGSEGV, but numeric signals like 11 (which is usually equivalent on \*nix systems) is okay too. *action* is one of \"stop\", \"nostop\", \"print\", and \"noprint\". \"Stop\" indicates entering debugger if this signal happens. \"Print\" indicates printing a message if this signal is encountered. \"Stack\" is like \"print\" but except the entire call stack is printed. Prefacing these actions with \"no\" indicates not to do the indicated action." _Dbg_do_handle() { typeset sig=$1 typeset cmd=$2 typeset -i signum if [[ -z $sig ]] ; then _Dbg_errmsg "Missing signal name or signal number." # return 1 return 0 fi if [[ $sig == [0-9]*([0-9]) ]]; then signame=$(_Dbg_signum2name $sig) typeset -i rc=$? if (( rc == 0 )) ; then typeset -i check_num check_num=$(builtin kill -l $signame) rc=$? if ((rc == 0)) ; then (( check_num != sig )) && rc=1 fi fi if (( rc != 0 )) ; then _Dbg_errmsg "Bad signal number: $sig" # return 2 return 0 fi signum=sig else signum=$(_Dbg_name2signum $sig) if (( $? != 0 )) ; then _Dbg_errmsg "Bad signal name: $sig" # return 3 return 0 fi fi [[ -n ${Dbg_sig_print[$signum]} ]] || _Dbg_init_trap $signame $signum case $cmd in nop | nopr | nopri | noprin | noprint ) _Dbg_sig_print[signum]='noprint' # noprint implies nostop _Dbg_sig_stop[signum]='stop' ;; nosta | nostac | nostack ) _Dbg_sig_show_stack[signum]='nostack' ;; nosto | nostop ) _Dbg_sig_stop[signum]='nostop' ;; p | pr | pri | prin | print ) _Dbg_sig_print[signum]='print' ;; sta | stac | stack ) _Dbg_sig_show_stack[signum]='showstack' ;; sto | stop ) _Dbg_sig_stop[signum]='stop' # stop keyword implies print _Dbg_sig_print[signum]='print' ;; * ) if (( !cmd )) ; then _Dbg_errmsg \ "Need to give a command: stop, nostop, stack, nostack, print, noprint" # return 4 return 0 else _Dbg_errmsg "Invalid handler command $cmd" # return 5 return 0 fi ;; esac return 0 } zshdb-1.1.2/command/help.sh000066400000000000000000000065731357365030100155450ustar00rootroot00000000000000# -*- shell-script -*- # help.sh - gdb-like "help" debugger command # # Copyright (C) 2008, 2010, 2013, 2014 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='..' || top_dir=${dirname}/.. for file in help alias ; do source $top_dir/lib/${file}.sh; done fi _Dbg_help_command_complete() { unsetopt ksharrays echo "${(ki)_Dbg_debugger_commands[@]} ${(ki)_Dbg_aliases[@]} *" setopt ksharrays } _Dbg_help_add help \ '**help** [*command* [*subcommand* ..]] If no arguments are given, print a list of command names. With a command name give help for that command. For many commands you can get further detailed help by listing the subcommand name. Examples: --------- help help up help set help set args ' _Dbg_complete_level_1_data[help]='-A_Dbg_help_command_complete' typeset -i _Dbg_help_cols=8 _Dbg_do_help() { # Treat "help *" the same as help ((1 == $#)) && [[ "$1" == '*' ]] && shift if ((0 == $#)) ; then _Dbg_section 'Available commands:' typeset -a commands unsetopt ksharrays commands=(${(ki)_Dbg_command_help}) typeset -a list list=(${commands[@]}) setopt ksharrays _Dbg_list_columns _Dbg_msg '' _Dbg_msg 'Readline command line editing (emacs/vi mode) is available.' _Dbg_msg 'Type "help" followed by command name for full documentation.' return 0 else typeset dbg_cmd="$1" if [[ -n ${_Dbg_command_help[$dbg_cmd]} ]] ; then _Dbg_msg_rst "${_Dbg_command_help[$dbg_cmd]}" else typeset expanded_alias; _Dbg_alias_expand $dbg_cmd dbg_cmd="$expanded_alias" if [[ -n ${_Dbg_command_help[$dbg_cmd]} ]] ; then _Dbg_msg_rst "${_Dbg_command_help[$dbg_cmd]}" else case $dbg_cmd in i | in | inf | info ) _Dbg_info_help $2 return 0 ;; sh | sho | show ) _Dbg_help_show $2 return 0 ;; se | set ) _Dbg_help_set $2 return 0 ;; * ) _Dbg_errmsg "Undefined command: \"$dbg_cmd\". Try \"help\"." return 0 ;; esac fi fi aliases_found='' _Dbg_alias_find_aliased "$dbg_cmd" if [[ -n $aliases_found ]] ; then _Dbg_msg '' _Dbg_msg "Aliases for $dbg_cmd: $aliases_found" fi return 0 fi } _Dbg_alias_add '?' help _Dbg_alias_add 'h' help zshdb-1.1.2/command/info.sh000066400000000000000000000057121357365030100155420ustar00rootroot00000000000000# -*- shell-script -*- # info.sh - gdb-like "info" debugger commands # # Copyright (C) 2002-2006, 2008-2009, 2010-2011, 2014 # Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && _Dbg_libdir='..' || _Dbg_libdir=${dirname}/.. for lib_file in help alias ; do source $_Dbg_libdir/lib/${lib_file}.sh; done typeset -A _Dbg_complete_level_1_data fi typeset -A _Dbg_debugger_info_commands typeset -A _Dbg_command_help_info _Dbg_help_add info '' # Help routine is elsewhere typeset -a _Dbg_info_subcmds _Dbg_info_subcmds=( breakpoints display files line program source stack variables ) # Load in "info" subcommands for _Dbg_file in ${_Dbg_libdir}/command/info_sub/*.sh ; do source $_Dbg_file done _Dbg_complete_level_1_data[info]=$(echo ${(kM)_Dbg_debugger_info_commands}) _Dbg_do_info() { _Dbg_do_info_internal "$@" return $? } _Dbg_do_info_internal() { typeset info_cmd="$1" typeset label=$2 # Warranty is omitted below. typeset subcmds='breakpoints display files line source stack variables' if [[ -z $info_cmd ]] ; then typeset thing for thing in $subcmds ; do _Dbg_do_info $thing 1 done return 0 elif [[ -n ${_Dbg_debugger_info_commands[$info_cmd]} ]] ; then ${_Dbg_debugger_info_commands[$info_cmd]} $label "$@" return $? fi case $info_cmd in # a | ar | arg | args ) # _Dbg_do_info_args 3 # return 0 # ;; # h | ha | han | hand | handl | handle | \ # si | sig | sign | signa | signal | signals ) # _Dbg_info_signals # return # ;; st | sta | stac | stack ) _Dbg_do_backtrace 1 $@ return 0 ;; # te | ter | term | termi | termin | termina | terminal | tt | tty ) # _Dbg_msg "tty: $_Dbg_tty" # return; # ;; *) _Dbg_errmsg "Unknown info subcommand: $info_cmd" _Dbg_errmsg "Info subcommands are:" typeset -a list; list=(${subcmds[@]}) _Dbg_list_columns ' ' _Dbg_errmsg return -1 esac } _Dbg_alias_add i info zshdb-1.1.2/command/info_sub/000077500000000000000000000000001357365030100160525ustar00rootroot00000000000000zshdb-1.1.2/command/info_sub/.gitignore000066400000000000000000000000331357365030100200360ustar00rootroot00000000000000/*~ /Makefile /Makefile.in zshdb-1.1.2/command/info_sub/Makefile.am000066400000000000000000000003471357365030100201120ustar00rootroot00000000000000MOSTLYCLEANFILES = *.orig *.rej pkgdatadir = ${datadir}/@PACKAGE@/command/info_sub pkgdata_DATA = \ breakpoints.sh \ files.sh \ program.sh \ variables.sh \ warranty.sh EXTRA_DIST = $(pkgdata_DATA) zshdb-1.1.2/command/info_sub/breakpoints.sh000066400000000000000000000073751357365030100207430ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "info breakpoints" debugger command # # Copyright (C) 2010, 2013-2017 Rocky Bernstein # # zshdb is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2, or (at your option) any later # version. # # zshdb is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with zshdb; see the file COPYING. If not, write to the Free Software # Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_info typeset -A _Dbg_debugger_info_commands fi _Dbg_help_add_sub info breakpoints \ "**info breakpoints** Show status of user-settable breakpoints. If no breakpoint numbers are given, the show all breakpoints. Otherwise only those breakpoints listed are shown and the order given. The \"Disp\" column contains one of \"keep\", \"del\", the disposition of the breakpoint after it gets hit. The \"enb\" column indicates whether the breakpoint is enabled. The \"Where\" column indicates where the breakpoint is located. Info whether use short filenames Example: -------- zshdb<4> info breakpoints Num Type Disp Enb What 1 breakpoint keep n /etc/profile:8 2 breakpoint keep y /etc/profile:10 stop only if [[ ${PS1-} ]] See also: --------- **break**, **condition**, **delete**, **enable**, and **disable**." 1 _Dbg_info_breakpoints_complete() { _Dbg_breakpoint_list } typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[info_breakpoints]='-a_Dbg_info_breakpoints_complete' # list breakpoints and break condition. # If $1 is given just list those associated for that line. _Dbg_do_info_breakpoints() { if (( $# >= 3 )) ; then typeset brkpt_num=$3 if [[ $brkpt_num != [0-9]* ]] ; then _Dbg_errmsg "Bad breakpoint number $brkpt_num." elif [[ -z ${_Dbg_brkpt_file[$brkpt_num]} ]] ; then _Dbg_errmsg "Breakpoint entry $brkpt_num is not set." else typeset -r -i i=$brkpt_num typeset source_file=${_Dbg_brkpt_file[$i]} source_file=$(_Dbg_adjust_filename "$source_file") _Dbg_section "Num Type Disp Enb What" _Dbg_printf "%-3d breakpoint %-4s %-3s %s:%s" $i \ ${_Dbg_keep[${_Dbg_brkpt_onetime[$i]}]} \ ${_Dbg_yn[${_Dbg_brkpt_enable[$i]}]} \ "$source_file" ${_Dbg_brkpt_line[$i]} if [[ ${_Dbg_brkpt_cond[$i]} != '1' ]] ; then _Dbg_printf "\tstop only if %s" "${_Dbg_brkpt_cond[$i]}" fi _Dbg_print_brkpt_count $i return 0 fi return 1 fi if (( _Dbg_brkpt_count > 0 )); then typeset -i i _Dbg_section "Num Type Disp Enb What" for (( i=1; i <= _Dbg_brkpt_max ; i++ )) ; do source_file="${_Dbg_brkpt_file[$i]}" if [[ -n ${_Dbg_brkpt_line[$i]} ]] ; then source_file=$(_Dbg_adjust_filename "$source_file") _Dbg_printf "%-3d breakpoint %-4s %-3s %s:%d" $i \ ${_Dbg_keep[${_Dbg_brkpt_onetime[$i]}]} \ ${_Dbg_yn[${_Dbg_brkpt_enable[$i]}]} \ "$source_file" ${_Dbg_brkpt_line[$i]} if [[ ${_Dbg_brkpt_cond[$i]} != '1' ]] ; then _Dbg_printf "\tstop only if %s" "${_Dbg_brkpt_cond[$i]}" fi _Dbg_print_brkpt_count $i fi done else _Dbg_msg 'No breakpoints have been set.' fi } zshdb-1.1.2/command/info_sub/display.sh000066400000000000000000000026641357365030100200630ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "info display" debugger command # # Copyright (C) 2010-2011, 2014, 2016, 2019 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub info display ' **info display** Show all display expressions. See also: --------- *display* ' 1 # List display command(s) _Dbg_do_info_display() { if [ ${#_Dbg_disp_exp[@]} != 0 ]; then typeset i=0 _Dbg_msg "Auto-display statements now in effect:" _Dbg_msg "Num Enb Expression " for (( i=0; i < _Dbg_disp_max; i++ )) ; do if [ -n "${_Dbg_disp_exp[$i]}" ] ;then _Dbg_printf '%-3d %3d %s' \ $i ${_Dbg_disp_enable[$i]} "${_Dbg_disp_exp[$i]}" fi done else _Dbg_msg "No display expressions have been set." fi return 0 } zshdb-1.1.2/command/info_sub/files.sh000066400000000000000000000027221357365030100175130ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "info files" debugger command # # Copyright (C) 2010, 2014, 2019 Rocky Bernstein rocky@gnu.org # # zshdb is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2, or (at your option) any later # version. # # zshdb is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with zshdb; see the file COPYING. If not, write to the Free Software # Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. _Dbg_help_add_sub info files ' **info files** Show a list of files that have been read in and properties regarding them. See also: --------- *load* ' 1 _Dbg_do_info_files() { _Dbg_msg "Source files which we have recorded info about:" unsetopt ksharrays for file canonic_file in ${(kv)_Dbg_file2canonic} ; do typeset -i lines=$(_Dbg_get_maxline "$file") if (( _Dbg_set_basename )) ; then # Do the same with canonic_file ? file="${file##*/}" canonic_file="${canonic_file##*/}" fi _Dbg_msg " ${file}: ${canonic_file}, $lines lines" done setopt ksharrays return 0 } zshdb-1.1.2/command/info_sub/line.sh000066400000000000000000000024021357365030100173330ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "info line" debugger command # # Copyright (C) 2010, 2014, 2016 Rocky Bernstein rocky@gnu.org # # zshdb is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2, or (at your option) any later # version. # # zshdb is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with zshdb; see the file COPYING. If not, write to the Free Software # Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. _Dbg_help_add_sub info line \ '**info line** Show line and filename for stopped position in program. Example: -------- zshdb<1> info line Line 4 of "/etc/profile" See also: --------- **info program**.' 1 _Dbg_do_info_line() { if (( ! _Dbg_running )) ; then _Dbg_errmsg 'No line number information available.' return 1 fi _Dbg_msg "Line $_Dbg_frame_last_lineno of \"$_Dbg_frame_last_filename\"" return 0 } zshdb-1.1.2/command/info_sub/program.sh000066400000000000000000000030221357365030100200520ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "info program" debugger command # # Copyright (C) 2010, 2014, 2016, 2019 Rocky Bernstein rocky@gnu.org # # zshdb is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2, or (at your option) any later # version. # # zshdb is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with zshdb; see the file COPYING. If not, write to the Free Software # Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. _Dbg_help_add_sub info program ' **info program** Information about debugged program stopping point. Example: --------- zshdb<1> info program Program stopped. It stopped after being stepped. Next statement to be run is: [ "\${PS1-}" ] See also: --------- **info line**, and **info source**.' 1 _Dbg_do_info_program() { if (( _Dbg_running )) ; then _Dbg_msg 'Program stopped.' if [[ -n $_Dbg_stop_reason ]] ; then _Dbg_msg "It stopped ${_Dbg_stop_reason}." fi _Dbg_msg "Next statement to be run is:" _Dbg_print_command else _Dbg_errmsg 'The program being debugged is not being run.' return 1 fi return 0 } zshdb-1.1.2/command/info_sub/signals.sh000066400000000000000000000025631357365030100200540ustar00rootroot00000000000000# -*- shell-script -*- # "info signals" debugger command # # Copyright (C) 2010-2011, 2016, 2019 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub info signals \ "**info signals** Show what debugger does when program gets various signals. See also: --------- \"signal\"." 1 # List signal handlers in effect. function _Dbg_do_info_signals { # typeset -a signal_array=($(builtin kill -l)) # typeset -i i trap | while IFS= read -r line; do if [[ ! "$line" =~ "DEBUG$" ]] ; then echo $line | IFS=" " read -A fields signal_name=${fields[-1]} typeset -i len=${#signal_name[@]}+2 _Dbg_msg ${signal_name}: ${line[8,-1]} fi done } zshdb-1.1.2/command/info_sub/source.sh000066400000000000000000000030171357365030100177070ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "info source" debugger command # # Copyright (C) 2010, 2014, 2016, 2019 Rocky Bernstein rocky@gnu.org # # zshdb is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2, or (at your option) any later # version. # # zshdb is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with zshdb; see the file COPYING. If not, write to the Free Software # Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. _Dbg_help_add_sub info source \ '**info source** Information about the current source file. Example: --------- zshdb<1> info source Current script file is /etc/profile Located in /etc/profile Contains 27 lines. See also: --------- **info program**, **info file** and **info line**.' 1 _Dbg_do_info_source() { if (( ! _Dbg_running )) ; then _Dbg_errmsg 'No program not running.' return 1 fi _Dbg_msg "Current script file is $_Dbg_frame_last_filename" _Dbg_msg "Located in ${_Dbg_file2canonic[$_Dbg_frame_last_filename]}" typeset -i max_line max_line=$(_Dbg_get_maxline $_Dbg_frame_last_filename) _Dbg_msg "Contains $max_line lines." return 0 } zshdb-1.1.2/command/info_sub/variables.sh000066400000000000000000000061531357365030100203630ustar00rootroot00000000000000# -*- shell-script -*- # "info variables" debugger command # # Copyright (C) 2010, 2014, 2016, 2019 Rocky Bernstein rocky@gnu.org # # zshdb is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2, or (at your option) any later # version. # # zshdb is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with zshdb; see the file COPYING. If not, write to the Free Software # Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. _Dbg_help_add_sub info variables ' **info variables** [*property*] list global and static variable names. Variable lists by property. *property* is an abbreviation of one of: arrays, exports, fixed, floats, functions, hash, integers, or readonly Examples: --------- info variables # show all variables info variables readonly # show only read-only variables info variables integer # show only integer variables info variables functions # show only functions ' 1 typeset _Dbg_info_var_attrs="array, export, fixed, float, function, hash, integer, or readonly" _Dbg_do_info_variables() { if (($# > 1)) ; then typeset kind="$1" # Remove "info variables xxx" shift; shift; shift case "$kind" in a | ar | arr | arra | array | arrays ) _Dbg_do_list_typeset_attr '+a' $@ return 0 ;; e | ex | exp | expor | export | exports ) _Dbg_do_list_typeset_attr '+x' $@ return 0 ;; fu|fun|func|funct|functi|functio|function|functions ) _Dbg_do_list_typeset_attr '+f' $* return 0 ;; fi|fix|fixe|fixed ) _Dbg_do_list_typeset_attr '+F' $* return 0 ;; fl|flo|floa|float|floats) _Dbg_do_list_typeset_attr '+E' $* return 0 ;; # g | gl | glo | glob | globa | global ) # _Dbg_do_list_globals # return 0 # ;; h | ha | has | hash ) _Dbg_do_list_typeset_attr '+A' $* return 0 ;; i | in | int| inte | integ | intege | integer | integers ) _Dbg_do_list_typeset_attr '+i' $* return 0 ;; # l | lo | loc | loca | local | locals ) # _Dbg_do_list_locals # return 0 # ;; r | re | rea| read | reado | readon | readonl | readonly ) _Dbg_do_list_typeset_attr '+r' $* return 0 ;; * ) _Dbg_errmsg "Don't know how to list variable type: $kind" esac fi _Dbg_errmsg "Need to specify a variable class which is one of: " _Dbg_errmsg "$_Dbg_info_var_attrs" return 1 } zshdb-1.1.2/command/info_sub/warranty.sh000066400000000000000000000043221357365030100202560ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "info warranty" debugger command # # Copyright (C) 2010, 2014, 2016 Rocky Bernstein rocky@gnu.org # # zshdb is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2, or (at your option) any later # version. # # zshdb is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with zshdb; see the file COPYING. If not, write to the Free Software # Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. _Dbg_help_add_sub info warranty \ '**info warranty** Lack of warranty of this debugger.' 1 _Dbg_do_info_warranty() { _Dbg_msg " NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. " return 0 } zshdb-1.1.2/command/kill.sh000066400000000000000000000056511357365030100155440ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "kill" debugger command # # Copyright (C) 2002-2006, 2008-2011, 2016-2019 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add kill \ '**kill** [*signal-number*] **kill!** [*signal-number*] Send this process a POSIX signal ("9" for "SIGKILL" or "kill -SIGKILL") 9 is a non-maskable interrupt that terminates the program. If program is threaded it may be expedient to use this command to terminate the program. However other signals, such 15 or `-INT` which allow for the debugged program to run an interrupt handler can be sent too. Giving a negative number is the same as using its positive value. When the ! suffix appears, no confirmation is neeeded. Examples: --------- kill # non-interuptable, nonmaskable kill kill 9 # same as above kill -9 # same as above kill 15 # nicer, maskable TERM signal kill! 15 # same as above, but no confirmation kill -INT # same as above kill -SIGINT # same as above kill -WINCH # send "window change" signal kill -USR1 # send "user 1" signal See also: --------- **quit** for less a forceful termination command. **run** is a way to restart the debugged program.' _Dbg_do_kill() { if (($# > 1)); then _Dbg_errmsg "Got $# parameters, but need 0 or 1." return 0 # return 1 fi typeset _Dbg_response='n' if [[ "${_Dbg_orig_cmd[-1,-1]}" == '!' ]]; then _Dbg_response='y' fi typeset _Dbg_prompt_output=${_Dbg_tty:-/dev/null} typeset signal='-9' (($# == 1)) && signal="$1" if [[ ${signal[0,0]} != '-' ]] ; then _Dbg_errmsg "Kill signal ($signal) should start with a '-'" return 0 # return 2 fi if [[ $_Dbg_response == n ]] ; then _Dbg_confirm "Send kill signal ${signal} which may terminate the debugger? (y/N): " 'n' fi if [[ $_Dbg_response == [yY] ]] ; then case $signal in -9 | -SEGV ) _Dbg_cleanup2 ;; esac kill $signal $$ else _Dbg_errmsg "Kill not done - not confirmed." return 0 # return 3 fi return 0 } _Dbg_alias_add 'kill!' 'kill' zshdb-1.1.2/command/list.sh000066400000000000000000000112211357365030100155520ustar00rootroot00000000000000# -*- shell-script -*- # list.sh - Some listing commands # # Copyright (C) 2008, 2009, 2010, 2011, 2016, 2017 # Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add list \ '**list**[**>**] [*location*|**.**|**-**] [*num*] List source code. Without arguments, print lines centered around the current line. If *location* is given, that number of lines is shown. If this is the first list command issued since the debugger command loop was entered, then the current line is the current frame. If a subsequent list command was issued with no intervening frame changing, then that is start the line after we last one previously shown. A *location* is either: * a number, e.g. 5, * a filename, colon, and a number, e.g. `/etc/profile:5`, * a "." for the current line number * a "-" for the lines before the current linenumber By default aliases **l>** and **list>** are set to list. In this case and more generally when the alias ends in ">", rather than center lines around *location* that will be used as the starting point. Examples: --------- list 5 # List starting from line 5 list 4+1 # Same as above. list /etc/profile:5 # List starting from line 5 of /etc/profile list /etc/profile 5 # Same as above. list /etc/profile 5 6 # list lines 5 and 6 of /etc/profile list /etc/profile 5 2 # Same as above, since 2 < 5. list profile:5 2 # List two lines starting from line 5 of profile list . # List lines centered from where we currently are stopped list - # List lines previous to those just shown See also: --------- **set listsize** or **show listsize** to see or set the value. ' # l [start|.|-] [cnt] List cnt lines from line start. _Dbg_do_list() { typeset first_arg typeset -i adjust_line=1 [[ ${_Dbg_cmd[-1,-1]} == '>' ]] && adjust_line=0 if (( $# == 0 )) ; then if ((_Dbg_listline < 0 )) ; then first_arg='.' else first_arg=$_Dbg_listline adjust_line=0 fi else first_arg="$1" shift fi typeset count=${1:-$_Dbg_set_listsize} if [[ $first_arg == '.' ]] ; then first_arg=$_Dbg_frame_last_lineno elif [[ $first_arg == '-' ]] ; then typeset -i start_line if ((_Dbg_listline < 0 )) ; then ((start_line=_Dbg_frame_last_lineno-_Dbg_set_listsize)) else ((start_line=_Dbg_listline-2*_Dbg_set_listsize)) fi if (( start_line <= 0 )) ; then ((count=count+start_line-1)) start_line=1 fi first_arg=$start_line fi typeset filename typeset -i line_number typeset full_filename _Dbg_linespec_setup $first_arg _Dbg_last_cmd='list' if [[ -n $full_filename ]] ; then if ((1 == adjust_line)); then ((line_number -= count/2)) fi (( line_number <= 0 )) && line_number=1 _Dbg_check_line $line_number "$full_filename" (( $? == 0 )) && \ _Dbg_list "$full_filename" "$line_number" $count else _Dbg_file_not_read_in "$filename" fi return 0 } # _Dbg_do_list_globals() { # (($# != 0)) && return 1 # list=(${(k)parameters[(R)*^local*]}) # typeset -i rc=$? # (( $rc != 0 )) && return $rc # _Dbg_list_columns # return $? # } # _Dbg_do_list_locals() { # (($# != 0)) && return 1 # list=(${(k)parameters[(R)*local*]}) # typeset -i rc=$? # (( $rc != 0 )) && return $rc # _Dbg_list_columns # return $? # } # List in column form variables having attribute $1. # A grep pattern can be given in $2. ! indicates negation. _Dbg_do_list_typeset_attr() { (($# == 0)) && return 1 typeset attr="$1"; shift typeset -a list list=( $(_Dbg_get_typeset_attr "$attr" $*) ) typeset -i rc=$? (( rc != 0 )) && return $rc _Dbg_list_columns return $? } _Dbg_alias_add l list _Dbg_alias_add 'l>' list _Dbg_alias_add 'list>' list zshdb-1.1.2/command/load.sh000066400000000000000000000031371357365030100155250ustar00rootroot00000000000000# -*- shell-script -*- # Debugger load SCRIPT command. # # Copyright (C) 2002-2006, 2008, 2010-2011, # 2018-2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add load \ '**load** *zsh-script* Read in lines of a *zsh-script*. See also: --------- **info files** ' _Dbg_do_load() { if (( $# != 1 )) ; then _Dbg_errmsg "Expecting one filename parameter, Got $#." return 1 fi typeset filename="$1" local full_filename=$(_Dbg_resolve_expand_filename "$filename") if [ -n "$full_filename" ] && [ -r "$full_filename" ] ; then # Have we already loaded in this file? for file in ${_Dbg_filenames[@]} ; do if [[ $file == $full_filename ]] ; then _Dbg_msg "File $full_filename already loaded." return 2 fi done _Dbg_readin "$full_filename" _Dbg_msg "File $full_filename loaded." else _Dbg_errmsg "Couldn't resolve or read $filename" return 3 fi return 0 } zshdb-1.1.2/command/next.sh000066400000000000000000000043211357365030100155600ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "next" (step through) commmand. # # Copyright (C) 2008, 2010, 2016 Rocky Bernstein rocky@gnu.org # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. # Sets whether or not to display command to be executed in debugger prompt. # If yes, always show. If auto, show only if the same line is to be run # but the command is different. _Dbg_help_add next \ "**next** [*count*] Single step an statement skipping functions. If *count* is given, stepping occurs that many times before stopping. Otherwise *count* is one. *count* an be an arithmetic expression. Functions and source'd files are not traced. This is in contrast to **step**. See also: --------- **skip**." 1 # Next command # $1 is command next+, next-, or next # $2 is an optional additional count. _Dbg_do_next() { _Dbg_not_running && return 1 _Dbg_last_cmd="$_Dbg_cmd" _Dbg_last_next_step_cmd="$_Dbg_cmd" _Dbg_last_next_step_args="$@" typeset count=${1:-1} case "${_Dbg_last_next_step_cmd[-1,-1]}" in '+' ) _Dbg_step_force=1 ;; '-' ) _Dbg_step_force=0 ;; '' ) _Dbg_step_force=$_Dbg_set_different ;; * ) ;; esac if [[ $count == [0-9]* ]] ; then _Dbg_step_ignore=${count:-1} else _Dbg_errmsg "Argument ($count) should be a number or nothing." _Dbg_step_ignore=1 return 0 fi _Dbg_write_journal_eval "_Dbg_return_level=${#_Dbg_frame_stack[@]}" _Dbg_write_journal "_Dbg_step_ignore=$_Dbg_step_ignore" _Dbg_write_journal "_Dbg_step_force=$_Dbg_step_force" _Dbg_continue_rc=0 return 0 } _Dbg_alias_add 'n' 'next' zshdb-1.1.2/command/pwd.sh000066400000000000000000000020641357365030100153760ustar00rootroot00000000000000# -*- shell-script -*- # Debugger pwd command. # # Copyright (C) 2002-2004, 2006, 2008, 2010, 2016 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add pwd \ '**pwd** Show working directory.' _Dbg_do_pwd() { typeset _Dbg_cwd; _Dbg_cwd=$(pwd) (( _Dbg_set_basename )) && _Dbg_cwd=${_Dbg_cwd##*/} _Dbg_msg "Working directory ${_Dbg_cwd}." } zshdb-1.1.2/command/quit.sh000066400000000000000000000053741357365030100155750ustar00rootroot00000000000000# -*- shell-script -*- # quit.sh - gdb-like "quit" debugger command # # Copyright (C) 2008, 2010-2011, 2014, 2018-2019 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add quit \ '**quit** [*exit-code* [*shell-levels*]] Gently quit the debugger. The program being debugged is aborted. If *exit-code* is given, then that will be the exit return code. If *shell-levels* is given, then up to that many nested shells are quit. However to be effective, the last of those shells should have been run under the debugger. See also: --------- **kill**, **run** and **restart**.' _Dbg_do_quit() { typeset -i return_code=${1:-$_Dbg_program_exit_code} typeset -i desired_quit_levels=${2:-0} if [[ $desired_quit_levels != [0-9]* ]] ; then _Dbg_errmsg "Argument ($desired_quit_levels) should be a number or nothing." return 0 fi if (( desired_quit_levels == 0 \ || desired_quit_levels > ZSH_SUBSHELL+1)) ; then ((desired_quit_levels=ZSH_SUBSHELL+1)) fi ((_Dbg_QUIT_LEVELS+=desired_quit_levels)) # Reduce the number of recorded levels that we need to leave by # if _Dbg_QUIT_LEVELS is greater than 0. ((_Dbg_QUIT_LEVELS--)) ## write this to the next level up can read it. _Dbg_write_journal "_Dbg_QUIT_LEVELS=$_Dbg_QUIT_LEVELS" _Dbg_write_journal "_Dbg_step_ignore=$_Dbg_step_ignore" # Reset signal handlers to their default but only if # we are not in a subshell. if (( ZSH_SUBSHELL == 0 )) ; then # If we were told to restart from deep down, restart instead of quit. if [ -n "$_Dbg_RESTART_COMMAND" ] ; then _Dbg_erase_journals _Dbg_save_state exec $_Dbg_RESTART_COMMAND fi _Dbg_msg "${_Dbg_debugger_name}: That's all, folks..." # Get the last command into the history # set -o incappendhistory print -s -- $_Dbg_orig_cmd >/dev/null _Dbg_cleanup fi # And just when you thought we'd never get around to it... exit $return_code } _Dbg_alias_add q quit _Dbg_alias_add q! quit _Dbg_alias_add exit quit zshdb-1.1.2/command/return.sh000066400000000000000000000030321357365030100161170ustar00rootroot00000000000000# -*- shell-script -*- # return command. # # Copyright (C) 2008, 2010, 2016 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add return \ '**return** [*return-value*] Force an immediate return from a function. The remainder of function will not be executed. If *return-value* is given, it should be an integer and will be the return value passed back as $?. See also: --------- **finish**, **quit**, and **run**. ' # Return value when a return is taken. typeset -i _Dbg_return_rc=0 _Dbg_do_return() { rc=${1:-0} if [[ $_Dbg_return_rc == [0-9]* ]] ; then _Dbg_return_rc=$rc else _Dbg_errmsg "Argument ($rc) should be a number or nothing." _Dbg_skip_ignore=0 return 0 fi _Dbg_write_journal_eval "_Dbg_step_ignore=1" _Dbg_last_cmd='return' _Dbg_continue_rc 255 return 0 } zshdb-1.1.2/command/run.sh000066400000000000000000000052131357365030100154070ustar00rootroot00000000000000# -*- shell-script -*- # run command. # # Copyright (C) 2008-2010, 2016 Rocky Bernstein rocky@gnu.org # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. # Restart script in same way with saved arguments (probably the same # ones as we were given before). _Dbg_help_add run \ '**run** [*args*] Attempt to restart the program. See also: --------- **kill** and **quit** for termintation commands, or **set args** for another way to set run arguments.' _Dbg_do_run() { typeset script_args typeset exec_cmd if (( $# == 0 )) ; then script_args=${_Dbg_script_args[@]} typeset SH_RUN_CMDLINE; _Dbg_run_cmdline if [[ -n $SH_RUN_CMDLINE ]] ; then exec_cmd="$SH_RUN_CMDLINE"; else exec_cmd="$_Dbg_script_file" [[ -n $script_args ]] && exec_cmd+=" $script_args" fi else exec_cmd="$_Dbg_script_file" script_args=$@ [[ -n $script_args ]] && exec_cmd+=" $script_args" fi if (( !_Dbg_script )); then # if [[ $_cur_source_file == $_Dbg_bogus_file ]] ; then # script_args="--debugger -c \"$SH_EXECUTION_STRING\"" # exec_cmd="$SH_RUN_CMDLINE --debugger -c \"$SH_EXECUTION_STRING\""; # else # exec_cmd="$SH_RUN_CMDLINE --debugger $_Dbg_orig_0 $script_args"; # fi : fi if (( _Dbg_set_basename )) ; then _Dbg_msg "Restarting with: $script_args" else _Dbg_msg "Restarting with: $exec_cmd" fi # If we are in a subshell we need to get out of those levels # first before we restart. The strategy is to write into persistent # storage the restart command, and issue a "quit." The quit should # discover the restart at the last minute and issue the restart. if (( ZSH_SUBSHELL > 0 )) ; then _Dbg_msg "Note you are in a subshell. We will need to leave that first." _Dbg_write_journal "_Dbg_RESTART_COMMAND=\"$exec_cmd\"" _Dbg_do_quit 0 fi _Dbg_save_state builtin cd $_Dbg_init_cwd _Dbg_cleanup eval "exec $exec_cmd" } _Dbg_alias_add R run _Dbg_alias_add restart run zshdb-1.1.2/command/set.sh000066400000000000000000000056741357365030100154110ustar00rootroot00000000000000# -*- shell-script -*- # set.sh - debugger settings # # Copyright (C) 2008, 2010-2011, 2014 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; see the file COPYING. If not, write to the Free Software # Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. # Sets whether or not to display command to be executed in debugger prompt. # If yes, always show. If auto, show only if the same line is to be run # but the command is different. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && _Dbg_libdir='..' || _Dbg_libdir=${dirname}/.. for lib_file in help alias ; do source $_Dbg_libdir/lib/${lib_file}.sh; done typeset -A _Dbg_complete_level_1_data fi typeset -A _Dbg_debugger_info_commands typeset -i _Dbg_set_linewidth; _Dbg_set_linewidth=${COLUMNS:-80} typeset -i _Dbg_linetrace_expand=0 # expand variables in linetrace output typeset _Dbg_linetrace_delay=1 # sleep after linetrace typeset -A _Dbg_debugger_set_commands typeset -A _Dbg_command_help_set typeset -i _Dbg_set_autoeval=0 # Evaluate unrecognized commands? typeset -i _Dbg_set_autolist=0 # SHow listing when stopped typeset -i _Dbg_set_listsize=10 # How many lines in a listing? _Dbg_help_add set '' # Help routine is elsewhere # Load in "set" subcommands for _Dbg_file in ${_Dbg_libdir}/command/set_sub/*.sh ; do source "$_Dbg_file" done _Dbg_complete_level_1_data[set]=$(echo ${(kM)_Dbg_debugger_set_commands}) _Dbg_do_set() { _Dbg_do_set_internal "$@" return $? } _Dbg_do_set_internal() { typeset set_cmd="$1" typeset rc if [[ $set_cmd == '' ]] ; then _Dbg_msg "Argument required (expression to compute)." return; fi _Dbg_last_cmd='set' shift if [[ -n ${_Dbg_debugger_set_commands[$set_cmd]} ]] ; then ${_Dbg_debugger_set_commands[$set_cmd]} $label "$@" return $? fi case $set_cmd in force | dif | diff | differ | different ) _Dbg_set_onoff "$1" 'different' ;; inferior-tty ) _Dbg_set_tty "$@" ;; lo | log | logg | loggi | loggin | logging ) _Dbg_cmd_set_logging $@ ;; t|tr|tra|trac|trace|trace-|trace-c|trace-co|trace-com|trace-comm|trace-comma|trace-comman|trace-command|trace-commands ) _Dbg_do_set_trace_commands $@ ;; *) _Dbg_undefined_cmd "set" "$set_cmd" return -1 esac return $? } zshdb-1.1.2/command/set_sub/000077500000000000000000000000001357365030100157125ustar00rootroot00000000000000zshdb-1.1.2/command/set_sub/.gitignore000066400000000000000000000000341357365030100176770ustar00rootroot00000000000000/*~ /Makefile /Makefile.in zshdb-1.1.2/command/set_sub/Makefile.am000066400000000000000000000002231357365030100177430ustar00rootroot00000000000000MOSTLYCLEANFILES = *.orig *.rej pkgdatadir = ${datadir}/@PACKAGE@/command/set_sub pkgdata_DATA = $(wildcard *.sh) EXTRA_DIST = $(pkgdata_DATA) zshdb-1.1.2/command/set_sub/annotate.sh000066400000000000000000000036771357365030100200740ustar00rootroot00000000000000# -*- shell-script -*- # "set annotate" debugger command # # Copyright (C) 2010-2011, 2014, 2016, 2019 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[set_annotate]='0 1' _Dbg_help_add_sub set annotate \ '**set annotate** {**0**|**1**} Set annotation level. This is a (mostly obsolete) gdb setting, but it is used in GNU Emacs. 0 - normal 1 - fullname (for use when running under GNU Emacs). See also: --------- **show annotate** ' _Dbg_do_set_annotate() { if (( $# == 0 )) ; then _Dbg_msg "Argument required (an integer to set 'annotate' to.)." elif [[ "$1" == [0-9]* ]] ; then if (( $1 > 3 || $1 < 0)); then _Dbg_msg "Annotation level must be between 0 and 3. Got: ${1}." else _Dbg_write_journal_eval "_Dbg_set_annotate=$1" fi else _Dbg_errmsg "Integer argument expected; got: $1" return -1 fi return 0 } zshdb-1.1.2/command/set_sub/args.sh000066400000000000000000000026251357365030100172070ustar00rootroot00000000000000# -*- shell-script -*- # "set args" debugger command # # Copyright (C) 2010-2011, 2016, 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub set args \ '**set** *args** *script-args* Set argument list to give program being debugged when it is started. Follow this command with any number of args, to be passed to the program. See also: --------- **run** ' _Dbg_do_set_args() { # We use the loop below rather than _Dbg_set_args="(@)" because # we want to preserve embedded blanks in the arguments. _Dbg_script_args=() typeset -i i typeset -i n=$# for (( i=0; i # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[set_autoeval]='on off' _Dbg_help_add_sub set autoeval \ '**set autoeval** [**on**|**off**] Evaluate unrecognized debugger commands. Often inside the debugger, one would like to be able to run arbitrary zsh commands without having to preface zsh expressions with ``print`` or ``eval``. Setting *autoeval* on will cause unrecognized debugger commands to be *eval* as a zsh expression. Note that if this is set, on error the message shown on type a bad debugger command changes from: Undefined command: "fdafds". Try "help". to something more zsh-eval-specific such as: /tmp/zshdb_eval_26397:2: command not found: fdafds See also: --------- **show autoeval** ' _Dbg_do_set_autoeval() { _Dbg_set_onoff "$1" 'autoeval' return $? } zshdb-1.1.2/command/set_sub/autolist.sh000066400000000000000000000035541357365030100201210ustar00rootroot00000000000000# -*- shell-script -*- # "set autolist" debugger command # # Copyright (C) 2010-2011, 2014, 2016 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[set_autolist]='on off' _Dbg_help_add_sub set autolist \ '**set autolist** [**on**|**off**] Run a "list" command automatically every time the debugger enters. See also: --------- **show autolist** ' _Dbg_do_set_autolist() { typeset onoff=${1:-'off'} case $onoff in on | 1 ) _Dbg_write_journal_eval "_Dbg_cmdloop_hooks[\"list\"]=_Dbg_do_list" ;; off | 0 ) _Dbg_write_journal_eval "unset '_Dbg_cmdloop_hooks[\"list\"]'" unset '_Dbg_cmdloop_hooks[\"list\"]' ;; * ) _Dbg_errmsg "\"on\" or \"off\" expected." return 1 esac _Dbg_do_show 'autolist' return 0 } zshdb-1.1.2/command/set_sub/basename.sh000066400000000000000000000027011357365030100200210ustar00rootroot00000000000000# -*- shell-script -*- # "set basename" debugger command # # Copyright (C) 2011, 2014, 2016 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[set_basename]='on off' _Dbg_help_add_sub set basename \ '**set basename** [**on**|**off**] Set short filenames (the basename) in debug output See also: --------- **show basename** ' _Dbg_do_set_basename() { _Dbg_set_onoff "$1" 'basename' return $? } zshdb-1.1.2/command/set_sub/confirm.sh000066400000000000000000000026451357365030100177120ustar00rootroot00000000000000# -*- shell-script -*- # "set confirm" debugger command # # Copyright (C) 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[set_confirm]='on off' _Dbg_help_add_sub set confirm \ '**set confirm** [**on**|**off**] Set confirmation of dangerous operations. See also: --------- **show confirm** ' _Dbg_do_set_confirm() { _Dbg_set_onoff "$1" 'confirm' return $? } zshdb-1.1.2/command/set_sub/debug.sh000066400000000000000000000025061357365030100173370ustar00rootroot00000000000000# -*- shell-script -*- # "set debug" debugger command # # Copyright (C) 2011, 2014 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[set_debug]='on off' _Dbg_help_add_sub set debug \ 'Set debug the debugger' 1 _Dbg_do_set_debug() { _Dbg_set_onoff "$1" 'debug' return $? } zshdb-1.1.2/command/set_sub/different.sh000066400000000000000000000036141357365030100202200ustar00rootroot00000000000000# -*- shell-script -*- # "set different" debugger command # # Copyright (C) 2011, 2014, 2016, 2019 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[set_different]='on off' _Dbg_help_add_sub set different \ '**set different** [**off**|**on**] Set consecutive stops must be on different file/line positions. If no argument is given, different is set "off". One of the challenges of debugging is getting the granualarity of stepping comfortable. By setting different "on" you can set a more coarse-level of stepping which often still is small enough that you will not miss anything important. Note that the **step** and **next** debugger commands have **+** and **-** suffixes if you wan to override this setting on a per-command basis. See also: --------- **show different**' _Dbg_do_set_different() { _Dbg_set_onoff "$1" 'different' return $? } zshdb-1.1.2/command/set_sub/editing.sh000066400000000000000000000040501357365030100176700ustar00rootroot00000000000000# -*- shell-script -*- # "set editing" debugger command # # Copyright (C) 2010-2011, 2014, 2019 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[set_editing]='emacs on off vi' _Dbg_help_add_sub set editing \ '**set editing** [ **on** | **off** | **emacs** | **vi** ] Readline editing of command lines See also: --------- **show editing** ' _Dbg_do_set_editing() { typeset onoff=${1:-'on'} case $onoff in e | em | ema | emac | emacs ) _Dbg_edit='-e' _Dbg_edit_style='emacs' builtin bindkey -e ;; on | 1 ) _Dbg_edit='-e' _Dbg_edit_style='emacs' builtin bindkey -e ;; off | 0 ) _Dbg_edit='' return 0 ;; v | vi ) _Dbg_edit='-e' _Dbg_edit_style='vi' builtin bindkey -v ;; * ) _Dbg_errmsg '"on", "off", "vi", or "emacs" expected.' return 1 esac return 0 } zshdb-1.1.2/command/set_sub/highlight.sh000066400000000000000000000050141357365030100202150ustar00rootroot00000000000000# -*- shell-script -*- # "set highlight" debugger command # # Copyright (C) 2011, 2014-2016 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[set_highlight]='dark light off reset' _Dbg_help_add_sub set highlight \ ' **set** **highlight** [**dark**|**light**|**off**|**reset**] Set using terminal highlight. Use **reset** to set highlighting on and force a redo of syntax highlighting of already cached files. This may be needed if the debugger was started without syntax highlighting initially. **dark** sets sets for highlighting for a terminal with a dark background and **light** set for highlighting for a terminal with a light background. See also: --------- **show highlight**. ' _Dbg_do_set_highlight() { if ( pygmentize --version || pygmentize -V ) 2>/dev/null 1>/dev/null ; then : else _Dbg_errmsg "Can't run pygmentize. Setting forced off" return 1 fi typeset onoff=${1:-'light'} case $onoff in on | light ) _Dbg_set_highlight='light' _Dbg_filecache_reset _Dbg_readin $_Dbg_frame_last_filename ;; dark ) _Dbg_set_highlight='dark' _Dbg_filecache_reset _Dbg_readin $_Dbg_frame_last_filename ;; off | 0 ) _Dbg_set_highlight='' ;; reset ) [[ -z $_Dbg_set_highlight ]] && _Dbg_set_highlight='light' _Dbg_filecache_reset _Dbg_readin $_Dbg_frame_last_filename ;; * ) _Dbg_errmsg '"dark", "light", "off", or "reset" expected.' return 1 esac _Dbg_do_show highlight return 0 } zshdb-1.1.2/command/set_sub/history.sh000066400000000000000000000051221357365030100177470ustar00rootroot00000000000000# -*- shell-script -*- # "set history" debugger command # # Copyright (C) 2010-2011, 2014, 2016 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[set_history]='filename save size' _Dbg_help_add_sub set history \ '**set history save** [**on**|**off**] **set history size** *num* **set history filename** *path* In the first form, set whether to save history. This only works if the debugger or zsh was started in interactive mode, option --interactive or -i In the second form, how many history lines to save is indicated. In the third form, the place to store the history file is given. ' _Dbg_do_set_history() { case "$1" in sa | sav | save ) typeset onoff=${2:-'on'} if [[ onoff == 'on' ]] && ! setopt | grep interactive 2>&1 >/dev/null; then _Dbg_errmsg "zsh was not started interactively, can't save history" _Dbg_set_history=0 return -1 fi _Dbg_set_onoff $onoff 'history' ;; si | siz | size ) if [[ -z $2 ]] ; then _Dbg_errmsg "Argument required (integer to set it to.)." elif [[ $2 != [0-9]* ]] ; then _Dbg_errmsg "Integer argument expected; got: $2" return -1 fi _Dbg_write_journal_eval "_Dbg_history_size=$2" ;; file | filename ) # TODO: check validity of filename _Dbg_write_journal_eval "_Dbg_histfile=$2" ;; *) _Dbg_errmsg "\"filename\", \"save\", or \"size\" expected." return -1 ;; esac return 0 } zshdb-1.1.2/command/set_sub/linetrace.sh000066400000000000000000000050241357365030100202150ustar00rootroot00000000000000# -*- shell-script -*- # "set linetrace" debugger command # # Copyright (C) 2010, 2014, 2016 Rocky Bernstein rocky@gnu.org # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[set_linetrace]='on off delay expand' _Dbg_help_add_sub set linetrace \ '**set linetrace** [**on**|**off**] Set xtrace-style line tracing See also: --------- **show linetrace** ' _Dbg_do_set_linetrace() { typeset onoff=${1:-'off'} case $onoff in on | 1 ) _Dbg_write_journal_eval "_Dbg_set_linetrace=1" ;; off | 0 ) _Dbg_write_journal_eval "_Dbg_set_linetrace=0" ;; d | de | del | dela | delay ) if [[ $2 != [0-9]* ]] ; then _Dbg_errmsg "Bad integer parameter: $2" return 1 fi eval "$_resteglob" _Dbg_write_journal_eval "_Dbg_linetrace_delay=$2" ;; e | ex | exp | expa | expan | expand ) typeset onoff=${2:-'on'} case $onoff in on | 1 ) _Dbg_write_journal_eval "_Dbg_linetrace_expand=1" ;; off | 0 ) _Dbg_write_journal_eval "_Dbg_linetrace_expand=0" ;; * ) _Dbg_errmsg "\"expand\", \"on\" or \"off\" expected." return 1 ;; esac ;; * ) _Dbg_msg "\"expand\", \"on\" or \"off\" expected." return 1 esac return 0 } zshdb-1.1.2/command/set_sub/listsize.sh000066400000000000000000000030031357365030100201100ustar00rootroot00000000000000# -*- shell-script -*- # "set listsize" debugger command # # Copyright (C) 2010-2011, 2014 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi _Dbg_help_add_sub set listsize \ '**set listsize** *number-of-lines* Set the number of source lines debugger will list by default. See also: --------- **show listsize** ' _Dbg_do_set_listsize() { if [[ $1 == [0-9]* ]] ; then _Dbg_write_journal_eval "_Dbg_set_listsize=$1" else _Dbg_errmsg "Integer argument expected; got: $1" return -1 fi return 0 } zshdb-1.1.2/command/set_sub/prompt.sh000066400000000000000000000017561357365030100176000ustar00rootroot00000000000000# -*- shell-script -*- # "set prompt" debugger command # # Copyright (C) 2011, 2016 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub set prompt \ '**set prompt** [*prompt-template*] Set debugger prompt string' 1 _Dbg_do_set_prompt() { _Dbg_prompt_str="$1" return $? } zshdb-1.1.2/command/set_sub/showcommand.sh000066400000000000000000000036551357365030100205760ustar00rootroot00000000000000# -*- shell-script -*- # "set showcommand" debugger command # # Copyright (C) 2010, 2014 Rocky Bernstein rocky@gnu.org # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands typeset -A _Dbg_complete_level_2_data fi _Dbg_help_add_sub set showcommand \ 'Set showing the command to execute' 1 # Sets whether or not to display command to be executed in debugger prompt. # If yes, always show. If auto, show only if the same line is to be run # but the command is different. typeset _Dbg_set_show_command="auto" _Dbg_complete_level_2_data[set_showcommand]='on off auto' _Dbg_do_set_showcommand() { case "$1" in 1 ) _Dbg_write_journal_eval "_Dbg_set_show_command=on" ;; 0 ) _Dbg_write_journal_eval "_Dbg_set_show_command=off" ;; on | off | auto ) _Dbg_write_journal_eval "_Dbg_set_show_command=$1" ;; * ) _Dbg_errmsg "\"on\", \"off\" or \"auto\" expected." esac return 0 } zshdb-1.1.2/command/set_sub/style.sh000066400000000000000000000047311357365030100174130ustar00rootroot00000000000000# -*- shell-script -*- # "set style" debugger command # # Copyright (C) 2016-2017, 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi typeset -x _Dbg_pygments_styles='' if (( _Dbg_working_term_highlight )) ; then _Dbg_pygments_styles=$(${_Dbg_libdir}/lib/term-highlight.py -L) fi typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[set_style]="$_Dbg_pygments_styles off" _Dbg_help_add_sub set style \ ' **set** **style** [*pygments-style* | **off**] Set the pygments style use in source-code listings to *pygments-style* or remove any pygments formatting if *pygments-style* is **off**. See also: --------- See also: **set highlight**, **show style**, and **show highlight**. ' _Dbg_list_styles() { typeset -a list=( $_Dbg_pygments_styles ) _Dbg_msg "Valid styles are:" _Dbg_list_columns ' ' _Dbg_msg } _Dbg_do_set_style() { if (( ! _Dbg_working_term_highlight )) ; then _Dbg_errmsg "Can't run term-highlight. Setting forced off" return 1 fi if (( $# == 0 )) ; then _Dbg_list_styles else style=$1 if [[ "${style}" == "off" ]] ; then _Dbg_set_style='' _Dbg_filecache_reset _Dbg_readin $_Dbg_frame_last_filename _Dbg_do_show style elif [[ "${_Dbg_pygments_styles#*$style}" != "$_Dbg_pygments_styles" ]] ; then _Dbg_set_style=$style _Dbg_filecache_reset _Dbg_readin $_Dbg_frame_last_filename _Dbg_do_show style else _Dbg_errmsg "Can't find style $style" _Dbg_list_styles fi fi return 0 } zshdb-1.1.2/command/set_sub/trace-commands.sh000066400000000000000000000036011357365030100211430ustar00rootroot00000000000000# -*- shell-script -*- # "set trace-commands" debugger command # # Copyright (C) 2010-2011, 2014 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_set typeset -A _Dbg_debugger_set_commands fi typeset -A _Dbg_complete_level_2_data _Dbg_complete_level_2_data[trace-commands]='on off' # Sets whether or not to display command before executing it. typeset _Dbg_set_trace_commands='off' # Handled special because of the dash in the command name. # _Dbg_help_add_sub set trace-commands \ # 'Set showing debugger commands' 1 _Dbg_do_set_trace_commands() { case "$1" in 1 ) _Dbg_write_journal_eval "_Dbg_set_trace_commands=on" ;; 0 ) _Dbg_write_journal_eval "_Dbg_set_trace_commands=off" ;; on | off ) _Dbg_write_journal_eval "_Dbg_set_trace_commands=$1" ;; * ) _Dbg_errmsg "\"on\", \"off\" expected." return 1 esac return $? } zshdb-1.1.2/command/set_sub/width.sh000066400000000000000000000022121357365030100173620ustar00rootroot00000000000000# -*- shell-script -*- # "set width" debugger command # # Copyright (C) 2010-2011, 2016 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub set width \ '**set** **width** *width* Set maximum width of lines to *width*.' _Dbg_do_set_width() { if [[ $1 == [0-9]* ]] ; then _Dbg_write_journal_eval "_Dbg_set_linewidth=$1" else _Dbg_errmsg "Integer argument expected; got: $1" return 1 fi return 0 } zshdb-1.1.2/command/shell.sh000066400000000000000000000075271357365030100157240ustar00rootroot00000000000000# -*- shell-script -*- # Enter nested shell # # Copyright (C) 2011, 2014, 2016, 2018 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_restore_info="${_Dbg_tmpdir}/${_Dbg_debugger_name}_restore_$$" _Dbg_help_add shell \ "**shell** [*options*] Options: -------- --no-fns | -F : don't copy in function definitions from parent shell --no-vars | -V : don't copy in variable definitions --shell SHELL_NAME --posix : corresponding shell option --login | l : corresponding shell option --noprofile : corresponding shell option --norc : corresponding shell option Enter a nested shell, not a subshell. Before entering the shell current variable definitions and function definitions are stored in profile $_Dbg_shell_temp_profile. which is is read in via the **--init-file** option. If you don't want variable definitions to be set, use option **-V** or **--no-vars**. If you don't want function definitions to be set, use option **-F** or **--no-fns**. There are several corresponding shell options. Many of these by nature defeate reading on saved functions and variables. The shell that used is taken from the shell used to build the debugger which is: $_Dbg_shell_name. Use **--shell** to use a different compatible shell. By default, variables set or changed in the shell do not persist after the shell is left to to back to the debugger or debugged program. However you can tag variables to persist by running the function 'save_vars' which takes a list of variable names. You can run this as many times as you want with as many variable names as you want. For example: save_vars PROFILE PARSER marks variable PROFILE and PARSER to be examined and their values used in the trap EXIT of the shell. " _Dbg_parse_shell_cmd_options() { OPTLIND='' while getopts_long lFV opt \ no-fns 0 \ login no_argument \ shell required_argument \ no-vars 0 \ '' $@ do case "$opt" in F | no-fns ) _Dbg_o_fns=0;; V | no-vars ) _Dbg_o_vars=0;; shell ) shell=$OPTARG;; norc | posix | restricted | login | l | noediting | noprofile ) _Dbg_shell_opts+="--$opt" ;; * ) return 1 ;; esac done return 0 } _Dbg_do_shell() { typeset -i _Dbg_o_fns; _Dbg_o_fns=1 typeset -i _Dbg_o_vars; _Dbg_o_vars=1 typeset _Dbg_shell_opts='' typeset shell=$_Dbg_shell if (($# != 0)); then _Dbg_parse_shell_cmd_options $@ (( $? != 0 )) && return fi typeset -i _Dbg_rc _Dbg_shell_new_shell_profile $_Dbg_o_vars _$Dbg_o_fns # Set prompt and $0 in new shell print "PS1='${_Dbg_debugger_name} $ '" >>"$_Dbg_shell_temp_profile" print "0=$_Dbg_dollar_0" >> "$_Dbg_shell_temp_profile" ZDOTDIR=$_Dbg_tmpdir $shell -o TYPESET_SILENT $shell_opts rc=$? _Dbg_restore_from_nested_shell # FIXME: put in _Dbg_restore_from_nested_shell (( 1 == _Dbg_running )) && _Dbg_print_location_and_command } _Dbg_alias_add sh shell _Dbg_alias_add zsh shell zshdb-1.1.2/command/show.sh000066400000000000000000000156301357365030100155670ustar00rootroot00000000000000# -*- shell-script -*- # show.sh - Show debugger settings # # Copyright (C) 2008, 2010-2011, 2014, 2019 # Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && _Dbg_libdir='..' || _Dbg_libdir=${dirname}/.. for lib_file in help alias ; do source $_Dbg_libdir/lib/${lib_file}.sh; done typeset -A _Dbg_complete_level_1_data fi typeset -A _Dbg_debugger_show_commands typeset -A _Dbg_command_help_show # subcommands whose current values are not shown in a "show" list . # These are things like alias, warranty, or copying. # They are available if asked for explicitly, e.g. "show copying" typeset -A _Dbg_show_nolist _Dbg_help_add show '' # Help routine is elsewhere # Load in "show" subcommands for _Dbg_file in ${_Dbg_libdir}/command/show_sub/*.sh ; do source $_Dbg_file done _Dbg_complete_level_1_data[show]=$(echo ${(kM)_Dbg_debugger_show_commands}) _Dbg_do_show() { _Dbg_help_show $@ return $? } _Dbg_help_show() { if (( $# == 0 )) ; then typeset list list=(${(ki)_Dbg_command_help_show[@]}) typeset subcmd for subcmd in ${list[@]}; do _Dbg_help_show $subcmd 1 done return 0 fi typeset show_cmd=$1 typeset label=$2 if [[ -n "${_Dbg_debugger_show_commands[$show_cmd]}" ]] ; then if [[ -z $label ]] ; then ${_Dbg_debugger_show_commands[$show_cmd]} $label return $? else label=$(printf "show %-12s-- " $subcmd) fi fi case $show_cmd in al | ali | alia | alias | aliase | aliases ) _Dbg_msg \ "${label}Show list of aliases currently in effect." ;; ar | arg | args ) [[ -n $label ]] && label='args: ' _Dbg_msg \ "${label}Argument list to give script when debugged program starts is:\n" \ " \"${_Dbg_script_args[@]}\"." ;; an | ann | anno | annot | annota | annotat | annotate ) _Dbg_msg \ "${label}Show annotation_level" ;; autoe | autoev | autoeva | autoeval ) _Dbg_msg \ "${label}Evaluate unrecognized commands is" $(_Dbg_onoff $_Dbg_set_autoeval) ;; autol | autoli | autolis | autolist ) _Dbg_msg \ "${label}Auto run a 'list' command is" $(_Dbg_onoff $_Dbg_set_autolist) ;; b | ba | bas | base | basen | basena | basenam | basename ) _Dbg_msg \ "${label}Show if we are are to show short or long filenames." ;; com | comm | comma | comman | command | commands ) _Dbg_msg \ "${label}Show the history of commands you typed." ;; con | conf | confi | confir | confirm ) _Dbg_msg \ "${label}confirm dangerous operations" $(_Dbg_onoff $_Dbg_set_confirm) ;; cop | copy| copyi | copyin | copying ) _Dbg_msg \ "${label}Conditions for redistributing copies of debugger." ;; dir|dire|direc|direct|directo|director|directori|directorie|directories) if [[ -n $label ]]; then _Dbg_msg \ "${label}Show the search path for finding source files." else typeset list=${_Dbg_dir[0]} typeset -i n=${#_Dbg_dir[@]} typeset -i i for (( i=1 ; i < n; i++ )) ; do list="${list}:${_Dbg_dir[i]}" done _Dbg_msg "Source directories searched: $list" fi ;; d|de|deb|debu|debug|debugg|debugger|debuggi|debuggin|debugging ) _Dbg_msg \ "${label}Show if we are set to debug the debugger." ;; editing ) _Dbg_msg \ "${label}Show editing of command lines and edit style." ;; force | diff | differ | different ) _Dbg_msg \ "${label}Show stepping forces a new line is" $(_Dbg_onoff $_Dbg_set_different) ;; highlight ) _Dbg_msg \ "${label}Show if we syntax highlight source listings." ;; history ) _Dbg_msg \ "${label}Show if we are recording command history." return 0 ;; lin | line | linet | linetr | linetra | linetrac | linetrace ) _Dbg_msg \ "${label}Show whether to trace lines before execution." ;; lis | list | lists | listsi | listsiz | listsize ) _Dbg_msg \ "${label}Number of source lines ${_Dbg_debugger_name} will list by default is" \ "$_Dbg_set_listsize." ;; p | pr | pro | prom | promp | prompt ) # Note this is different fom "help show prompt" output _Dbg_msg \ "${label}Show ${_Dbg_debugger_name}'s command prompt." ;; st | sty | styl | style ) _Dbg_msg_nocr \ "${label}Set pygments highlighting style is " if [[ -z $_Dbg_set_style ]] ; then _Dbg_msg 'off.' else _Dbg_msg "${_Dbg_set_style}" fi ;; sho|show|showc|showco|showcom|showcomm|showcomma|showcomman|showcommand ) [[ -n $label ]] && label='set showcommand -- ' _Dbg_msg \ "${label}Set showing the command to execute is $_Dbg_set_show_command." ;; t|tr|tra|trac|trace|trace-|trace-c|trace-co|trace-com|trace-comm|trace-comma|trace-comman|trace-command|trace-commands ) _Dbg_msg \ 'show trace-commands -- Show if we are echoing debugger commands' ;; v | ve | ver | vers | versi | versio | version ) _Dbg_do_show_version ;; wa | war | warr | warra | warran | warrant | warranty ) _Dbg_msg \ "${label}Various kinds of warranty you do not have." ;; wi | wid | width ) _Dbg_msg \ "${label}Line width is $_Dbg_set_linewidth." ;; * ) _Dbg_msg \ "Undefined show command: \"$show_cmd\". Try \"help show\"." esac } zshdb-1.1.2/command/show_sub/000077500000000000000000000000001357365030100160775ustar00rootroot00000000000000zshdb-1.1.2/command/show_sub/.gitignore000066400000000000000000000000341357365030100200640ustar00rootroot00000000000000/*~ /Makefile /Makefile.in zshdb-1.1.2/command/show_sub/Makefile.am000066400000000000000000000002241357365030100201310ustar00rootroot00000000000000MOSTLYCLEANFILES = *.orig *.rej pkgdatadir = ${datadir}/@PACKAGE@/command/show_sub pkgdata_DATA = $(wildcard *.sh) EXTRA_DIST = $(pkgdata_DATA) zshdb-1.1.2/command/show_sub/alias.sh000066400000000000000000000023471357365030100175320ustar00rootroot00000000000000# -*- shell-script -*- # "show alias" debugger command # # Copyright (C) 2010-2011, 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show alias \ '**show alias** [*name* *name2* ...] If aliases names are given, show their definition. If left blank, show all alias names' 1 _Dbg_do_show_alias() { unsetopt ksharrays typeset -a list list=() for alias in ${(ki)_Dbg_aliases} ; do list+=("${alias}: ${_Dbg_aliases[$alias]}") done setopt ksharrays _Dbg_list_columns ' | ' return 0 } zshdb-1.1.2/command/show_sub/annotate.sh000066400000000000000000000023311357365030100202430ustar00rootroot00000000000000# -*- shell-script -*- # "show annotate" debugger command # # Copyright (C) 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show annotate \ "**show annotate** Show annotation level. This is a (mostly obsolete) gdb setting, but it is used in GNU Emacs. 0 - normal 1 - fullname (for use when running under emacs). " 1 _Dbg_do_show_annotate() { typeset label="$1" [[ -n $label ]] && label='annotate: ' _Dbg_msg \ "${label}Annotation level is ${_Dbg_set_annotate}." return 0 } zshdb-1.1.2/command/show_sub/autoeval.sh000066400000000000000000000027301357365030100202550ustar00rootroot00000000000000# -*- shell-script -*- # "show autoeval" debugger command # # Copyright (C) 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_show typeset -A _Dbg_debugger_show_commands fi _Dbg_help_add_sub show autoeval \ '**show autoeval** Show whether unrecognized commands are automatically evaluated. See also: --------- **set autoeval**.' 1 _Dbg_do_show_autoeval() { [[ -n $1 ]] && label=$(_Dbg_printf_nocr "%-12s: " autoeval) _Dbg_msg \ "${label}Evaluate unrecognized commands is" $(_Dbg_onoff $_Dbg_set_autoeval) return 0 } zshdb-1.1.2/command/show_sub/autolist.sh000066400000000000000000000026731357365030100203070ustar00rootroot00000000000000# -*- shell-script -*- # "show autolist" debugger command # # Copyright (C) 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_show typeset -A _Dbg_debugger_show_commands fi _Dbg_help_add_sub show autolist \ '**show autolist** Show whether to run a \"list\" on commands entering debugger. See also: --------- **set autolist**.' 1 _Dbg_do_show_autolist() { [[ -n $1 ]] && label=$(_Dbg_printf_nocr "%-12s: " autolist) _Dbg_msg \ "${label}Auto run of 'list' command is ${onoff}" return 0 } zshdb-1.1.2/command/show_sub/basename.sh000066400000000000000000000027261357365030100202150ustar00rootroot00000000000000# -*- shell-script -*- # "show basename" debugger command # # Copyright (C) 2014, 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='../..' || top_dir=${dirname}/../.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done typeset -A _Dbg_command_help_show typeset -A _Dbg_debugger_show_commands fi _Dbg_help_add_sub show basename \ '**show basename** Show whether file basenames are in effect. See also: --------- **set basename**.' 1 _Dbg_do_show_basename() { [[ -n $1 ]] && label=$(_Dbg_printf_nocr "%-12s: " basename) _Dbg_msg \ "${label}Show short filenames (the basename) is " $(_Dbg_onoff $_Dbg_set_basename) return 0 } zshdb-1.1.2/command/show_sub/commands.sh000066400000000000000000000023261357365030100202370ustar00rootroot00000000000000# -*- shell-script -*- # "show commands" debugger command # # Copyright (C) 2011, 2014, 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='..' || top_dir=${dirname}/.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done fi _Dbg_help_add_sub show commands \ '**show commands** Show the history of commands you typed. ' 1 # _Dbg_show_nolist[commands]=1 _Dbg_do_show_commands() { builtin fc -l } zshdb-1.1.2/command/show_sub/confirm.sh000066400000000000000000000023401357365030100200670ustar00rootroot00000000000000# -*- shell-script -*- # "show confirm" debugger command # # Copyright (C) 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show confirm \ "**show confirm** Show whether dangerous-operation confirmation is in effect." 1 _Dbg_do_show_confirm() { typeset label="$1" [[ -n $label ]] && label='confirm: ' _Dbg_msg_nocr \ "${label}Show confirmation of dangerous operations is " if (( _Dbg_set_confirm == 0 )); then _Dbg_msg 'off.' else _Dbg_msg 'on.' fi return 0 } zshdb-1.1.2/command/show_sub/copying.sh000066400000000000000000000351571357365030100201160ustar00rootroot00000000000000# -*- shell-script -*- # "show copying" debugger command # # Copyright (C) 2010-2011, 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show copying \ '**show copying** Conditions for redistributing copies of this debugger.' 1 _Dbg_do_show_copying() { _Dbg_msg \ " GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The \"Program\", below, refers to any such program or work, and a \"work based on the Program\" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term \"modification\".) Each licensee is addressed as \"you\". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and \"any later version\", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. " return 0 } zshdb-1.1.2/command/show_sub/debug.sh000066400000000000000000000020511357365030100175170ustar00rootroot00000000000000# -*- shell-script -*- # "show debug" debugger command # # Copyright (C) 2010-2011, 2019 Rocky Bernstein # # bashdb is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2, or (at your option) any later # version. # # bashdb is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with bashdb; see the file COPYING. If not, write to the Free Software # Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. _Dbg_help_add_sub show debug \ "**show debug** Show if we are set to debug the debugger." 1 _Dbg_do_show_debug() { [[ -n $label ]] && label='debug: ' _Dbg_show_onoff 'debug' 'Allow debugging the debugger' "$label" return 0 } zshdb-1.1.2/command/show_sub/different.sh000066400000000000000000000022651357365030100204060ustar00rootroot00000000000000# -*- shell-script -*- # "show different" debugger command # # Copyright (C) 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show different \ '**show different** Show whether stepping forces stopping at a new line.. See also: --------- **set different**' 1 _Dbg_do_show_different() { [[ -n $1 ]] && label=$(_Dbg_printf_nocr "%-12s: " different) _Dbg_msg \ "${label}Stepping forces stopping at a new line is" $(_Dbg_onoff $_Dbg_set_different) return 0 } zshdb-1.1.2/command/show_sub/editing.sh000066400000000000000000000024341357365030100200610ustar00rootroot00000000000000# -*- shell-script -*- # "show editing" debugger command # # Copyright (C) 2010-2011, 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show editing \ "**show editing** Show editing of command lines as they are typed" 1 _Dbg_do_show_editing() { typeset label="$1" [[ -n $label ]] && label='editing: ' _Dbg_msg_nocr \ "${label}Editing of command lines as they are typed is " if [[ -z $_Dbg_edit ]] ; then _Dbg_msg 'off.' else _Dbg_msg 'on.' _Dbg_msg \ " Edit style is $_Dbg_edit_style." fi return 0 } zshdb-1.1.2/command/show_sub/highlight.sh000066400000000000000000000023321357365030100204020ustar00rootroot00000000000000# -*- shell-script -*- # "show highlight" debugger command # # Copyright (C) 2011, 2014-2016, 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show highlight \ "**show highlight** Show terminal highlighting" 1 _Dbg_do_show_highlight() { typeset label="$1" [[ -n $label ]] && label='highlight: ' _Dbg_msg_nocr \ "${label}Terminal highlighting is " if [[ -n $_Dbg_set_highlight ]] ; then _Dbg_msg "${_Dbg_set_highlight}." else _Dbg_msg 'off.' fi return 0 } zshdb-1.1.2/command/show_sub/history.sh000066400000000000000000000023471357365030100201420ustar00rootroot00000000000000# -*- shell-script -*- # "show history" debugger command # # Copyright (C) 2010, 2014, 2019 Rocky Bernstein rocky@gnu.org # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show history \ '**show history** Show history settings. ' 1 _Dbg_do_show_history() { _Dbg_msg \ "filename: The filename in which to record the command history is:" _Dbg_msg " $_Dbg_histfile" _Dbg_msg \ "save: Saving of history save is" $(_Dbg_onoff $_Dbg_set_history) _Dbg_msg \ "size: Debugger history size is $_Dbg_history_size" return 0 } zshdb-1.1.2/command/show_sub/linetrace.sh000066400000000000000000000022621357365030100204030ustar00rootroot00000000000000# -*- shell-script -*- # "show linetrace" debugger command # # Copyright (C) 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show linetrace \ '**show linetrace** Traces each sourceline before running it. See also: --------- **set linetrace**' 1 _Dbg_do_show_linetrace() { [[ -n $1 ]] && label=$(_Dbg_printf_nocr "%-12s: " linetrace) _Dbg_msg \ "${label}Show if stepping forces stopping at a new line is" $(_Dbg_onoff $_Dbg_set_linetrace) return 0 } zshdb-1.1.2/command/show_sub/listsize.sh000066400000000000000000000023031357365030100202770ustar00rootroot00000000000000# -*- shell-script -*- # "show listsize" debugger command # # Copyright (C) 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show listsize \ '**show listsize** Show maximum number of lines in a \"list\" display. See also: --------- **set listsize**.' 1 _Dbg_do_show_listsize() { [[ -n $label ]] && label=$(_Dbg_printf_nocr "%-12s: " listsize) _Dbg_msg \ "${label}Number of source lines ${_Dbg_debugger_name} will list by default is" \ "$_Dbg_set_listsize." return 0 } zshdb-1.1.2/command/show_sub/prompt.sh000066400000000000000000000021501357365030100177520ustar00rootroot00000000000000# -*- shell-script -*- # "show prompt" debugger command # # Copyright (C) 2010-2011, 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show prompt \ '**show prompt** Show prompt string.' 1 _Dbg_do_show_prompt() { [[ -n $1 ]] && label=$(_Dbg_printf_nocr "%-12s: " prompt) _Dbg_msg \ "${label}${_Dbg_debugger_name}'s prompt is:" _Dbg_msg " \"$_Dbg_prompt_str\"." return 0 } zshdb-1.1.2/command/show_sub/style.sh000066400000000000000000000023071357365030100175750ustar00rootroot00000000000000# -*- shell-script -*- # "show style" debugger command # # Copyright (C) 2016 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show style \ "**show style** Show pygments terminal formatting style" 1 _Dbg_do_show_style() { typeset label="$1" [[ -n $label ]] && label='style: ' _Dbg_msg_nocr \ "${label}Pygments terminal formatting style is " if [[ -n $_Dbg_set_style ]] ; then _Dbg_msg "${_Dbg_set_style}." else _Dbg_msg 'off.' fi return 0 } zshdb-1.1.2/command/show_sub/warranty.sh000066400000000000000000000020141357365030100202770ustar00rootroot00000000000000# -*- shell-script -*- # "show warranty" debugger command # # Copyright (C) 2011, 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show warranty \ '**show warranty** Lack of warranty of this debugger.' 1 _Dbg_show_nolist[warranty]=1 _Dbg_do_show_warranty() { _Dbg_do_info_warranty return 0 } zshdb-1.1.2/command/show_sub/width.sh000066400000000000000000000020361357365030100175530ustar00rootroot00000000000000# -*- shell-script -*- # "show width" debugger command # # Copyright (C) 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add_sub show width \ '**show width** Show maximum width of a line. See also: --------- **set width**.' 1 _Dbg_do_show_width() { _Dbg_msg \ "${label}Line width is $_Dbg_set_linewidth." return 0 } zshdb-1.1.2/command/skip.sh000066400000000000000000000036261357365030100155570ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "skip" (skip over) debugger commmand. # # Copyright (C) 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add skip \ "**skip** [*count*] Skip over (don't run) the next *count* command(s). If *count* is given, stepping occurs that many times before stopping. Otherwise *count* is one. *count* can be an arithmetic expression. Note that skipping doesn't change the value of \$?. This has consequences in some compound statements that test on \$?. For example in: if grep foo bar.txt ; then echo not skipped fi Skipping the *if* statement will, in effect, skip running the *grep* command. Since the return code is 0 when skipped, the *if* body is entered. Similarly the same thing can happen in a *while* statement test. See also: --------- **continue**, **next**, and **step**. " _Dbg_do_skip() { _Dbg_last_cmd='skip' typeset count=${1:-1} if [[ $count == [0-9]* ]] ; then _Dbg_skip_ignore=${count:-1} _Dbg_continue_rc=0 else _Dbg_errmsg "'skip' argument ($count) should be a number or nothing." return 0 fi _Dbg_step_ignore=1 # We're cool. Do the skip. _Dbg_write_journal "_Dbg_skip_ignore=$_Dbg_skip_ignore" return $? } zshdb-1.1.2/command/source.sh000066400000000000000000000033151357365030100161040ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "source" command. # # Copyright (C) 2002-2004, 2006, 2008, 2010, 2016 # Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. # Handle command-file source. If the filename's okay we just increase the # input-file descriptor by one and redirect input which will # be picked up in next debugger command loop. _Dbg_help_add source \ '**source** *file* Run debugger commands in *file*.' _Dbg_do_source() { if (( $# == 0 )) ; then _Dbg_errmsg 'Need to give a filename for the "source" command.' return 1 fi typeset filename _Dbg_tilde_expand_filename "$1" if [[ -r $filename ]] || [[ "$filename" == '/dev/stdin' ]] ; then # Redirect std input to new file and save new descriptor number exec {_Dbg_fdi}< $filename # Save descriptor number and assocated file name. _Dbg_fd+=($_Dbg_fdi) _Dbg_cmdfile+=("$filename") else _Dbg_errmsg "Source file \"$filename\" is not readable." return 3 fi return 0 } zshdb-1.1.2/command/stepping.sh000066400000000000000000000112751357365030100164410ustar00rootroot00000000000000# -*- shell-script -*- # stepping.cmd - gdb-like "step" and "skip" debugger commands # # Copyright (C) 2008, 2010, 2016-2017, 2019 Rocky Bernstein rocky@gnu.org # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. # 1 if we need to ensure we stop on a different line? typeset -i _Dbg_step_force=0 # if positive, the frame level we want to stop at next typeset -i _Dbg_return_level=-1 # The default behavior of step_force. typeset -i _Dbg_set_different=0 _Dbg_help_add 'step' \ "**step** [*count*] Single step a statement *count* times. If *count* is given, stepping occurs that many times before stopping. Otherwise *count* is one. *count* an be an arithmetic expression. In contrast to \"next\", functions and source\'d files are stepped into. See also: --------- **next**, **skip**, **step-** **step+**, and **set different**." _Dbg_help_add 'step+' \ "**step+** Single step a statement ensuring a different line after the step. In contrast to **step**, we ensure that the file and line position is different from the last one just stopped at. See also: --------- **step-** and **set different**." 0 _Dbg_help_add 'step-' \ "**step-** Single step a statement without the \`step force' setting. Set step force may have been set on. step- ensures we turn that off for this command. See also: --------- **step** and **set different**." 0 # Step command # $1 is command step+, step-, or step # $2 is an optional additional count. _Dbg_do_step() { _Dbg_not_running && return 1 _Dbg_last_cmd="$_Dbg_cmd" _Dbg_last_next_step_cmd="$_Dbg_cmd" _Dbg_last_next_step_args="$@" typeset count=${1:-1} case "${_Dbg_last_next_step_cmd[-1,-1]}" in '+' ) _Dbg_step_force=1 ;; '-' ) _Dbg_step_force=0 ;; '' ) _Dbg_step_force=$_Dbg_set_different ;; * ) ;; esac if [[ $count == [0-9]* ]] ; then _Dbg_step_ignore=${count:-1} else _Dbg_errmsg "Argument ($count) should be a number or nothing." _Dbg_step_ignore=-1 return 0 fi _Dbg_write_journal_eval "_Dbg_return_level=-1" _Dbg_write_journal "_Dbg_step_ignore=$_Dbg_step_ignore" _Dbg_write_journal "_Dbg_step_force=$_Dbg_step_force" return 1 } _Dbg_help_add next \ "**next** [*count*] Step over a statement *count* times ignoring functions. If *count* is given, stepping occurs that many times before stopping. Otherwise *count* is one. *count* can be an arithmetic expression. In contrast to **step**, functions and source\'d files are not stepped into. See also: --------- **step**, **skip**, **next-** **next+**, and **set different**." _Dbg_help_add 'next+' \ "**next+** Step over stepping ensuring a different line after the step. In contrast to **next**, we ensure that the file and line position is different from the last one just stopped at. See also: --------- **next-**, **next** and **set different**." 0 _Dbg_help_add 'next-' \ "**next-** Step over stepping a statement without the **set different** setting. Set step force may have been set on. step- ensures we turn that off for this command. See also: --------- **next+**, **next**, and **set different**." 0 # Next command # $1 is command next+, next-, or next # $2 is an optional additional count. _Dbg_do_next() { _Dbg_not_running && return 1 _Dbg_last_cmd="$_Dbg_cmd" _Dbg_last_next_step_cmd="$_Dbg_cmd" _Dbg_last_next_step_args="$@" typeset count=${1:-1} case "${_Dbg_last_next_step_cmd[-1,-1]}" in '+' ) _Dbg_step_force=1 ;; '-' ) _Dbg_step_force=0 ;; '' ) _Dbg_step_force=$_Dbg_set_different ;; * ) ;; esac if [[ $count == [0-9]* ]] ; then _Dbg_step_ignore=${count:-1} else _Dbg_errmsg "Argument ($count) should be a number or nothing." _Dbg_step_ignore=1 return 0 fi _Dbg_write_journal_eval "_Dbg_return_level=${#_Dbg_frame_stack[@]}" _Dbg_write_journal "_Dbg_step_ignore=$_Dbg_step_ignore" _Dbg_write_journal "_Dbg_step_force=$_Dbg_step_force" _Dbg_continue_rc=0 return 0 } for cmd in step next ; do alias=${cmd[1,1]} _Dbg_alias_add $alias $cmd _Dbg_alias_add ${alias}+ ${cmd} _Dbg_alias_add ${alias}- ${cmd} done zshdb-1.1.2/command/trace.sh000066400000000000000000000051311357365030100157000ustar00rootroot00000000000000# -*- shell-script -*- # # Copyright (C) 2008, 2010, 2016 Rocky Bernstein rocky@gnu.org # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. # Wrap "set -x .. set +x" around a call to function $1. # Normally we also save and restrore any trap DEBUG functions. However # If $2 is 0 we will won't. # The wrapped function becomes the new function and the original # function is called old_$1. # $? is 0 if successful. _Dbg_help_add trace \ '**trace** *function* trace alias *alias* Set "xtrace" (set -x) tracing when *function* is called. ' function _Dbg_do_trace { if (($# == 0)) ; then _Dbg_errmsg "_Dbg_do_trace: missing function name." return 2 fi typeset fn=$1 if [[ $fn == 'alias' ]]; then shift _Dbg_do_trace_alias "$@" return $? fi typeset -ri clear_debug_trap=${2:-1} _Dbg_is_function "$fn" $_Dbg_set_debug || { _Dbg_errmsg "_Dbg_do_trace: \"$fn\" is not a function." return 3 } cmd=old_$(typeset -f -- "$fn") || { return 4 } typeset -ft $fn return 0 } function _Dbg_do_trace_alias { if (($# == 0)) ; then _Dbg_errmsg "_Dbg_do_trace_alias: missing alias name." return 2 fi typeset al=$1 if _Dbg_is_alias "$al" ; then alias_body=$(alias $1) alias_body="set -x; $alias_body; set +x" alias ${al}=${alias_body} else _Dbg_errmsg "_Dbg_do_trace_alias: \"$al\" is not an alias." return 3 fi return 0 } _Dbg_help_add untrace \ '**untrace** *function* Untrace previuosly traced *function*. ' # Undo wrapping fn # $? is 0 if successful. function _Dbg_do_untrace { typeset -r fn=$1 if [[ -z $fn ]] ; then _Dbg_errmsg "untrace: missing or invalid function name." return 2 fi _Dbg_is_function "$fn" $_Dbg_set_debug || { _Dbg_errmsg "untrace: function \"$fn\" is not a function." return 3 } typeset +ft $fn return 0 } zshdb-1.1.2/command/undisplay.sh000066400000000000000000000033561357365030100166210ustar00rootroot00000000000000# -*- shell-script -*- # undisplay.sh - gdb-like "undisplay" # # Copyright (C) 2002-2003, 2006-2010, 2016 # Rocky Bernstein rocky@gnu.org # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this Program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_help_add undisplay \ "**undisplay** *display-number*... Cancel some expressions to be displayed when program stops. Arguments are the code numbers of the expressions to stop displaying. Examples: --------- undisplay 0 # Removes display statement 0 undisplay 0 3 4 # Removes display statements 0, 3, and 4 See also: --------- *display* and *info display*." _Dbg_do_undisplay() { typeset -i del if (( 0 == $# )) ; then _Dbg_errmsg 'You need to pass in some display numbers.' return 1 fi for del in $@ ; do if [ -n "${_Dbg_disp_exp[$del]}" ] ; then _Dbg_write_journal_eval "_Dbg_disp_exp[$del]=''" _Dbg_write_journal_eval "_Dbg_disp_enable[$del]=''" _Dbg_msg "Display entry $del unset." else _Dbg_msg "Display entry $del doesn't exist, so nothing done." fi done return 0 } zshdb-1.1.2/command/up.sh000066400000000000000000000034401357365030100152270ustar00rootroot00000000000000# -*- shell-script -*- # gdb-like "up" debugger command # # Copyright (C) 2010-2012, 2014, 2016 Rocky Bernstein # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. if [[ 0 == ${#funcfiletrace[@]} ]] ; then dirname=${0%/*} [[ $dirname == $0 ]] && top_dir='..' || top_dir=${dirname}/.. for lib_file in help alias ; do source $top_dir/lib/${lib_file}.sh; done fi # Move default values up $1 or one in the stack. _Dbg_help_add up \ '**up** [*count*] Move the current frame up in the stack trace (to an older frame). 0 is the most recent frame. If **count** is omitted, use 1. See also: --------- **down** and **frame**.' typeset -A _Dbg_complete_level_1_data _Dbg_complete_level_1_data[up]='-f_Dbg_frame_complete 1' function _Dbg_do_up { _Dbg_not_running && return 1 typeset -i count=${1:-1} _Dbg_frame_adjust $count +1 ((0 == $?)) && _Dbg_last_cmd='up' return 0 } # Demo it if [[ 0 == ${#funcfiletrace[@]} ]] ; then for _Dbg_file in help msg sort columnize ; do source ${top_dir}/lib/${_Dbg_file}.sh done source ${top_dir}/command/help.sh _Dbg_args='up' _Dbg_do_help up fi zshdb-1.1.2/configure.ac000066400000000000000000000176341357365030100151310ustar00rootroot00000000000000dnl Configure script for Shell debugger define(DEBUGGER, zshdb) define(POSIXSHELL, zsh) AC_INIT([zshdb],[1.1.2],[https://github.com/rocky/zshdb/issues]) AM_MAINTAINER_MODE AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_SRCDIR(DEBUGGER.in) if test x$srcdir = x ; then srcdir=$ac_pwd fi # List of output variables produced by this configure script # AC_SUBST(DIFF) AC_SUBST(DIFF_OPTS) AC_PROG_GREP CMDLINE_INVOKED='0 == ${#funcfiletrace[@]}' AC_SUBST(CMDLINE_INVOKED) # We need a GNU sed and the below allows us to use @SED@ in # the integration tests programs. AC_PROG_SED ## --with-zsh can be used to tell the zshdb script and the regression ## test which bash to run. It can be omitted too in which case we'll ## look for a zsh binary. AC_ARG_WITH(POSIXSHELL, AC_HELP_STRING([--with-POSIXSHELL], [location of POSIXSHELL program]), SH_PROG=$withval) if test "$SH_PROG" = "yes" || test "$SH_PROG" = "no" || test -z "$SH_PROG" then AC_PATH_PROG(SH_PROG, zsh, no) fi if test "$SH_PROG" = no; then AC_MSG_ERROR([I didn't find the] POSIXSHELL [executable.\ You might want to use the] --with-POSIXSHELL [option.]) fi AC_MSG_CHECKING([Checking whether $SH_PROG is compatible with DEBUGGER]) if ! (cd ${srcdir}/test/zsh && $SH_PROG ./ok4zshdb.sh) ; then AC_MSG_RESULT([no dice :-(]) AC_MSG_ERROR([You might want to retry with another POSIXSHELL using the --with-POSIXSHELL option.]) else AC_MSG_RESULT(yes!) fi dnl We use a diff in regression testing AC_PATH_PROG(DIFF, diff, no) DIFF_OPTS= if test "$DIFF" = no ; then AC_PATH_PROG(DIFF, cmp, no) else dnl Try for GNU diff options. # MSDOG output uses \r\n rather than \n in tests for diff_opt in -w --unified ; do if $DIFF $diff_opt . . > /dev/null 2>&1; then AC_MSG_RESULT([adding $diff_opt to diff in regression tests]) DIFF_OPTS="$DIFF_OPTS $diff_opt" fi done fi # Get the fully expanded name of pkgdatadir. This is used in zshdb.in # and dbg-main.sh.in and for installing debugger files. pkgdatadir=$datadir/DEBUGGER AC_SUBST_DIR(PKGDATADIR, $pkgdatadir) AM_MISSING_PROG(GIT2CL, git2cl, $missing_dir) AC_PROG_LN_S AC_PATH_PROG(RM, rm, true) AC_CONFIG_FILES([ \ Makefile \ command/Makefile \ command/info_sub/Makefile \ command/set_sub/Makefile \ command/show_sub/Makefile \ data/Makefile \ doc/Makefile \ dbg-trace.sh \ lib/Makefile \ test/Makefile \ test/data/Makefile \ test/example/Makefile \ test/integration/Makefile \ test/integration/check-common.sh \ test/unit/Makefile \ test/zsh/Makefile \ ]) AC_CONFIG_FILES(DEBUGGER, [chmod +x DEBUGGER]) AC_CONFIG_FILES([test/example/bug-args.sh], [chmod +x test/example/bug-args.sh]) AC_CONFIG_FILES([test/example/hanoi.sh], [chmod +x test/example/hanoi.sh]) AC_CONFIG_FILES([test/example/restart.sh], [chmod +x test/example/restart.sh]) AC_CONFIG_FILES([test/example/skip.sh], [chmod +x test/example/skip.sh]) AC_CONFIG_FILES([test/integration/test-action], [chmod +x test/integration/test-action]) AC_CONFIG_FILES([test/integration/test-brkpt1], [chmod +x test/integration/test-brkpt1]) AC_CONFIG_FILES([test/integration/test-bug-args], [chmod +x test/integration/test-bug-args]) AC_CONFIG_FILES([test/integration/test-bug-delete], [chmod +x test/integration/test-bug-delete]) AC_CONFIG_FILES([test/integration/test-bug-errexit], [chmod +x test/integration/test-bug-errexit]) AC_CONFIG_FILES([test/integration/test-bugIFS], [chmod +x test/integration/test-bugIFS]) AC_CONFIG_FILES([test/integration/test-bugIFS2], [chmod +x test/integration/test-bugIFS2]) AC_CONFIG_FILES([test/integration/test-bug-ksharrays], [chmod +x test/integration/test-bug-ksharrays]) AC_CONFIG_FILES([test/integration/test-condition], [chmod +x test/integration/test-condition]) AC_CONFIG_FILES([test/integration/test-debug], [chmod +x test/integration/test-debug]) AC_CONFIG_FILES([test/integration/test-delete], [chmod +x test/integration/test-delete]) AC_CONFIG_FILES([test/integration/test-display], [chmod +x test/integration/test-display]) AC_CONFIG_FILES([test/integration/test-enable], [chmod +x test/integration/test-enable]) AC_CONFIG_FILES([test/integration/test-examine], [chmod +x test/integration/test-examine]) AC_CONFIG_FILES([test/integration/test-export], [chmod +x test/integration/test-export]) AC_CONFIG_FILES([test/integration/test-file-with-spaces], [chmod +x test/integration/test-file-with-spaces]) AC_CONFIG_FILES([test/integration/test-frame], [chmod +x test/integration/test-frame]) AC_CONFIG_FILES([test/integration/test-list], [chmod +x test/integration/test-list]) AC_CONFIG_FILES([test/integration/test-multi], [chmod +x test/integration/test-multi]) AC_CONFIG_FILES([test/integration/test-next], [chmod +x test/integration/test-next]) AC_CONFIG_FILES([test/integration/test-opts], [chmod +x test/integration/test-opts]) AC_CONFIG_FILES([test/integration/test-restart], [chmod +x test/integration/test-restart]) AC_CONFIG_FILES([test/integration/test-setshow], [chmod +x test/integration/test-setshow]) AC_CONFIG_FILES([test/integration/test-skip], [chmod +x test/integration/test-skip]) AC_CONFIG_FILES([test/integration/test-step], [chmod +x test/integration/test-step]) AC_CONFIG_FILES([test/integration/test-subshell], [chmod +x test/integration/test-subshell]) AC_CONFIG_FILES([test/integration/test-tbreak], [chmod +x test/integration/test-tbreak]) AC_CONFIG_FILES([test/unit/test-action.sh], [chmod +x test/unit/test-action.sh]) AC_CONFIG_FILES([test/unit/test-alias.sh], [chmod +x test/unit/test-alias.sh]) AC_CONFIG_FILES([test/unit/test-break.sh], [chmod +x test/unit/test-break.sh]) AC_CONFIG_FILES([test/unit/test-columns.sh], [chmod +x test/unit/test-columns.sh]) AC_CONFIG_FILES([test/unit/test-cmd-complete.sh], [chmod +x test/unit/test-cmd-complete.sh]) AC_CONFIG_FILES([test/unit/test-cmd-info-variables.sh], [chmod +x test/unit/test-cmd-info-variables.sh]) AC_CONFIG_FILES([test/unit/test-dbg-opts.sh], [chmod +x test/unit/test-dbg-opts.sh]) AC_CONFIG_FILES([test/unit/test-examine.sh], [chmod +x test/unit/test-examine.sh]) AC_CONFIG_FILES([test/unit/test-file.sh], [chmod +x test/unit/test-file.sh]) AC_CONFIG_FILES([test/unit/test-filecache.sh], [chmod +x test/unit/test-filecache.sh]) AC_CONFIG_FILES([test/unit/test-get-sourceline.sh], [chmod +x test/unit/test-get-sourceline.sh]) AC_CONFIG_FILES([test/unit/test-fns.sh], [chmod +x test/unit/test-fns.sh]) AC_CONFIG_FILES([test/unit/test-frame.sh], [chmod +x test/unit/test-frame.sh]) AC_CONFIG_FILES([test/unit/test-journal.sh], [chmod +x test/unit/test-journal.sh]) AC_CONFIG_FILES([test/unit/test-lib-eval.sh], [chmod +x test/unit/test-lib-eval.sh]) AC_CONFIG_FILES([test/unit/test-lib-shell.sh], [chmod +x test/unit/test-lib-shell.sh]) AC_CONFIG_FILES([test/unit/test-msg.sh], [chmod +x test/unit/test-msg.sh]) AC_CONFIG_FILES([test/unit/test-pre.sh], [chmod +x test/unit/test-pre.sh]) AC_CONFIG_FILES([test/unit/test-run.sh], [chmod +x test/unit/test-run.sh]) AC_CONFIG_FILES([test/unit/test-save-restore.sh], [chmod +x test/unit/test-save-restore.sh]) AC_CONFIG_FILES([test/unit/test-setshow.sh], [chmod +x test/unit/test-setshow.sh]) AC_CONFIG_FILES([test/unit/test-sort.sh], [chmod +x test/unit/test-sort.sh]) AC_CONFIG_FILES([test/unit/test-tty.sh], [chmod +x test/unit/test-tty.sh]) AC_CONFIG_FILES([test/unit/test-validate.sh], [chmod +x test/unit/test-validate.sh]) AC_OUTPUT zshdb-1.1.2/data/000077500000000000000000000000001357365030100135415ustar00rootroot00000000000000zshdb-1.1.2/data/.gitignore000066400000000000000000000000331357365030100155250ustar00rootroot00000000000000/Makefile.in /Makefile /*~ zshdb-1.1.2/data/Makefile.am000066400000000000000000000002151357365030100155730ustar00rootroot00000000000000pkgdatadir = ${datadir}/@PACKAGE@/data pkgdata_DATA = \ shell.sh EXTRA_DIST = $(pkgdata_DATA) MOSTLYCLEANFILES = *.orig *.rej zshdb-1.1.2/data/shell.sh000066400000000000000000000030711357365030100152050ustar00rootroot00000000000000# -*- shell-script -*- # shell.sh - helper routines for 'shell' debugger command # # Copyright (C) 2011 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. trap '_Dbg_write_saved_vars' EXIT typeset -a _Dbg_save_vars # _Dbg_tmpdir='/tmp' # _Dbg_restore_info="${_Dbg_tmpdir}/${_Dbg_debugger_name}_restore_$$" typeset -a _Dbg_save_vars; _Dbg_save_vars=() # User level routine which should be called to mark which # variables should persist. save_vars() { _Dbg_save_vars+=($@) } _Dbg_write_saved_vars() { typeset param for param in "${_Dbg_save_vars[@]}" ; do # FIXME chould check if var is an assoc array. case $parameters[$param] in *assoc*) print -- "$param=( ${(P@kvqq)param} )";; *array*) print -- "$param=( ${(P@qq)param} )";; *scalar*) print -- "$param=${(P@qq)param}";; esac done > $_Dbg_restore_info } zshdb-1.1.2/dbg-main.sh000077500000000000000000000045771357365030100146620ustar00rootroot00000000000000# -*- shell-script -*- # Copyright (C) 2008, 2009, 2010, 2011 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. # Stuff common to zshdb and dbg-trace. Include the rest of options # processing. Also includes things which have to come before other includes . ${_Dbg_libdir}/dbg-pre.sh # All debugger lib code has to come before debugger command code. typeset _Dbg_file for _Dbg_file in ${_Dbg_libdir}/lib/*.sh ${_Dbg_libdir}/command/*.sh ; do source $_Dbg_file done unsetopt localtraps set -o DEBUG_BEFORE_CMD # Have we already specified where to read debugger input from? if [[ -n "$DBG_INPUT" ]] ; then _Dbg_do_source "$DBG_INPUT" _Dbg_no_nx=1 fi if [[ -z "$_Dbg_tty" ]]; then _Dbg_tty=$(tty) [[ $_Dbg_tty == 'not a tty' ]] && unset _Dbg_tty fi [[ -n "$_Dbg_tty" ]] && _Dbg_do_set inferior-tty $_Dbg_tty # Run the user's debugger startup file. This has to come # *after* setting up the tty since _Dbg_do_set inferior-tty # smashes the current tty. typeset _Dbg_startup_cmdfile=${HOME:-~}/.${_Dbg_debugger_name}rc if (( 0 == _Dbg_o_nx)) && [[ -r "$_Dbg_startup_cmdfile" ]] ; then _Dbg_do_source "$_Dbg_startup_cmdfile" fi # _Dbg_DEBUGGER_LEVEL is the number of times we are nested inside a debugger # by virtue of running "debug" for example. if [[ -z "${_Dbg_DEBUGGER_LEVEL}" ]] ; then typeset -xi _Dbg_DEBUGGER_LEVEL=1 fi if ((_Dbg_history_save)) ; then history -ap $_Dbg_histfile $_Dbg_history_size fi for source_file in ${_Dbg_o_init_files[@]} "$DBG_RESTART_FILE"; do if [[ -n "$source_file" ]] ; then if [[ -r "$source_file" ]] && [[ -f "$source_file" ]] ; then source $source_file else _Dbg_errmsg "Unable to read shell script: ${source_file}" fi fi done zshdb-1.1.2/dbg-opts.sh000066400000000000000000000217071357365030100147120ustar00rootroot00000000000000# -*- shell-script -*- # debugger command options processing. The bane of programming. # # Copyright (C) 2008-2011, 2014-2016, 2019 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. _Dbg_usage() { printf "Usage: ${_Dbg_pname} [OPTIONS] Runs $_Dbg_shell_name under a debugger. options: -h | --help Print this help. -q | --quiet Do not print introductory and quiet messages. -A | --annotate LEVEL Set the annotation level. -B | --basename Show basename only on source file listings. (Needed in regression tests) --highlight {dark|light} Use dark or light background ANSI terminal sequence syntax highlighting | --no-highlight Don't use ANSI terminal sequences for syntax highlight --init-file FILE Source script file FILE. Similar to bash's corresponding option. This option can be given several times with different files. -L | --library DIRECTORY Set the directory location of library helper file: $_Dbg_main -c | --command STRING Run STRING instead of a script file -n | --nx | --no-init Don't run initialization files. -S | --style STYLE Run use pygments STYLE for formatting source code -t | --tty DEV Run using device for your programs standard input and output --tty_in | --terminal_in DEV Set to ... -T | --tempdir DIRECTORY Use DIRECTORY to store temporary files in -V | --version Print the debugger version number. -X | --trace Set line tracing similar to set -x -x | --eval-command CMDFILE Execute debugger commands from CMDFILE. " exit 100 } _Dbg_show_version() { printf "There is absolutely no warranty for $_Dbg_debugger_name. Type \"show warranty\" for details. " exit 101 } # Script arguments before adulteration by _Dbg_parse_opts typeset -xa _Dbg_orig_script_args _Dbg_orig_script_args=($@) # The following globals are set by _Dbg_parse_opts. Any values set are # the default values. typeset -xa _Dbg_script_args # Use gdb-style annotate? typeset -i _Dbg_set_annotate=0 # Simulate set -x? typeset -i _Dbg_set_linetrace=0 typeset -i _Dbg_set_basename=0 typeset -i _Dbg_set_confirm=1 typeset _Dbg_set_highlight # Initialized below typeset -a _Dbg_o_init_files; _Dbg_o_init_files=() typeset -i _Dbg_o_nx=0 typeset -i _Dbg_have_working_pygmentize=0 if ( pygmentize --version || pygmentize -V ) 2>/dev/null 1>/dev/null ; then _Dbg_have_working_pygmentize=1 fi typeset _Dbg_tty='' typeset -i _Dbg_history_save=1 typeset -i _Dbg_history_size=${HISTSIZE:-256} # gdb's defaulit value typeset _Dbg_histfile=${ZDOTDIR:-$HOME}/.${_Dbg_debugger_name}_hist typeset _Dbg_edit='-e' typeset _Dbg_edit_style='emacs' builtin bindkey -e typeset -ix _Dbg_working_term_highlight if ${_Dbg_libdir}/lib/term-highlight.py -V 2>/dev/null 1>/dev/null ; then _Dbg_working_term_highlight=1 else _Dbg_working_term_highlight=0 fi typeset -x _Dbg_set_style='' # If we can do highlighting, do it. if (( _Dbg_working_term_highlight )) ; then _Dbg_set_highlight="light" else _Dbg_set_highlight='' fi # $_Dbg_tmpdir could have been set by the top-level debugger script. [[ -z $_Dbg_tmpdir ]] && typeset _Dbg_tmpdir=/tmp _Dbg_check_tty() { (( $# < 1 )) && return 1 typeset tty=$1 if [[ $tty != '&1' ]] ; then if ! $(touch "$tty" >/dev/null 2>/dev/null); then _Dbg_errmsg "Can't access $tty for writing." return 1 fi if [[ ! -w "$tty" ]] ; then _Dbg_errmsg "tty $tty needs to be writable" return 1 fi _Dbg_tty="$tty" _Dbg_prompt_output="$_Dbg_tty" fi return 0 } _Dbg_parse_options() { . ${_Dbg_libdir}/getopts_long.sh typeset -i _Dbg_o_quiet=0 typeset -i _Dbg_o_version=0 while getopts_long A:Bc:x:hL:nqTS:t:V opt \ annotate required_argument \ basename no_argument \ command required_argument \ eval-command required_argument \ cmdfile required_argument \ help no_argument \ highlight required_argument \ init-file required_argument \ library required_argument \ no-highlight no_argument \ no-init no_argument \ nx no_argument \ quiet no_argument \ tempdir required_argument \ style required_argument \ tty required_argument \ tty_in required_argument \ terminal_in required_argument \ version no_argument \ '' "$@" do case "$opt" in A | annotate ) _Dbg_o_annotate=$OPTLARG;; B | basename ) _Dbg_set_basename=1 ;; c | command ) _Dbg_EXECUTION_STRING="$OPTLARG" ;; h | help ) _Dbg_usage ;; highlight ) case "$OPTLARG" in light | dark ) _Dbg_set_highlight=$OPTLARG ;; * ) print "Expecting 'dark' or 'light', got \"${OPTLARG}\"" >&2 exit 2 esac if (( ! _Dbg_working_term_highlight )) ; then echo "Can't run term-highlight.py; '--highlight' forced off" >&2 _Dbg_set_highlight='' fi ;; no-highlight ) _Dbg_set_highlight='' ;; init-file ) _Dbg_o_init_files+="$OPTLARG" ;; L | library ) ;; V | version ) _Dbg_o_version=1 ;; n | nx | no-init ) _Dbg_o_nx=1 ;; q | quiet ) _Dbg_o_quiet=1 ;; S | style) if (( $_Dbg_working_term_highlight )) ; then _Dbg_set_style=$OPTLARG else echo "Can't run term-highlight.py; '--style' option ignored" >&2 fi ;; t | tty) _Dbg_tty=$OPTLARG ;; tempdir) _Dbg_tmpdir=$OPTLARG ;; terminal_in | tty_in ) _Dbg_tty_in="$OPTLARG" ;; x | eval-command ) DBG_INPUT=$OPTLARG ;; X | trace ) _Dbg_set_linetrace=1 ;; '?' ) # Path taken on a bad option echo >&2 'Use -h or --help to see options.' exit 2 ;; * ) echo "Unknown option $opt. Use -h or --help to see options." >&2 exit 2 ;; esac done shift "$(($OPTLIND - 1))" if (( _Dbg_o_version )) ; then _Dbg_do_show_version exit 0 elif (( ! _Dbg_o_quiet )) && [[ -n $_Dbg_shell_name ]] && \ [[ -n $_Dbg_release ]] ; then echo "$_Dbg_shell_name debugger, $_Dbg_debugger_name, release $_Dbg_release" printf ' Copyright 2008-2011, 2014, 2016-2019 Rocky Bernstein This is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. ' fi (( _Dbg_o_version )) && _Dbg_show_version if [[ -n $_Dbg_o_annotate ]] ; then if [[ ${_Dbg_o_annotate} == [0-9]* ]] ; then _Dbg_set_annotate=$_Dbg_o_annotate if (( _Dbg_set_annotate > 3 || _Dbg_set_annotate < 0)); then echo "Annotation level must be less between 0 and 3. Got: $_Dbg_set_annotate." >&2 echo "Setting Annotation level to 0." >&2 _Dbg_set_annotate=0 fi else echo "Annotate option should be an integer, got ${_Dbg_o_annotate}." >&2 echo "Setting annotation level to 0." >&2 fi fi unset _Dbg_o_annotate _Dbg_o_version _Dbg_o_quiet _Dbg_script_args=("$@") } if (( _Dbg_have_working_pygmentize )) && [[ -z "$_Dbg_set_highlight" ]] ; then # Honor DARK_BG if already set. If not set, set it. if [[ -z "$DARK_BG" ]] ; then . "${_Dbg_libdir}/zterm-background.sh" >/dev/null fi # DARK_BG is now either 0 or 1. # Set _Dbg_set_highlight based on DARK_BG # Note however that options processing has one more chance to # change _Dbg_set_highlight if (( $DARK_BG )); then _Dbg_set_highlight="dark" else _Dbg_set_highlight="light" fi fi # Stand-alone Testing. if [[ -n "$_Dbg_dbg_opts_test" ]] ; then OPTLIND=1 _Dbg_libdir='.' [[ -n $_Dbg_input ]] && typeset -p _Dbg_input _Dbg_parse_options "$@" typeset -p _Dbg_set_annotate typeset -p _Dbg_set_linetrace typeset -p _Dbg_set_basename fi zshdb-1.1.2/dbg-pre.sh000066400000000000000000000103421357365030100145040ustar00rootroot00000000000000# -*- shell-script -*- # dbg-pre.sh - Code common to zshdb and zshdb-trace that has to run first # # Copyright (C) 2008-2010, 2014 Rocky Bernstein rocky@gnu.org # # zshdb is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2, or (at your option) any later # version. # # zshdb is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with zshdb; see the file COPYING. If not, write to the Free Software # Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. # Here we put definitions common to both the script debugger and # dbg-trace.sh. In contrast to other routines, this code is sourced # early -- before most of the debugger script is run. # Note: initializations which are mostly used in only one sub-part # (e.g. variables for break/watch/actions) are in the corresponding # file: either in lib or (less good) command. # Are we using a debugger-enabled shell? If not let's stop right here. typeset old_setopt="$-" # is-at-least messes up in some situations so we have to not use it for now. # typeset -fuz is-at-least # Same as "functions -u -z" but better documented. # if ! is-at-least 4.3.6-dev-0 ; then # print "Sorry, your $_Dbg_shell_name just isn't modern enough." 2>&1 # print "We need 4.3.6-dev-0 or greater." 2>&1 # exit 30 # fi # is-at-least does an emulate -L zsh # emulate -L ksh # Will be set to 1 if the top-level call is a debugger. typeset -i _Dbg_script=0 # This function is overwritten by when lib/fns.sh gets loaded _Dbg_msg() { echo "$*" } # Used by "show version" as well as --version _Dbg_do_show_version() { _Dbg_msg "$_Dbg_debugger_name, release $_Dbg_release" } # Expand filename given as $1. # we echo the expanded name or return $1 unchanged if a bad filename. # Return is 0 if good or 1 if bad. # File globbing is handled. # Note we don't check that the file exists, just that the format is # valid; we do check that we can "search" the directory implied in the # filename. function _Dbg_expand_filename { typeset -r filename="$1" # Break out basename and dirname typeset basename="${filename##*/}" typeset -x dirname="${filename%/*}" # No slash given in filename? Then use . for dirname [[ $dirname == $basename ]] && [[ $filename != '/' ]] && dirname='.' # Dirname is ''? Then use / for dirname dirname=${dirname:-/} # Handle tilde expansion in dirname dirname=$(echo $dirname) typeset long_path [[ $basename == '.' ]] && basename='' if long_path=$( (cd "$dirname" ; pwd) 2>/dev/null ) ; then if [[ "$long_path" == '/' ]] ; then echo "/$basename" else echo "$long_path/$basename" fi return 0 else echo $filename return 1 fi } # Create temporary file based on $1 # file $1 _Dbg_tempname() { echo "$_Dbg_tmpdir/${_Dbg_debugger_name}_$1_$$" } # Process command-line options . ${_Dbg_libdir}/dbg-opts.sh OPTLIND=1 _Dbg_parse_options "$@" if [[ ! -d $_Dbg_tmpdir ]] && [[ ! -w $_Dbg_tmpdir ]] ; then echo "${_Dbg_pname}: cannot write to temp directory $_Dbg_tmpdir." >&2 echo "${_Dbg_pname}: Use -T try directory location." >&2 exit 1 fi # Save the initial working directory so we can reset it on a restart. typeset -x _Dbg_init_cwd=$PWD typeset -i _Dbg_running=1 # True we are not finished running the program typeset -i _Dbg_brkpt_num=0 # If nonzero, the breakpoint number that we # are currently stopped at. # Sets whether or not to display command before executing it. typeset _Dbg_set_trace_commands='off' # Known normal IFS consisting of a space, tab and newline typeset -x _Dbg_space_IFS=$' \t\r\n' # Number of statements to run before entering the debugger. Is used # intially to get out of sourced dbg-main.inc script and in top-level # debugger script to not stop in remaining debugger statements before # the sourcing the script to be debugged. typeset -i _Dbg_step_ignore=1 [[ -n $_Dbg_histfile ]] && fc -p ${_Dbg_histfile} zshdb-1.1.2/dbg-trace.sh.in000066400000000000000000000047571357365030100154360ustar00rootroot00000000000000# -*- shell-script -*- # This program needs to be SOURCE'd and is not called as an executable # # Copyright (C) 2008, 2011 Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place, Suite 330, Boston, # MA 02111 USA. typeset _Dbg_trace_old_set_opts _Dbg_trace_old_set_opts=$- set +u # Name we refer to ourselves by typeset _Dbg_debugger_name='@PACKAGE@' # The shell we are configured to run under. typeset _Dbg_shell='@SH_PROG@' # The short shell name. Helps keep code common in bash, zsh, and ksh debuggers. # Equivalent to typeset _Dbg_shell_name=${_Dbg_shell##*/} typeset -a _Dbg_script_args; _Dbg_script_args=("$@") # Original $0. Note we can't set this in an include. typeset _Dbg_orig_0=$0 # Equivalent to basename $0; the short program name typeset _Dbg_pname=${0##*/} ## Stuff set by autoconf/configure ### typeset prefix=@prefix@ typeset _Dbg_libdir=@PKGDATADIR@ ### [[ ! -d $_Dbg_libdir ]] && _Dbg_libdir='.' # Parse just the libdir option typeset -a libdir zparseopts -a libdir -E L: -library: if (( ${#libdir} > 0 )) ; then typeset -a lib_opts; eval "lib_opts=($libdir)" if [[ ! -d ${lib_opts[2]} ]] ; then print "${lib_opts[2]} is not a directory" exit 1 fi _Dbg_libdir=${lib_opts[2]} unset lib_opts fi # Pull in the rest of the debugger code. typeset _Dbg_main="$_Dbg_libdir/dbg-main.sh" if [[ ! -r $_Dbg_main ]] ; then print "${_Dbg_pname}: Can't read debugger library file '${_Dbg_main}'." print "${_Dbg_pname}: Perhaps @PACKAGE@ is installed wrong (if its installed)." >&2 print "${_Dbg_pname}: Try running @PACKAGE@ using -L (with a different directory)." >&2 print "${_Dbg_pname}: Run @PACKAGE@ --help for a list and explanation of options." >&2 exit 1 fi . ${_Dbg_libdir}/dbg-main.sh set -${_Dbg_trace_old_set_opts} unset _Dbg_trace_old_set_opts _Dbg_debugger() { trap '_Dbg_trap_handler $? "$0" "$@"' DEBUG } zshdb-1.1.2/doc/000077500000000000000000000000001357365030100133755ustar00rootroot00000000000000zshdb-1.1.2/doc/.gitignore000066400000000000000000000000451357365030100153640ustar00rootroot00000000000000/Makefile /Makefile.in /zshdb.1 /*~ zshdb-1.1.2/doc/Makefile.am000066400000000000000000000004401357365030100154270ustar00rootroot00000000000000EXT=1 man1_MANS = @PACKAGE@.$(EXT) EXTRA_DIST = $(man1_MANS) @PACKAGE@-man.pod all: $(INFO_DEPS) $(man1_MANS) html $(man1_MANS): @PACKAGE@-man.pod pod2man --name=@PACKAGE@ --release=$(PACKAGE_VERSION) --section=$(EXT) $(srcdir)/@PACKAGE@-man.pod >$@ MOSTLYCLEANFILES = $(man1_MANS) zshdb-1.1.2/doc/toRsT.py000077500000000000000000000064621357365030100150350ustar00rootroot00000000000000#!/usr/bin/env python """We use this to semi-automatically convert command docstrings to sphinx RsT""" import sys, os.path, inspect, re sys.path.insert(0, os.path.abspath('../trepan')) from trepan.processor.command import mock as Mmock def camelcase(s): return s[0].upper() + s[1:] def minus2plus(matchobj): print("gotone") return "\n" + '+' * len(matchobj.group(1)) + "\n" def cmdDoc2RsT(mod_name): exec("import trepan.processor.command.%s as mod" % (mod_name)) classnames = [ tup[0] for tup in inspect.getmembers(mod_name, inspect.isclass) if ('DebuggerCommand' != tup[0] and tup[0].endswith('Command')) ] cmd = None eval_cmd_template = 'cmd = mod.%s(cp)' for classname in classnames: eval_cmd = eval_cmd_template % classname try: exec(eval_cmd) except ImportError: pass except: print('Error loading %s from %s: %s' % (classname, mod_name, sys.exc_info()[0])) pass pass with open("commands/%s.rst" % (mod_name), "w") as fdoc: ref = ".. _%s:" % (mod_name) fdoc.write("%s\n\n" % ref) title = '%s' % (camelcase(mod_name)) fdoc.write("%s\n" % title) fdoc.write('-' * len(title) + '\n') if hasattr(cmd, '__doc__') and cmd.__doc__: doc = re.sub(r'\n([-][-]+)\n', minus2plus, cmd.__doc__) fdoc.write(doc) else: print("Can't find __doc__ for %s" % mod_name) pass pass return def subCmdDoc2RsT(): for mod_name in 'info set show'.split(): exec("import trepan.processor.command.%s as mod" % (mod_name)) classnames = [ tup[0] for tup in inspect.getmembers(mod_name, inspect.isclass) if ('DebuggerCommand' != tup[0] and tup[0].endswith('Command')) ] cmd_instances = [] eval_cmd_template = 'mod.%s(cp)' for classname in classnames: eval_cmd = eval_cmd_template % classname try: instance = eval(eval_cmd) except ImportError: pass except: print('Error loading %s from %s: %s' % (classname, mod_name, sys.exc_info()[0])) pass pass subcmds = instance.cmds.subcmds for subname in subcmds: with open("commands/%s/%s.rst" % (mod_name, subname), "w") as fdoc: ref = ".. _%s_%s:" % (mod_name, subname) fdoc.write("%s\n\n" % ref) title = '%s %s' % (camelcase(mod_name), camelcase(subname)) fdoc.write("%s\n" % title) fdoc.write('-' * len(title) + '\n') subcmd = subcmds[subname] if hasattr(subcmd, '__doc__') and subcmd.__doc__: doc = re.sub(r'\n([-][-]+)\n', minus2plus, subcmd.__doc__) fdoc.write(doc) else: print("Can't find __doc__ for %s" % subname) pass pass pass pass return d = Mmock.MockDebugger() d, cp = Mmock.dbg_setup() cmdDoc2RsT('set') subCmdDoc2RsT() zshdb-1.1.2/doc/zshdb-man.pod000066400000000000000000000127521357365030100157730ustar00rootroot00000000000000=pod =head1 NAME zshdb - zsh debugger =head1 SYNOPSIS B [I] [--] I [I