From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 24 Oct 2008 19:17:21 +0000 (GMT) From: Gabriele Moabiti MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-889301253-1224875841=:68232" Message-ID: <66014.68232.qm@domain.hid> Subject: Re: [Xenomai-help] trap exceptions in user List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: Jan Kiszka , Xenomai help --0-889301253-1224875841=:68232 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =0AGilles Chanteperdrix wrote:=0A> Gabriele Moabiti wrote:=0A>> (...)=0A>> = I consider now ManageCustomExceptions a function that do nothing.=0A>> (...= )=0A>> INT 0 (divide error) or 16 (fpu exception)=0A>> The system hangs.=0A= > =0A> It will not work. It is because you have to handle the exception.=0A= > Otherwise, when returning to user-space, your programs tries the faulty= =0A> exception again, triggers the handler, which does nothing, and loops= =0A> indefinitely...=0A> =0A=0Aso the int 1 and 3 are instead signed as tra= ps with the old CS:EIP points past instruction causing exception...=0A=0ASo= rry for the question (I have always done it directly in asm reprogramming c= ustomizing the IDT), do I have to change the eip of the pt_regs structure p= assed to the function?=0A=0AThank you,=0A Gabriele=0A=0A=0A=0A Scop= ri il blog di Yahoo! Mail:=0ATrucchi, novit=C3=A0 e scrivi la tua opinione.= =0Ahttp://www.ymailblogit.com/blog --0-889301253-1224875841=:68232 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
<= br>Gilles Chanteperdrix wrote:
> Gabriele Moabiti wrote:
>> = (...)
>> I consider now ManageCustomExceptions a function that do = nothing.
>> (...)
>> INT 0 (divide error) or 16 (fpu exce= ption)
>> The system hangs.
>
> It will not work. It = is because you have to handle the exception.
> Otherwise, when return= ing to user-space, your programs tries the faulty
> exception again, = triggers the handler, which does nothing, and loops
> indefinitely...=
>

so the int 1 and 3 are instead signed as traps with the ol= d CS:EIP points past instruction causing exception...

Sorry for the question (I have always done it directly in asm reprogramming customizing = the IDT), do I have to change the eip of the pt_regs structure passed to th= e function?

Thank you,
    Gabriele

=0A=0A=0A=0A
S= copri il Blog di Yahoo! = Mail: trucchi, novit=C3=A0, consigli... e scrivi la tua opinione! --0-889301253-1224875841=:68232--