AminetAminet
Search:
83365 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/debug/OsGrind.lha

Mirror:Random
Showing:m68k-amigaosgeneric
No screenshot available
Short:Configurable Os argument checker
Author:thomas.richter at alumni.tu-berlin.de (Thomas Richter)
Uploader:thomas ricther alumni tu-berlin de (Thomas Richter)
Type:dev/debug
Version:40.1
Architecture:m68k-amigaos >= 2.0.4
Date:2021-01-20
Download:http://aminet.net/dev/debug/OsGrind.lha - View contents
Readme:http://aminet.net/dev/debug/OsGrind.readme
Downloads:193

OsGrind is a configurable/scriptable debugging tool to validate
arguments of operating system calls against requirements specified
in the Autodocs. In case the parameters are invalid, the tool
creates debugging ouptut, including registers, stack retrace,
hunk and segment information and generates a disassembly around
the return path.

OsGrind has similar goals than PatchWork by Richard Körber, but
it does not have the checks built-in. Instead, all validation tests
are configured through an external file which is compiled at run
time to executable code.

----------------------------------------------------------------------

Installation:

- Copy OsGrind to whereever you like, possibly C:
- Copy OsGrind.config to ENVARC:

The config file assumes that the following assigns are made:

FD: shall point to the directory containing the library definition
files, such as exec_lib.fd or dos_lib.fd.

INCLUDE: shall point to the directory containing the operating system
include files, preferably the V44 (Os 3.9) or later includes.

It is recommended to install the following additional components:

- SegTracker: If SegTracker is available and run upfront this tool,
  OsGrind will print hunk and offset information of the stack trace
  back.
- disassembler.library (from the MuForce package): If present,
  OsGrind may be instructed to generate a disassembly around the
  faulty call path.
- Sashimi: By default, OsGrind will report its debug output to the
  serial port, 9600 baud, 8 bit, no parity. With Sashimi, debug
  output can be redirected to a console. Optionally, with Os 3.2 or
  above, the system logger of the boot menu can be used to this
  end as well.
- MuForce: To capture additional problems, installing this tool is
  recommended as well.

OsGrind does, by default, not run in background, and aborts on ^C.
To run it in background, use the "RUN" command, or the "&" (runback)
operator of the shell.

----------------------------------------------------------------------

OsGrind command line arguments:

OsGrind PATCHFILE,QUIT=OFF/S,DEBUG/S,STACKLINES/K/N,
	DREGCHECK/S,AREGCHECK/S,STACKCHECK/S,
	DISPC=SHOWDIS/S,DISRANGE/K/N,DISABLEBELL/S,
	LED/K/N,DRYRUN/S

PATCHFILE: The file to read the configuration from. By default,
	   the configuration is read from ENV:OsGrind.config.

The syntax of the configuration file is discussed in Syntax.REAMDE

QUIT=OFF:  Stops a running instance of OsGrind. Alternatively, you
	   can stop OsGrind via ^C (Control-C) from the console.	 

DEBUG:     Writes the run-time compiled code to the output stream
	   to allow manual validation of the Os patches. Provide
	   this output to allow me to debug OsGrind.

STACKLINES:A numerical argument that specifies how many lines of
	   stack OsGrind shall print as stack traceback, and
	   optionally check for hunk/offset information by
	   SegTracker.

DREGCHECK: Test the data registers through SegTracker.

AREGCHECK: Test the address registers through SegTracker.

STACKCHECK:Test stack traceback through SegTracker.

DISPC:	   Provide a disassembly around the faulty Os call. This
	   argument requires the disassembler.library in LIBS:.

DISRANGE:  The size of the disassembled region in bytes. Disassembly
	   starts roughly this number of bytes ahead of the PC,
	   and continues approximately the same number of bytes
	   below the PC.

DISABLEBELL: Disable printing the BELL character upon hits, i.e.
	   invalid function arguments.

LED:	   Determines the delay for flashing the power LED upon a
	   hit. If 0, the LED is not flashed. Larger numbers delay
	   longer.

