Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. gdbbridge.py in native gdb fails
Forum Updated to NodeBB v4.3 + New Features

gdbbridge.py in native gdb fails

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 860 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ryan0270
    wrote on last edited by
    #1

    I'm trying to use the qtcreator extensions in native gdb. According to this page I should be able to just add the appropriate commands to my .gdbinit and I should have the "pp" command available. I do get that command but it always fails. For example, which a break at line 128 in the below it claims that "app" is undefined but it clearly is. I get the same error message for any variable I try to print.

    Does anyone know what's wrong?

    (gdb) list
    123	    QApplication::setAttribute(Qt::AA_X11InitThreads);
    124	#ifdef Q_OS_MAC
    125	    QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
    126	#endif
    127	    QApplication app(argc, argv);
    128	    setGlobalFont(app); // BREAK IS HERE
    129	
    130	    QFile styleSheetFile(":/theme/rdsTheme.qs");
    131	    if (styleSheetFile.open(QFile::ReadOnly))
    132	    {
    (gdb) pp app
    Python Exception <class 'NameError'> name 'app' is not defined: 
    Error occurred in Python command: name 'app' is not defined
    

    For reference, here's my .gdbinit:

    python
    import sys
    sys.path.insert(0, '/home/me/Software/gdb_printers/python')
    sys.path.insert(1, '/usr/share/qtcreator/debugger/')
    
    from libstdcxx.v6.printers import register_libstdcxx_printers
    register_libstdcxx_printers (None)
    
    from gdbbridge import *
    
    end
    
    1 Reply Last reply
    0
    • F Offline
      F Offline
      Fubulous
      wrote on last edited by
      #2

      Did you have any luck with this?

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved