PRXTool HTML disassembly

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

PRXTool HTML disassembly

Post by TyRaNiD »

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.
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

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 ?
FreePlay
Posts: 71
Joined: Wed Jan 04, 2006 6:53 pm
Location: Schenectady, New York, USA

Post by FreePlay »

Ooh, very nice :) Should be of great use to me as I re-teach myself MIPS and learn how to apply it here.
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

thanks Ty!!!!!
I LOVE YOU XDDDDDDDD
zshadow
Posts: 42
Joined: Mon Dec 26, 2005 5:36 am

Post by zshadow »

nice work!

:)
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

oh well, there is a bemol :((((

Code: Select all

	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.
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

i got the svn version but i'm really pissed off :
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/auto ... %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.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

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.
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

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.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

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
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

ok i think prxtool can decode all vfpu instructions.

http://hlide.free.fr/download/PSP/prxtool/disasm.cpp
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Great thx, i've committed it to subversion.
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

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 !!!
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

oh well i'll try to fix the xml part and deliver a new version - the final one.
hlide
Posts: 739
Joined: Sun Sep 10, 2006 2:31 am

Post by hlide »

ok i fix the xml part so the xml output should be okay too (at least i hope so because i didn't test it in xml output).

http://hlide.free.fr/download/PSP/prxtool/disasm.cpp
Post Reply