On Wed, Dec 23, 2009 at 06:40:29AM -0600, Ralf Baechle wrote: > On Wed, Dec 23, 2009 at 02:42:48AM -0800, hermit wrote: > > > My GCC version is 4.2.3. it seems that it is not too old. I believe > > there is bad pointer arithmetic. > > Here is the do_ade print: > > do_ade, 542 address error exception occurs! MediaPlayerServ(pid:839) > > (a0 == 7edff5b6 a1 == 302daaca a2 == 00000002 a3 == 302daaca) > > (gp == 302e2730 sp == 7edff578 t9 == 2afb4640) > > (epc == 302c3250, ra == 302c3388) > > Suppose we can find which function cause "bad pointer arithmetic". > > I am new to MIPS, anybody can tell me how i can find the function? > > Thanks! > > This is not the normal kernel printout. It would seem that somebody who > didn't know about the existence of the logging code added this code. The > number 542 presumably is a line number and do_ade is in > arch/mips/kernel/unaligned.c. So look around line 542 in that file. If I understand hermit's problem, knowing the line in unaligned.c won't help much since the problem appears to be in the application MediaPayerServ. My suggestion is to use addr2line on the location where the exception occurred, which is the EPC value 302c3250. The addr2line utility can be used on the unstripped version of the userspace executable to determine the function, file, and line number where the unaligned access was made. > Ralf -- David VL