comp.lang.ada
 help / color / mirror / Atom feed
From: "James M. Darlack" <jmd@access.digex.net>
Subject: Testing exception handlers
Date: 1998/03/05
Date: 1998-03-05T00:00:00+00:00	[thread overview]
Message-ID: <Pine.SUN.3.96.980305114226.2982B-100000@access2.digex.net> (raw)
In-Reply-To: 6cqqf7$or1$1@plug.news.pipex.net


Hi!

Im writing a tool(s) for testing unhandled exceptions, and standard
exceptions such as PROGRAM, TASKING, and STORAGE,for an Intel embedded
system.  My basic tool is a procedure shown at the end of this email.

Using the basic tool, I can invoke unhandled interupt exceptions and the
three standard exceptions.  However, what do I do to simulate the standard
exceptions within the code without the test procedure?  I would like to
create another tool(s), that would invoke a real tasking, programming, and
storage errors.

I contacted the compiler manufacturer, and they were vague... to say the
least. 

I am a C and assembler programmer, with Ada experience from over 10 years
ago.  So any help would be appreciated.

Thanks!  

Jim   

Note! Please respond to jmd@darlack.com

To use the test tool, include it in the package, and re-compile and link.
Set a breakpoint for the start of the procedure, step until you can change
the TEST_NUM, and single step or run until the exception is invoked.

  procedure UE_TEST is
    TEST_NUM : INTEGER := 99; --change to the case that matches the
                              --excpetion, that you want to invoke.
  begin
    case TEST_NUM is
      when  0 => INT0;  --UNHANDLED_EXCEPTION_000
      when  1 => INT1;  --UNHANDLED_EXCEPTION_001
       "
       "
      when 20 => raise PROGRAM_ERROR;
      when 21 => raise STORAGE_ERROR;
      when 22 => raise TASKING_ERROR;
      when others => null;
    end case;
  end UE_TEST;







  parent reply	other threads:[~1998-03-05  0:00 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-21  0:00 question re Ada equivalent of C function David Fisher
1998-02-21  0:00 ` Corey Ashford
1998-02-22  0:00   ` Nick Roberts
1998-02-21  0:00 ` Robert Dewar
1998-02-21  0:00 ` Brian Rogoff
1998-02-21  0:00   ` Robert Dewar
1998-02-22  0:00     ` Brian Rogoff
1998-02-21  0:00   ` Jerry van Dijk
1998-02-21  0:00     ` David Fisher
1998-02-22  0:00       ` Jerry van Dijk
1998-02-22  0:00         ` Robert Dewar
1998-02-22  0:00           ` Andi Kleen
1998-02-22  0:00       ` Simon Wright
1998-02-22  0:00         ` Simon Wright
1998-02-22  0:00   ` Nick Roberts
1998-02-22  0:00     ` frc
1998-02-22  0:00 ` Larry Kilgallen
1998-02-22  0:00   ` Robert Dewar
1998-02-22  0:00   ` frc
1998-02-22  0:00     ` Linux/POSIX packages for GNAT Markus Kuhn
1998-02-22  0:00       ` Robert Dewar
1998-02-23  0:00         ` Andi Kleen
1998-02-22  0:00           ` Robert Dewar
1998-02-23  0:00             ` Markus Kuhn
1998-02-23  0:00               ` Robert Dewar
1998-02-23  0:00         ` Markus Kuhn
1998-02-23  0:00           ` Robert Dewar
1998-02-23  0:00             ` Markus Kuhn
1998-02-24  0:00               ` question re Ada equivalent of C function Dale Stanbrough
1998-02-22  0:00       ` Linux/POSIX packages for GNAT Andi Kleen
1998-02-22  0:00         ` Samuel Tardieu
1998-02-23  0:00           ` Nick Roberts
1998-02-23  0:00             ` Samuel Tardieu
1998-03-05  0:00             ` James M. Darlack [this message]
1998-02-22  0:00         ` Markus Kuhn
1998-02-22  0:00           ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox