elp.pl

Author : Stuart Seymon
Mi-Pal,  Griffith University, Australia
31/7/2003

Changes (5/9/2003)
=======
Thanks to the tekkotsu team for pointing out a bug regarding ls.

Description
===========

elp is a perl script which parses the "EMON.LOG" files, which are generated 
when code on a Sony Aibo crashes.  This script can be used in conjunction with
the StackTrace program developed by Joel Fenwick.

Yes, this is similar to the EmonLogParser script supplied by Sony, however, in addition to obtaining the relevant information, elp goes on to call the Sony supplied program, 
"mipsel-linux-objdump".  The assembly code generated by this call is written 
to an "aiboDis*.ass" file, and the code around the crash is printed to stdout.

Requirements
============

elp.pl was written for use in the cygwin environment, however it should also 
work on any unix derivative machine.  Having said that, you may need to alter 
the path locations of the following to what it corresponds to on your machine:

/usr/bin/perl
/usr/bin/ls
/usr/bin/wc
/usr/local/OPEN_R_SDK/bin/mipsel-linux-readelf -s
/usr/local/OPEN_R_SDK/bin/mipsel-linux-objdump

the commands "which" or "whereis" should help you if are unsure as to their 
location.


Usage
=====

"elp.pl" should be placed in the directory where you want the assembly code to
be written, as the resulting file is written to the current working directory.  
It is also a good idea to keep it where the relevant ".nosnap.elf" file resides 
(wherever the object that caused the problem was made), provided the offending 
object is known beforehand.  However, elp will prompt you for the directory 
where the object was made if it is not the same as the cwd.


at the prompt, type:

./epl.pl [-e emonFile][-A]

where
  -e specifies the EMON.LOG file to be "emonFile"
     default emonFile: ./EMON.LOG
  -A stop assembly code being printed to stdout

The assembly code is written to a file "aiboDis*.ass", where * is an integer 
that represents the number of disassemblies currently in the cwd (hence, it 
starts at zero, and increments with each new disassembly).  

The *ass files by the nature can be quite large (ours were around 10M), so it
is a good idea to delete them once you are finished with them.