DRYRUN:	   Only read the configuration file, test its syntax
	   and optionally print the generated code, but do not
	   install patches.

----------------------------------------------------------------------

                      The THOR-Software Licence (v3, January 2nd 2021)


This License applies to the computer programs known as the "OsGrind".
The "Program", below, refers to such program. The "Archive" refers to
the package of distribution, as prepared by the author of the Program,
Thomas Richter. Each licensee is addressed as "you".


The Program and the data in the archive are freely distributable
under the restrictions stated below, but are also Copyright (c)
Thomas Richter.

Distribution of the Program, the Archive and the data in the Archive by a
commercial organization without written permission from the author to any
third party is prohibited if any payment is made in connection with such
distribution, whether directly (as in payment for a copy of the Program) or
indirectly (as in payment for some service related to the Program, or
payment for some product or service that includes a copy of the Program
"without charge"; these are only examples, and not an exhaustive
enumeration of prohibited activities).


However, the following methods of distribution involving payment shall not
in and of themselves be a violation of this restriction:

(i) Distributing the Program on a physical data carrier (e.g. CD-ROM,
    DVD, USB-Stick, Disk...) provided that:

a) the Archive is reproduced entirely and verbatim on such data carrier,
   including especially this licence agreement;

b) the data carrier is made available to the public for a nominal
   fee only, i.e. for a fee that covers the costs of the data carrier,
   and shipment of the data carrier;

c) a data carrier with the Program installed is made available to the
   author for free except for shipment costs, and

d) provided further that all information on said data carrier is
   redistributable for non-commercial purposes without charge.


Redistribution of a modified version of the Archive, the Program or the
contents of the Archive is prohibited in any way, by any organization,
regardless whether commercial or non-commercial. Everything must be kept
together, in original and unmodified form.



Limitations.


THE PROGRAM IS PROVIDED TO YOU "AS IS", WITHOUT WARRANTY. THERE IS NO
WARRANTY FOR THE PROGRAM, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. 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.


IF YOU DO NOT ACCEPT THIS LICENCE, YOU MUST DELETE THE PROGRAM, THE ARCHIVE
AND ALL DATA OF THIS ARCHIVE FROM YOUR STORAGE SYSTEM. YOU ACCEPT THIS
LICENCE BY USING OR REDISTRIBUTING THE PROGRAM.


                                                        Thomas Richter

-------- history -----------------------------------------------------

Release 40.0:	 This is an internal beta release.

Release 40.1:	 First official (non-preview) release

- The assembly syntax parser also attempted to contents of 
macros instead of skipping them, causing some confusion.

- The assembly syntax parser did not recognize the ' operator. 

- The ##check block parser got confused on terminating blank spaces. 
In net effect, this caused parsing errors on <dos/dos.i>.

- OsGrind is now also prepared to patch functions that are used within
the SetFunction() function itself.

- The OsGrind.config file was extended to also check for the validity
of the mode/type arguments of Open() and Lock().

- There was a bad bit check in AllocNamedObject() that was fixed in
the default OsGrind.config.

----------------------------------------------------------------------

Send ideas, improvements, bugreports (please as concrete as possible) to:


        Thomas Richter


EMail:  thomas.richter at alumni.tu-berlin.de

----------------------------------------------------------------------

Thomas Richter, January 2021.




Contents of dev/debug/OsGrind.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[unknown]                13491   30224  44.6% -lh5- 6cf9 Jan 19 18:09 OsGrind/OsGrind
[unknown]                 4242   16984  25.0% -lh5- 65c3 Jan 19 18:09 OsGrind/OsGrind.config
[unknown]                 3504    8024  43.7% -lh5- 8b42 Jan 19 18:13 OsGrind/OsGrind.readme
[unknown]                 7689   25716  29.9% -lh5- c79d Jan  4 15:59 OsGrind/Syntax.README
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total         4 files   28926   80948  35.7%            Jan 21 03:59

Aminet © 1992-2021 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>