Re: [Gems-users] Magic Instructions


Date: Thu, 14 Sep 2006 18:46:14 -0400
From: "Marco Tirado" <marco.tirado@xxxxxxxxx>
Subject: Re: [Gems-users] Magic Instructions
We had the same problem when doing simulations with solaris 9. The simulation did not stop even when using the MAGIC BREAKPOINT macro directly. We solved it by defining a hap callback where we simply stop SIMICS, we used the MAGIC BREAKPOINT macro directly and the hap callback definition in our script looks like this.
 

@def hap_callback(user_arg, cpu, arg):

        SIM_break_simulation("MAGIC Breakpoint")

@SIM_hap_add_callback("Core_Magic_Instruction", hap_callback, None)

Hope this helps.

Marco



 
On 9/14/06, Dan Gibson <degibson@xxxxxxxx> wrote:
Try the following code. It uses 0x40000 explicitly (4<<16):

#define MAGIC_BREAK do {                                   \
       __asm__ __volatile__ ("sethi 0x40000, %g0");     \
} while (0);



Daniele Bordes wrote:
> Are you sure it is MAGIC(0x4000) and not MAGIC(0x40000)? Because I
> tried to use MAGIC_BREAKPOINT in my code and it doesn't work, and I
> noticed that according to macro definition in magic_instruction.h, it
> is substituted with
> MAGIC(0x40000) and not with MAGIC(0x4000) ...
> _______________________________________________
> Gems-users mailing list
> Gems-users@xxxxxxxxxxx
> https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> Use Google to search the GEMS Users mailing list by adding "site: https://lists.cs.wisc.edu/archive/gems-users/" to your search.
>
>

--
http://www.cs.wisc.edu/~gibson [esc]:wq!

_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/ " to your search.


[← Prev in Thread] Current Thread [Next in Thread→]