Stack Manipulation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pie Squared

    Stack Manipulation

    I've read some about creating garbage collectors (for other languages)
    in C, and conservative garbage collectors sometimes manipulate the
    program stack to look for pointers.

    How would I do it?

    Where can I find functions to manipulate/find things out about the
    program stack?

    Also in a similar vein, how can I dump all the processor registers to
    the stack?

    I realize this probably isn't cross-platform AT ALL. I would just
    appreciate a few pointers on how to do this, especially on Linux/x86
    set ups.

    Thanks

    PieSquared
  • Kenny McCormack

    #2
    Re: Stack Manipulation

    In article <7fdc6236-a448-4d30-8ffc-12c396b53f26@d4 g2000prg.google groups.com>,
    Pie Squared <PieSquared@gma il.comwrote:
    >I've read some about creating garbage collectors (for other languages)
    >in C, and conservative garbage collectors sometimes manipulate the
    >program stack to look for pointers.
    >
    >How would I do it?
    >
    >Where can I find functions to manipulate/find things out about the
    >program stack?
    (Beavis & Butthead) He said "stack"!!!

    Comment

    • user923005

      #3
      Re: Stack Manipulation

      On Mar 3, 3:48 pm, Pie Squared <PieSqua...@gma il.comwrote:
      I've read some about creating garbage collectors (for other languages)
      in C, and conservative garbage collectors sometimes manipulate the
      program stack to look for pointers.
      >
      How would I do it?
      >
      Where can I find functions to manipulate/find things out about the
      program stack?
      >
      Also in a similar vein, how can I dump all the processor registers to
      the stack?
      >
      I realize this probably isn't cross-platform AT ALL. I would just
      appreciate a few pointers on how to do this, especially on Linux/x86
      set ups.
      http://en.wikipedia.org/wiki/Garbage...mputer_science)

      Comment

      • Keith Thompson

        #4
        Re: Stack Manipulation

        Pie Squared <PieSquared@gma il.comwrites:
        [...]
        And... I don't think I understood the, "(Beavis & Butthead) He said
        "stack"!!!" ...
        Don't worry about it. That was written by one of our resident trolls.
        Please ignore him. Really.

        --
        Keith Thompson (The_Other_Keit h) <kst-u@mib.org>
        Nokia
        "We must do something. This is something. Therefore, we must do this."
        -- Antony Jay and Jonathan Lynn, "Yes Minister"

        Comment

        Working...