Note that there are some explanatory texts on larger screens.

plurals
  1. POException Handling Context Switching and SEH
    primarykey
    data
    text
    <p>I have been doing some reading lately about Exception Handling and the .Net Framework and this seems to have left me more confused then when I started. </p> <p>In CLR via C# Fourth Addition I Read:</p> <blockquote> <p>Also, the .NET Framework exception-handling mechanism is built using the Structured Exception Handling (SEH) mechanism offered by Microsoft Windows. SEH has been discussed in many resources, including my own book, Windows via C/C++, 5th ed. (Microsoft Press, 2007), which contains three chapters devoted to SEH.</p> </blockquote> <p>Now, here is where my confusion starts. If the .Net Framework is built Using the SEH but is this only used for an unhandled exception or is it used right off the bat for all exception handling in .NET if so where does the CLR fit in, is taking Queues from SEH or is it acting on its own and using <a href="http://www.microsoft.com/msj/0197/Exception/Exception.aspx" rel="nofollow">SEH</a> if and when an <a href="http://msdn.microsoft.com/en-us/magazine/cc793966.aspx" rel="nofollow">unhandled exception Occurs?</a>.</p> <p>Second How does Context switching from the Kerrnal mode to User mode fit in? I know when a thread is created it has (From CLR via C#)</p> <blockquote> <p>Thread environment block (TEB) The TEB is a block of memory allocated and initialized in user mode (address space that application code can quickly access). The TEB consumes 1 page of memory (4 KB on x86 and x64 CPUs, 8 KB on an IA64 CPU). The TEB contains the head of the thread’s exception-handling chain. Each try block that the thread enters inserts a node in the head of this chain; the node is removed from the chain when the thread exists in the try block. In addition, the TEB contains the thread’s thread-local storage data as well as some data structures for use by Graphics Device Interface (GDI) and OpenGL graphics.</p> </blockquote> <p>AS well as the User Mode Stack and The Kernel mode stack. But Why would a context switch need to happen at any point as they have everything needed to process is on the same thread?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload