Results 1 to 5 of 5

Thread: [DEBUG] Debug or reverse engineering a QListView or QListBox

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Posts
    4
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X

    Lightbulb [DEBUG] Debug or reverse engineering a QListView or QListBox

    Hello :-)

    I'll be straighforward: A third party application for Mac OS X is programmed with carbon + qt3, and it uses a QListBox -maybe a QListView I don't know for sure, "nm" shows both of them- to display text information in rows.

    PROBLEM
    ---------
    I want to log every row added to the QListView or QListBox in a file. For that, I have three options:


    OPTIONS
    -----------
    1) Use any QT debug tool that might help me to do achieve this. Is there any?

    2) Inject C++ code into te application, using class interposing or method swizzling with DYLD dynamic linking.

    I have already achieve this, being able to intercept standard C++ functions that helped me to get a clear picture of the workarounds of the application, like open(), close(), malloc() and string related functions.

    My question is, what should I interpose?

    - Is there any simple C++ function QString uses to build itself? This would be the best solution because it's low level and no class-interposing is needed. Maybe concatenation functions would be effective as well: the messages I want to intercept are built with concatenation for sure because all of them have the same structure: "Dealer: <message>"

    Regarding QString, I am ready to incercept any function that does not belong to any class. I am browsing QString.h and it uses many functions that are declared outside of the class, like real_detach() and operatorPlusEqHelper(), inserhelper(), etc. Any ideas on this path oriented towards seeing all processed strings would be welcomed. The base for QString is http://doc.qt.nokia.com/qtopia1.6/html/qcstring-h.html and standard C++ string.h functions are used. That seems a good place to start.

    - I am browsing QListView documentation and can't find any addRow or insertRow methods. I do find it in QListBox: if this were the case, I should override QListBox::inserItem(). If not, QListViewItem would be the center of my attention. Which one do you think is it?

    3) Another option would be to recompile completely the QT bundle the application uses from source code, adding my own changes. This is huge and effective but if they added their own touch, it won't work.


    REASONS
    ---------
    I have built a Poker Engine and I want it to retrieve information from the board to guide my playing: the future of it would be creating a bot. The application I want to debug is the following:

    full_tilt_poker_1.jpg

    The chat window in the lower-left displays ALL the information my poker bot needs to work. And it's a QListview or QListBox. The players and actions, folds, bets, my cards, the flop, everything I need is displayed there. I want to log all that activity to a file and make my application parse it to get a clear picture of the game.

    Would you think it is a QListBox or QListView?

    Thanks in advace for your answers!
    Last edited by flaab; 29th September 2010 at 18:04.

Similar Threads

  1. Qt + Linux + Eclipse - debug using debug build?
    By will49 in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2012, 06:27
  2. Reverse engineering tools
    By vvbkumar in forum General Programming
    Replies: 4
    Last Post: 29th September 2010, 17:48
  3. DEBUG macro not defined in debug build using vc++
    By piotr.dobrogost in forum Qt Programming
    Replies: 0
    Last Post: 21st July 2009, 13:07
  4. Reverse engineering of ui-file
    By wallyqt in forum Qt Tools
    Replies: 5
    Last Post: 18th November 2007, 22:11
  5. Replies: 11
    Last Post: 22nd March 2006, 19:06

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.