valgrind illegal instruction

Thiago Macieira thiago at macieira.org
Mon Jul 7 12:55:10 PDT 2014


On Monday 07 July 2014 20:24:00 Amit Chaudhuri wrote:
> Hi Robert,
> 
> I was interested in your post about Creator, valgrind and illegal
> instruction.  I've been off the development effort for > year but
> still watch some posts when time permits...
> 
> I'd echo Dirk's recommendation about the value of the tool.  Seriously
> opened my eyes more than once.
> 
> I've been doing some work on cross compilation with Qt, ARM and
> powerpc and have only come across "illegal instruction" when things
> were cross compiled with rubbish options.  No idea if this hint is
> relevant to you or not.  But if you can get gdb onto the
> pre-initialisation code you might be able to find the instruction
> responsible (stepi) and work back.

Valgrind also prints the bytes near the instruction pointer that caused the 
SIGILL, so we should be able to decode manually. And with the fault address, 
you should be able to find the instruction in the output of objdump -Cdr.
-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358



More information about the subsurface mailing list