| View previous topic :: View next topic |
| Author |
Message |
TyRaNiD
Joined: 18 Jan 2004 Posts: 919
|
Posted: Mon Dec 11, 2006 1:24 am Post subject: PRXTool HTML disassembly |
|
|
I've just added HTML output mode to prxtool disassembly, it sets up all internal and external links to be anchors so you can jump around the disassembly (and if setup correctly you can even jump between modules).
You need to do a small bit of setup to get it to work correctly, especially the inter module jumps so here is a rough tutorial :)
To get it to work correctly you need to do a few things. First generate a new libdoc xml file for your firmware you are interested in using say:
prxtool -n psplibdoc.xml -x -s x ~/flash0_decypted/v3.02/kd/*.prx ~/flash0_decypted/v3.02/vsh/module/*.prx > 3.02.xml
This sets up the dependancy map. Now use this for your disassembly:
prxtool -n 3.02.xml --disasm --disopts wdx --xmldis --funcs functions.txt ~/flash0_decypted/v3.02/kd/*.prx ~/flash0_decypted/v3.02/vsh/module/*.prx
That should output a html file for each prx in your current directory. The only real problem with this is size, something like paf weighs in at around 50megs! Admittedly that isn't that different from a raw text dump but text editors generally can handle it better than webbrowser seem to. To access the inter module links you must first click on the link to the stub, then in the stubs header there should be an "Imported from xxxx.prx" line with the prx bit linked. Click this and it will take you to the linked module file if it exists.
Seems something like links is best to view (unless you have an absolute beast of a machine), still YMMV. |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 753
|
Posted: Mon Dec 11, 2006 6:51 pm Post subject: |
|
|
oh great it may help me a lot :)))
I was using PSPINSIDE and pspdev.ofcode.com to find out what I was interested for.
If I understand well, your tutorial gives the same result in less effort so I can concentrate on the parts i'm interested with ? |
|
| Back to top |
|
 |
FreePlay
Joined: 04 Jan 2006 Posts: 71 Location: Schenectady, New York, USA
|
Posted: Mon Dec 11, 2006 11:49 pm Post subject: |
|
|
| Ooh, very nice :) Should be of great use to me as I re-teach myself MIPS and learn how to apply it here. |
|
| Back to top |
|
 |
adrahil
Joined: 16 Mar 2006 Posts: 277
|
Posted: Tue Dec 12, 2006 4:19 am Post subject: |
|
|
thanks Ty!!!!!
I LOVE YOU XDDDDDDDD |
|
| Back to top |
|
 |
zshadow
Joined: 26 Dec 2005 Posts: 42
|
Posted: Tue Dec 12, 2006 3:31 pm Post subject: |
|
|
nice work!
:) |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 753
|
Posted: Wed Jan 03, 2007 11:28 am Post subject: |
|
|
oh well, there is a bemol :((((
| Code: |
mtv
viim.s
vi2f.q
vi2f.t
vmmov.p
|
as you can see disassembly of vfpu instructions are very incomplete :(
Last edited by hlide on Sun Jan 07, 2007 11:58 am; edited 1 time in total |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 753
|
Posted: Sat Jan 06, 2007 11:38 pm Post subject: |
|
|
i got the svn version but i'm really pissed off :
| Quote: |
hli@HLIWORLD /d/game console/psp/src/prxtool$ ./bootstrap
.
sed: -e expression #3, char 19: Unterminated `s' command
/usr/share/aclocal/autoopts.m4:22: warning: underquoted definition of AG_PATH_AUTOOPTS
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automake/automake.html#Extending%20aclocal
configure.ac: installing `./install-sh'
configure.ac: installing `./missing'
Makefile.am: installing `./depcomp'
configure.ac:8: error: possibly undefined macro: AC_PRXTOOL_VERSION
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
|
I'm adding the missing decoding code for the non decoded vfpu instructions. |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 919
|
Posted: Sun Jan 07, 2007 12:22 am Post subject: |
|
|
| As with alot of things related to autoconf/automake it is probably an issue with versions, I have 1.9.5 and 2.59 on my machine. |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 753
|
Posted: Sun Jan 07, 2007 2:50 am Post subject: |
|
|
well, i made a project under VS.Net 2003 and modify some files to make it compile. I'm adding missing VFPU insn decoding.
normally interesting changes are only done in disasm.C (renamed as disasm.cpp) so I expect to give you this file when finished so you can decide how to integrate them in the svn version.
Last edited by hlide on Sun Jan 07, 2007 2:58 am; edited 1 time in total |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 919
|
Posted: Sun Jan 07, 2007 2:53 am Post subject: |
|
|
| Okay, tbh though I have never found the burning desire to finish the VFPU stuff, not many kernel modules actually use vfpu and when they do it is almost always just a saving context kinda thing. However it will be nice to have a finished disasm, you might also want to check that the existing stuff is actually correct as some of it was a quick hack :P |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 753
|
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 919
|
Posted: Sun Jan 07, 2007 7:26 am Post subject: |
|
|
| Great thx, i've committed it to subversion. |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 753
|
Posted: Sun Jan 07, 2007 7:41 am Post subject: |
|
|
| TyRaNiD wrote: | | Great thx, i've committed it to subversion. |
huh... without testing it !?
i hope it can still compile under linux and cygwin.
otherwise, i realise the XML part is not finished and i don't know exactly what we produce exactly as tag. I fear some regression !!! |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 753
|
Posted: Sun Jan 07, 2007 7:48 am Post subject: |
|
|
| oh well i'll try to fix the xml part and deliver a new version - the final one. |
|
| Back to top |
|
 |
hlide
Joined: 10 Sep 2006 Posts: 753
|
|
| Back to top |
|
 |
|