This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: LIBJAVA PORT to DG/UX (QUESTIONS)
- To: takis@XFree86.org
- Subject: Re: LIBJAVA PORT to DG/UX (QUESTIONS)
- From: Andrew Haley <aph@pasanda.cygnus.co.uk>
- Date: 9 Sep 1999 14:21:40 -0000
- CC: java-discuss@sourceware.cygnus.com
> Date: Wed, 8 Sep 1999 13:07:22 -0700 (PDT)
> From: Takis Psarogiannakopoulos <takis@XFree86.org>
>
> For the time I need some help with the file i386-signal.h:
>
> i586-dg-dgux should use the include/i386-signal.h
> I have make it i386-dgux-signal.h as the struct in
> sys/signal.h is sigcontext and not sigcontext_struct.
>
> In the DG/ux header sys/signal.h , sigcontext struct
> is (unlike linux) as:
>
> struct sigcontext {
> int sc_onstack; /* sigstack state to restore */
> int sc_mask; /* signal mask to restore */
> int sc_sp; /* sp to restore */
> int sc_pc; /* pc to retore */
> int sc_ps; /* psl to restore */
> int sc_eax; /* eax to restore */
> int sc_edx; /* edx to restore */
> };
>
> ** %par()
> ** This structure describes the information pushed onto a stack
> ** when a signal is delivered. This is used by the sigret()
> ** system call to restore state following execution of the signal
> ** handler.
> **
>
> >From the point of view of i386-signal.h ,obviously eip is in DG/ux
> sc_pc. Aslo eax , edx are sc_eax, sc_edx.
> But what about the ebp stuff? I have no linux machine around
> to have a look in the sigcontext and see what ebp does.
ebp is used as the frame pointer. All that the handler does is
1. Overwrite the current ebp with the ebp at the time when the
signal occurred.
2. Overwrite the pc in the stack with the pc at the time when the
signal occurred. Once that's done you just call _Jv_Throw.
If the saved ebp is not in the DG/ux sigcontext you are dead.
However, in my opinion it must be saved on the stack, even if it
doesn't appear in the header file.
Why don't you run GDB and put a breakpoint on the signal handler? Run
the program which generates the signal, do an "info reg" to look at
the registers when the signal is delievered, then continue until the
breakpoint on the signal handler is delivered. The do a memory dump
of the stack to see where the ebp is saved.
Andrew.