Re: sigtrap and TF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2007/12/5, Justin Ferguson <jnferguson@xxxxxxxxx>:
> I'm not going to sit and debug your asm, but you're doing something
> wrong because this works.
>
> Here's some 32-bit functions I wrote a while back for a project, it
> should help you figure out whats going on.
>
>
> void
> unsetTF(void)
> {
>         __asm__ __volatile__(
>                                 "pushf                  \n"
>                                 "mov    $0x100, %eax    \n"
>                                 "not    %eax            \n"
>                                 "andl   (%esp), %eax    \n"
>                                 "popf                   \n"
>         );
> }
>
> void
> setTF(void)
> {
>         __asm__ __volatile__(
>                                 "pushf                  \n"
>                                 "orl    $0x100, (%esp)  \n"
>                                 "popf                   "
>         );
>
>         return;
> }
>
> unsigned int
> isTFset(void)
> {
>         unsigned int retval;
>
>         __asm__ __volatile__(
>                                 "xor    %%eax, %%eax    \n"
>                                 "pushf                  \n"
>                                 "pop    %%eax           \n"
>                                 "and    $0x100, %%eax   \n"
>                                 : "=a" (retval)
>         );
>
>         return retval;
>
> }
The question is another, i'm sure that TF is set, i don't know why my
handler is not caught after TF set.

-- 
noone is alone.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux