Jump to content

linux x86 exception handling

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
innerLOL

innerLOL

    Newbie

  • Members
  • PipPip
  • 29 posts
in windows i have SEH, fs:0 point to TEB wich contain handler for exception.

when exception occur handler is called with information about exception and context to allow changing eip for example.


how do i do simillar thing on linux? i belive there must be some sort of exception handling. From my understanding, if i force excpetion by executing privileged instruction, dividing by 0, accessing not mapped address, and so on, kernel will send signal to my process. So instead of creating SEH frame i must temporary change signal handler. Is that correct?

I write in asm i dont care about c methods like try/except.

#2
innerLOL

innerLOL

    Newbie

  • Members
  • PipPip
  • 29 posts
bump