Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-3010

Setting a breakpoint in a file which has an identical filename as another class doesn't set the breakpoint correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 2.0.1
    • Debugger
    • None
    • Linux 64-bit

    Description

      In the code I'm working on, two different classes have the same .cpp and
      .h files, which admittedly is bad, but there's nothing I can do about that.

      GDB through QtCreator 2.01 (Linux 64) is setting breakpoints in the
      wrong file, and I'm guessing it's because it's having trouble
      differentiating them.

      I've ticked the "Use full path information to set breakpoints" checkbox
      in the Gdb tab of the Debugger Options window, but that doesn't make any
      difference.

      I've also noticed that the right-click menu for breakpoints in the
      debugger has a "Use full path" option, but this just seems to put "/../"
      in front of the file which doesn't look correct?

      Is this the only way to view the full paths in QtCreator for breakpoints
      and if so is it broken, or am I doing something wrong?

      I've tried with QtCreator 2.1 beta1, and it also doesn't work, although now breakpoints get changed at runtime to the function: "__static_initialization_and_destruction_0(int, int)"

      Using GDB 7.2 built from source.

      I've included an example project showing the setup, but I can't get it to build as QMake can't seem to resolve the dependencies properly, so I'm not sure how helpful it will be - I'm using SCons on a big project, which has lots of subprojects, which are selectively built as needed, so dependencies aren't really an issue.

      I'm trying to set a breakpoint in the colourlookup.cpp file in the Plugins directory, but the breakpoint is getting set (in 2.01, but not in 2.1) in the one in the main directory.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              hjk hjk
              ppearson Peter Pearson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes