|
From: Eduardo M. <ea...@us...> - 2005-11-15 16:58:26
|
>>Hmm. Now that really shouldn't happen. Two questions. Firstly,
>>what Linux kernel version and distribution are you using?
Kernel Version --- Kernel 2.6.5.xxx
Distribution --- Based on sles9 sp1
>>And secondly, if you compile and run the attached program (normally,
>>not on V), what result do you get?
I compiled and run the program you suggested and I get just the
following:
#valgrind --tool=none ./mytest
#Illegal Instruction
Eduardo Munoz
Julian Seward <ju...@va...>
Sent by: val...@li...
11/14/2005 07:22 PM
To
Eduardo Munoz/Austin/IBM@IBMUS
cc
val...@li...
Subject
Re: [Valgrind-users] Support questions: ppcnf, helgrind,and addrcheck
> --32569:1:main Dynamic memory manager is running
> --32569:1:main Getting stage1's name
> --32569:1:main Get hardware capabilities ...
> Illegal instruction
Hmm. Now that really shouldn't happen. Two questions. Firstly,
what Linux kernel version and distribution are you using?
And secondly, if you compile and run the attached program (normally,
not on V), what result do you get?
J
#include <stdio.h>
#include <signal.h>
#include <setjmp.h>
jmp_buf env;
void hdlr_fp ( int x ) { longjmp(env,1); }
void hdlr_vmx ( int x ) { longjmp(env,1); }
int main ( void )
{
sigset_t saved_set, tmp_set;
struct sigaction saved_act, tmp_act;
int have_fp, have_vmx;
sigemptyset(&tmp_set);
sigaddset(&tmp_set, SIGILL);
sigprocmask(SIG_UNBLOCK, &tmp_set, &saved_set);
sigaction(SIGILL, NULL, &saved_act);
tmp_act = saved_act;
tmp_act.sa_flags &= ~SA_RESETHAND;
tmp_act.sa_flags &= ~SA_SIGINFO;
tmp_act.sa_handler = hdlr_fp;
sigaction(SIGILL, &tmp_act, NULL);
have_fp = 1;
if (setjmp(env)) {
have_fp = 0;
} else {
__asm__ __volatile__("fmr 0,0");
}
tmp_act.sa_handler = hdlr_vmx;
sigaction(SIGILL, &tmp_act, NULL);
have_vmx = 1;
if (setjmp(env)) {
have_vmx = 0;
} else {
__asm__ __volatile__("vor 0,0,0");
}
sigaction(SIGILL, &saved_act, NULL);
sigprocmask(SIG_SETMASK, &saved_set, NULL);
printf("fp %d vmx %d\n", have_fp, have_vmx);
return 0;
}
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Valgrind-users mailing list
Val...@li...
https://lists.sourceforge.net/lists/listinfo/valgrind-users
|
|
From: Julian S. <ju...@va...> - 2005-11-15 17:42:00
|
> I compiled and run the program you suggested and I get just the > following: > > #valgrind --tool=none ./mytest > #Illegal Instruction No, I mean, what happens when you run ./mytest not on Valgrind? If it still gets an illegal instruction, please use GDB to find out which instruction is the problem. J |
|
From: Eduardo M. <ea...@us...> - 2005-11-15 22:44:19
|
# gdb ./mytest
GNU gdb 6.2.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you=20
are
welcome to change it and/or distribute copies of it under certain=20
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for=20
details.
This GDB was configured as "ppc-linux"...Using host libthread=5Fdb library =
"/lib/.
(gdb) r
Starting program: /tmp/mytest
Program received signal SIGILL, Illegal instruction.
main () at mytest.c:35
warning: Source file is more recent than executable.
35 =5F=5Fasm=5F=5F =5F=5Fvolatile=5F=5F("fmr 0=
,0");
(gdb) c
Continuing.
Program received signal SIGILL, Illegal instruction.
main () at mytest.c:44
44 =5F=5Fasm=5F=5F =5F=5Fvolatile=5F=5F("vor 0,0,0");
(gdb) c
Continuing.
Program terminated with signal SIGILL, Illegal instruction.
The program no longer exists.
(gdb)
Regards,
Eduardo A. Mu=F1oz
Julian Seward <ju...@va...>=20
Sent by: val...@li...
11/15/2005 11:42 AM
To
Eduardo Munoz/Austin/IBM@IBMUS
cc
val...@li...
Subject
Re: Fw: [Valgrind-users] Support questions: ppcnf, helgrind,and addrcheck
> I compiled and run the program you suggested and I get just the
> following:
>
> #valgrind --tool=3Dnone ./mytest
> #Illegal Instruction
No, I mean, what happens when you run ./mytest not on Valgrind?
If it still gets an illegal instruction, please use GDB to find out
which instruction is the problem.
J
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad=5Fid=3D7628&alloc=5Fid=3D16845&op=3Dclick
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Valgrind-users mailing list
Val...@li...
https://lists.sourceforge.net/lists/listinfo/valgrind-users
|