Re: examining a jump buffer



Allan Adler wrote:
Dan Espen <daneNO@xxxxxxxxxxxxxxxxxxxxxxxxx> writes:

Allan Adler <ara@xxxxxxxxxxxxxxxxxxxx> writes:
Suppose I have a line of C code:
setjmp(env);
and I want to actually examine env. Is that possible and, if so, what do
I do?
What do you mean "examine" it? env is a type jmp_buf.
If you are running under gdb, you could print it.
You could look in the header files and see what it really
is and then print the contents.
On linux, it looks like it's a struct defined in setjmp.h.

Thanks for the suggestions. I'm never sure what one can look at and
what one can't. For example, I think gdb can't really let you examine
kernel stuff. I think we (collectively) once had a thread here in which
I wanted to examine the innards of a FILE using gdb. Anyway, I'll try
what you suggest.

That would hot matter, since "env" is in your user space.

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 06:40:01 up 5 days, 19:03, 4 users, load average: 4.07, 4.15, 4.09
.



Relevant Pages

  • Re: examining a jump buffer
    ... and I want to actually examine env. ... If you are running under gdb, ... You could look in the header files and see what it really ... I am nowhere near Boston. ...
    (comp.os.linux.misc)
  • Re: examining a jump buffer
    ... Allan Adler wrote: ... kernel stuff. ... I wanted to examine the innards of a FILE using gdb. ... I looked at it in gdb and printed env ...
    (comp.os.linux.misc)
  • Re: examining a jump buffer
    ... kernel stuff. ... I wanted to examine the innards of a FILE using gdb. ... That would not matter, since "env" is in your user space. ...
    (comp.os.linux.misc)
  • Re: allocating double arrays dynamically
    ... Allan Adler writes: ... It was also a big help to write a routine that took the objects ... GDB but I'm not good enough yet at using GDB to examine all the elements ... of an array or a double array or a more complicated structure with it. ...
    (comp.lang.c)
  • Re: Redirecting stdout of running program
    ... use this value inside gdb instead? ... Well, you can look them up in the header files, just as the ... compiler does. ...
    (comp.os.linux.development.system)