Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Debugging external application & showing C++ code, not assembly

    Tools
    debugging debug qt creator gdb gdbengine gcc
    1
    2
    2853
    Loading More Posts
    • 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.
    • Geremia
      Geremia last edited by

      Whenever I debug an external application compiled with gcc's -g or -ggdb flag, using Debug → Start Debugging → Start and Debug External Application… in Qt Creator, it shows the assembly code in a "Dissembler (raise)" pane, not the C++ code. If I click a break-point, a dialog box pops up saying, if e.g. my source file is called "main.cc": «Cannot open "main":0 for reading: No such file or directory.»

      How can I get the GDB debugger in Qt Creator to show the C++ code corresponding to my break-points, not the assembly?

      Is this a matter of a missing "marker file"? If so, how do I explicitly tell GDB where my C++ source file is?

      1 Reply Last reply Reply Quote 0
      • Geremia
        Geremia last edited by Geremia

        It was because I was in instruction-wise operation mode. Unchecking Debug → Operate By Instruction solved my problem.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post