Want to Join Us ?

you'll be able to discuss, share and send private messages.

HexRaysCodeXplorer

Discussion in 'Plugins' started by storm shadow, Feb 9, 2014.

Share This Page

  1. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    I could use some help

    I am trying to build HexRaysCodeXplorer https://codeload.github.com/REhints/HexRaysCodeXplorer/zip/master



    i get these error in objectexplorer.cpp

    Code (Text):
    1>InitializeBuildStatus:
    1>  Touching "Debug\HexRaysCodeXplorer.unsuccessfulbuild".
    1>ClCompile:
    1>  ObjectType.cpp
    1>  GraphBuilder.cpp
    1>  CodeXplorer.cpp
    1>  ObjectExplorer.cpp
    1>c:\hexrayscodexplorer-master\sources\hexrayscodexplorer\objectexplorer.cpp(339): error C2065: 'CDVF_STATUSBAR' : undeclared identifier
    1>c:\hexrayscodexplorer-master\sources\hexrayscodexplorer\objectexplorer.cpp(339): error C3861: 'create_code_viewer': identifier not found
    1>c:\hexrayscodexplorer-master\sources\hexrayscodexplorer\objectexplorer.cpp(366): error C2065: 'FORM_CLOSE_LATER' : undeclared identifier
    1>c:\hexrayscodexplorer-master\sources\hexrayscodexplorer\objectexplorer.cpp(480): error C2065: 'CDVF_STATUSBAR' : undeclared identifier
    1>c:\hexrayscodexplorer-master\sources\hexrayscodexplorer\objectexplorer.cpp(480): error C3861: 'create_code_viewer': identifier not found
    1>  Generating Code...
    1>
    1>Build FAILED.
     
    if i quote those out i build corrict but only the display graph wotks in ida pro.
    Still i would like to get the rest to work

    my build
     

    Attached Files:

    Rip Cord and computerline like this.
  2. computerline

    Well-Known Member Ida Pro Expert

    I'll upload my code :)

    Code (Text):
    https://mega.co.nz/#!UMtjgRpC!Q7CwIKx1DdavamZe5uDJGMvKCXWmYbduBJN6hfbgYEE
     
    Rip Cord and storm shadow like this.
  3. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    the Psuode code callgraph work :) but not the other two

    [​IMG]
     
  4. computerline

    Well-Known Member Ida Pro Expert

    code viewer is another control only support in IDA 6.2 and above :), we can replace it with other control
     
    storm shadow likes this.
  5. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    worksvery nice
    My build crashed when using object code this works better.
     
    computerline likes this.
  6. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    is it coded into idag.exe ?
     
  7. computerline

    Well-Known Member Ida Pro Expert

    It seem in ida.wll, code view is a control to display color code, it added in IDA 6.2, we can write similar control using Qt, But it will take time :)

    Code (Text):
    http://www.hexblog.com/?p=536
     
  8. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    hehe maybe we can make an spesial build off ida 6.1 portet to 6.4/6.5
    I found out that if i use http://www.angusj.com/resourcehacker/

    right click idag.exe

    goto Version Info>1>1033

    replacetext with

    Code (Text):
    1 VERSIONINFO
    FILEVERSION 6,4,13,322
    PRODUCTVERSION 6,4,13,322
    FILEOS 0x4
    FILETYPE 0x1
    {
    BLOCK "StringFileInfo"
    {
        BLOCK "040904e4"
        {
            VALUE "CompanyName", "Hex-Rays SA"
            VALUE "FileDescription", "The Interactive Disassembler"
            VALUE "FileVersion", "6.4.13.0322"
            VALUE "InternalName", "The Interactive Disassembler"
            VALUE "LegalCopyright", "Hex-Rays SA"
            VALUE "OriginalFilename", "idaq.exe"
            VALUE "ProductName", "The Interactive Disassembler"
            VALUE "ProductVersion", "6.4.13.0322"
        }
    }
     
    BLOCK "VarFileInfo"
    {
     
    press compile and save.

    then take all the stuff from ida 6.1 and copy to demo folder.
    ida now thinks its version 6.5 and almost everything works also the dwarf plugin that got shipped with 6.2 +
     
    Rip Cord likes this.
  9. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    [​IMG]

    [​IMG] :jimlad.png:
     
    computerline likes this.
  10. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    use ida.wll from the demo :)
     
  11. computerline

    Well-Known Member Ida Pro Expert

    Interesting :D, I'll try !
     
  12. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    just starts in the small take loaders from ida 6.1 then prossersers
    dont overwrite anything
    also use ida.wll and ida.hlp from demo important

    you can use innoextractor http://www.havysoft.cl/innoextractor.html to extract demo
    idaq.exe can be an bitch to recompile you can edit version with pe explore.
    and on idag.exe use resource hacker :)
     
    computerline likes this.
  13. computerline

    Well-Known Member Ida Pro Expert

    It still think it demo version, so, some function will not work :)

    [​IMG]
     
  14. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    wierd my version loads all maybe over write everything exept in ida root folder but overwrite plugin /loaders etc plugins
     
    computerline likes this.
  15. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    lol not sure what i did but object viewer works now

    [​IMG]
     
  16. computerline

    Well-Known Member Ida Pro Expert

    In my source I had fix this, So it work
    [​IMG]
    But as you see, It load 2 custom control in once Tform, it's a error. you can see in code
    Code (Text):

    void object_explorer_form_init()
    {
      HWND hwnd = NULL;
      TForm *form = create_tform("Object Explorer", &hwnd);
      if ( hwnd == NULL )
      {
        warning("Object Explorer window already open. Switching to it.");
        form = find_tform("Object Explorer");
        if ( form != NULL )
          switchto_tform(form, true);
        msg ("TForm Already Open !\n");
        return;
      }
      msg("TForm not open !\n");
      object_explorer_info_t *si = new object_explorer_info_t(form);
     
      qvector <qstring>::iterator vtbl_iter;
      for ( vtbl_iter = vtbl_list.begin(); vtbl_iter != vtbl_list.end(); vtbl_iter++ )
        si->sv.push_back(simpleline_t(*vtbl_iter));
     
      simpleline_place_t s1;
      simpleline_place_t s2(si->sv.size()-1);
      /* C2065 */
      //si->cv = create_custom_viewer("", NULL, &s1, &s2, &s1, 0, &si->sv);
      //si->codeview = create_code_viewer(form, si->cv, CDVF_STATUSBAR);
      si->cv = create_custom_viewer("", (TWinControl *)form, &s1, &s2, &s1, 0, &si->sv);
      /* C2065 */
      set_custom_viewer_handlers(si->cv, ct_object_explorer_keyboard, ct_object_explorer_popup, ct_object_explorer_click, NULL, NULL, si);
      hook_to_notification_point(HT_UI, ui_object_explorer_callback, si);
      open_tform(form, FORM_TAB|FORM_MENU|FORM_RESTORE);
    }
     
    We need run this only once time, so we check if it open then we switch to it, but this check does not work, any suggesion to fix that ?

    P/S : I checked in idaw (for Win32) it work, but in idaq (for Qt) it not work :p

    It now fix :

    Code (Text):

    ...........
    void object_explorer_form_init()
    {
    HWND hwnd = NULL;  
    TForm *form = find_tform("Object Explorer");
    if ( form != NULL )
    {
    warning("Object Explorer window already open. Switching to it.");
    switchto_tform(form, true);
    return;
    }
    form = create_tform("Object Explorer", &hwnd);
    .............
     
     
    Rip Cord and storm shadow like this.
  17. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    hehe thats why. i just build it:D

    Ok gonna check , could be its only a path varible issue also.
     
  18. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    did you go any further an the "spesial port of ida" mine is working like an charm.
     
    computerline likes this.
  19. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    works on idaq here try set your varibles for qt include folder and edit ida.cfg
    edit line under
    Built-in C parser parameters
    to correct path to VC(your version)
    Mine is
    Code (Text):
    //-------------------------------------------------------------------------
    //      Built-in C parser parameters
    //-------------------------------------------------------------------------
     
    // The current settings are for the VC++
     
    // List of include directories separated by ';'
    // This list must end by a semicolon (outside the quotes)
    C_HEADER_PATH          = "/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include";
    Sorry the idag works not the idag !! i have to read on the code
     
    computerline likes this.
  20. storm shadow

    Techbliss Owner Admin Ida Pro Expert Developer

    wierd if you open in idag save and open in idaq it works could be a bug in version 6.1 ?
     
    Rip Cord likes this.
Top