But this would break on ANY magic instruction, correct? Because you're
ignoring the argument. Maybe that's what you want, but you're giving up
a lot of flexibility in general. (This is what I do, as well, but I
have separate magic instructions to clear Ruby stats, dump Ruby stats, etc.)
...gb
Marco Tirado wrote:
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
<mailto: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 <mailto: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 <http://www.cs.wisc.edu/%7Egibson>
[esc]:wq!
_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx <mailto: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/
<https://lists.cs.wisc.edu/archive/gems-users/>" to your search.
------------------------------------------------------------------------
_______________________________________________
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.
|