Commit Graph

5 Commits

Author SHA1 Message Date
Rabin Vincent 5358db0b0e scripts: add ARM support to decodecode
This patch adds support for decoding ARM oopses to scripts/decodecode.
The following things are handled:

 - ARCH and CROSS_COMPILE environment variables are respected.

 - The Code: in x86 oopses is in bytes, while it is in either words (4
   bytes) or halfwords for ARM.

 - Some versions of ARM objdump refuse to disassemble instructions
   generated by literal constants (".word 0x...").  The workaround is to
   strip the object file first.

 - The faulting instruction is marked (liked so) in ARM, but <like so>
   in x86.

 - ARM mnemonics may include characters such as [] which need to be
   escaped before being passed to sed for the "<- trapping instruction"
   substitution.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-02-02 14:33:54 +01:00
Arjan van de Ven 846442c8dd scripts: improve the decodecode script
kerneloops.org has been using an improved "decodecode" script,
specifically it has a special marker that shows which line in the assembly
the oops happened at, like this:

  20:	83 e0 03             	and    $0x3,%eax
  23:	09 d8                	or     %ebx,%eax
  25:	85 db                	test   %ebx,%ebx
  27:	89 02                	mov    %eax,(%edx)
  29:	74 0f                	je     0x3a
  2b:*	3b 73 04             	cmp    0x4(%ebx),%esi     <-- trapping instruction
  2e:	75 05                	jne    0x35
  30:	89 53 04             	mov    %edx,0x4(%ebx)
  33:	eb 07                	jmp    0x3c
  35:	89 53 08             	mov    %edx,0x8(%ebx)

this patch updates the kernel copy to also have this functionality.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Reviewed-by: WANG Cong <wangcong@zeuux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-12-03 22:36:39 +01:00
Linus Torvalds 14d03fd98e Mark 'scripts/decodecode' executable
.. because it is.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-30 14:02:21 -07:00
Randy Dunlap fa220d89ad kbuild: minor scripts/decodecode update
Remove the tmp file when exiting.  Noticed by Arjan van de Ven.
Catch mktemp failure and exit with message.
Trap kill or other signals and exit cleanly.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:14:40 +01:00
Randy Dunlap dcecc6c700 doc/oops-tracing: add Code: decode info
Add info that the Code: bytes line contains <xy> or (wxyz) in some
architecture oops reports and what that means.

Add a script by Andi Kleen that reads the Code: line from an Oops report
file and generates assembly code from the hex bytes.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16 09:05:48 -07:00