PHP Bytecode in Binnavi 2.0

November 5th, 2008 | by Stefan Esser |

I just finished porting php2sql 0.1 to the new Binnavi 2.0 database format. php2sql is my still private way to import PHP bytecode into Binnavi for manual analysation and navigation.

Here are some screenshots how the PHP bytecode of FluxBB 1.2.20 looks like in Binnavi.

First screen shows the project overview window. So far 281 PHP functions were identified. This includes those defined within fluxBB, those called in fluxBB and one virtual main function for every PHP file.

The second screenshot shows a part of the native callgraph within FluxBB.

The last screenshot shows a part of the code flow graph (CFG) of the handle_url_tag function defined in FluxBB.

Now that php2sql finally works with Binnavi 2.0 it is time to convert my PHP decompiler and code scanner to Binnavi 2.0 plugins. I will keep you updated.

  1. 5 Responses to “PHP Bytecode in Binnavi 2.0”

  2. By AntonioCS on Nov 6, 2008 | Reply

    That seems really nice! What I use to have some kind of graphic interpretation of my code is Xdebug and WinCachegrind. Too bad wincachegrind isn’t updated anymore :( it is a really nice tool

  3. By malte on Nov 8, 2008 | Reply

    use kcachegrind instead. you can install linux on your box or on a virtualized box then.

  4. By Stefan Esser on Nov 9, 2008 | Reply

    Hi you two…

    What I do has nothing todo with what Xdebug or Cachegrind are doing.

    BTW: If you need an interface for Cachegrind files then bother Bastian Feder and Thomas Weiner of Papaya GmbH. They are working on a very cool web application to visualize these things, but they keep it secret ;))) . Far more advanced than any other web application interpreting cachgrind files.

  5. By till on Nov 14, 2008 | Reply

    I recently discovered Carica CacheGrind, http://ccg.wiki.sourceforge.net/

  6. By shire on Nov 15, 2008 | Reply

    Hey Stefan,

    I’d like to get an interface like this for opcodes, but it looks like the cost of Binnavi is a little prohibitive. Any thoughts on ways to visualize this with other open source tools? Thanks for the interesting post…

    -shire

Post a Comment