DSM- SIGSEGV signal read or write?

From: Daniel Kawer (dkawer_at_ic-itcr.ac.cr)
Date: 05/23/04

  • Next message: Kasper Dupont: "Re: DSM- SIGSEGV signal read or write?"
    Date: 22 May 2004 15:08:40 -0700
    
    

    Im working on the development of a DSM. I have a problem when catching
    the SIGSEGV signal. I need to know if the signal was generated the
    program trying to read or to write to the page in question.

    I read somewhere that it could be done like this:

    void PageHandler(int signum, struct sigcontext_struct scs )
    {
    address = (int) scs.cr2;
    error = (scs.err & 2); // 1==write, 0==read

    }

    but the variable never changes its value, no matter if its a read or
    write.

    Does anyone know a different/better way to approach this?

    Help will be aprecciated,
    Daniel Kawer
    Costa Rican Institute of Technology


  • Next message: Kasper Dupont: "Re: DSM- SIGSEGV signal read or write?"

    Relevant Pages

    • Re: i want Mirabelli back
      ... It's not a matter of impatience, the guy looked more nervous than a ... narc at a biker rally. ... I hope he turns out to be great catching the knuckler, ...
      (alt.sports.baseball.bos-redsox)
    • Re: 1 handed juggling
      ... 'Pattern doesn't matter, catching order doesn't matter, and I'd even guess ... Feel free to kick balls before catching them, ...
      (rec.juggling)
    • Re: A Pipe Test
      ... now catching them. ... > matter. ... Like the Great Dane chasing the Volkswagon, what do you do with them when ...
      (alt.smokers.pipes)
    • Re: I just realized something.....
      ... and have been catching up at work this week). ... Anyhow, while checking in on the newsgroup today, it dawned on me that I haven't missed a damn thing. ... In fact, the less time I spend reading and writing posts here, the more time I have to do things that actually matter. ... taken a peepee that actually mattered! ...
      (rec.music.phish)