]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* gdbinv-s.texi (Bootstrapping): Document exceptionHandler.
authorJim Kingdon <jkingdon@engr.sgi.com>
Thu, 15 Jul 1993 19:00:08 +0000 (19:00 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Thu, 15 Jul 1993 19:00:08 +0000 (19:00 +0000)
(Debug Session): Mention exceptionHandler.  Add xref to Bootstrapping.

gdb/doc/ChangeLog
gdb/doc/gdbinv-s.texi

index 3e65a5f4f72103a9048b23281bdb5829b0168634..59e389f2b4b0c8207540ea15e31304c50a067a33 100644 (file)
@@ -1,3 +1,8 @@
+Thu Jul 15 13:15:01 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
+
+       * gdbinv-s.texi (Bootstrapping): Document exceptionHandler.
+       (Debug Session): Mention exceptionHandler.  Add xref to Bootstrapping.
+
 Mon Jul 12 13:37:02 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
        * stabs.texinfo: N_MAIN is sometimes used for C.
index 33bf095147849172a612e43879f5b9869d816271..277221c681cfc5ef3aa3c4efa0e00fcb748d67cb 100644 (file)
@@ -156,6 +156,30 @@ Write this subroutine to write a single character to the serial port.
 It may be identical to @code{putchar} for your target system; a 
 different name is used to allow you to distinguish the two if you wish.
 
+@item void exceptionHandler (int @var{exception_number}, void *@var{exception_address})
+Write this function to install @var{exception_address} in the exception
+handling tables.  You need to do this because the stub does not have any
+way of knowing what the exception handling tables on your target system
+are like (for example, the processor's table might be in @sc{rom},
+containing entries which point to a table in @sc{ram}).
+@var{exception_number} is the exception number which should be changed;
+its meaning is architecture-dependent (for example, different numbers
+might represent divide by zero, misaligned access, etc).  When this
+exception occurs, control should be transferred directly to
+@var{exception_address}, and the processor state (stack, registers,
+etc.) should be just as it is when a processor exception occurs.  So if
+you want to use a jump instruction to reach @var{exception_address}, it
+should be a simple jump, not a jump to subroutine.
+
+@c For the 386, doesn't the interrupt gate contain a privilege level?
+@c If so, what should it be set to?  I suspect the answer is the
+@c privilege level in effect at the time that exceptionHandler is
+@c called, but I'm not sure.  FIXME.
+For the 386, @var{exception_address} should be installed as an interrupt
+gate so that interrupts are masked while the handler runs.  The
+@sc{sparc} and 68k stubs are able to mask interrupts themself without
+help from @code{exceptionHandler}.
+
 @item void flush_i_cache()
 @kindex flush_i_cache
 Write this subroutine to flush the instruction cache, if any, on your
@@ -193,10 +217,11 @@ steps.
 
 @enumerate
 @item
-Make sure you have the supporting low-level routines:
+Make sure you have the supporting low-level routines
+(@pxref{Bootstrapping}):
 @display
 @code{getDebugChar}, @code{putDebugChar},
-@code{flush_i_cache}, @code{memset}.
+@code{flush_i_cache}, @code{memset}, @code{exceptionHandler}.
 @end display
 
 @item
@@ -230,6 +255,8 @@ Make sure you have a serial connection between your target machine and
 the @value{GDBN} host, and identify the serial port used for this on the host.
 
 @item
+@c The "remote" target now provides a `load' command, so we should
+@c document that.  FIXME.
 Download your program to your target machine (or get it there by
 whatever means the manufacturer provides), and start it.