Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. MAke GDB Debugger in QT Creator not step into system headers
Forum Updated to NodeBB v4.3 + New Features

MAke GDB Debugger in QT Creator not step into system headers

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 2.1k 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.
  • S Offline
    S Offline
    Sewing
    wrote on 4 Dec 2017, 14:30 last edited by
    #1

    I would like to know whether there is a way, when stepping through source code, to not step into system headers like "unique_ptr " and the likes.

    Rather I would have the debugging session parse only custom written code.

    Is there maybe a property I can set in the IDE in order to end up with this behaviour?

    thanks in advance

    A M 2 Replies Last reply 4 Dec 2017, 16:57
    0
    • S Sewing
      4 Dec 2017, 14:30

      I would like to know whether there is a way, when stepping through source code, to not step into system headers like "unique_ptr " and the likes.

      Rather I would have the debugging session parse only custom written code.

      Is there maybe a property I can set in the IDE in order to end up with this behaviour?

      thanks in advance

      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 4 Dec 2017, 16:57 last edited by
      #2

      @Sewing: IIRC correctly, there is no way.

      I remember having seen a bugreport on bugreports.qt.io talking about the same problem with Qt headers. I think the outcome was that GDB was missing some functionality for this.

      Qt has to stay free or it will die.

      1 Reply Last reply
      1
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 4 Dec 2017, 17:33 last edited by mrjj 12 Apr 2017, 17:59
        #3

        Hi
        You can use the Debugger Log in Creator and ask gdb
        to skip files.
        Sadly, i never found a place to do it permanently but
        it did work in linux if you do it once you are actually debugging.

        https://sourceware.org/gdb/onlinedocs/gdb/Skipping-Over-Functions-and-Files.html

        alt text

        alt text

        I used Command: to make it skip std::vector and friends.
        (never tried in windows. only linux)

        Tips:
        When you are in a file you want to skip, you can get full path if you right click name
        alt text

        Update:
        Visual studio didnt like skip file ( no surprice )
        mingw worked and it seems you can just use "skip file stl_vector.h" and no
        need for full path.

        Just verified it works in linux
        alt text

        A 1 Reply Last reply 4 Dec 2017, 17:46
        2
        • M mrjj
          4 Dec 2017, 17:33

          Hi
          You can use the Debugger Log in Creator and ask gdb
          to skip files.
          Sadly, i never found a place to do it permanently but
          it did work in linux if you do it once you are actually debugging.

          https://sourceware.org/gdb/onlinedocs/gdb/Skipping-Over-Functions-and-Files.html

          alt text

          alt text

          I used Command: to make it skip std::vector and friends.
          (never tried in windows. only linux)

          Tips:
          When you are in a file you want to skip, you can get full path if you right click name
          alt text

          Update:
          Visual studio didnt like skip file ( no surprice )
          mingw worked and it seems you can just use "skip file stl_vector.h" and no
          need for full path.

          Just verified it works in linux
          alt text

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 4 Dec 2017, 17:46 last edited by
          #4

          @mrjj: Cool!

          Qt has to stay free or it will die.

          M 1 Reply Last reply 4 Dec 2017, 17:52
          1
          • A aha_1980
            4 Dec 2017, 17:46

            @mrjj: Cool!

            M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 4 Dec 2017, 17:52 last edited by
            #5

            @aha_1980
            Well it would be a bit cooler if i could make it remember it from debug session to debug session
            but it seems to be no way (i could find for that) :)

            1 Reply Last reply
            0
            • S Sewing
              4 Dec 2017, 14:30

              I would like to know whether there is a way, when stepping through source code, to not step into system headers like "unique_ptr " and the likes.

              Rather I would have the debugging session parse only custom written code.

              Is there maybe a property I can set in the IDE in order to end up with this behaviour?

              thanks in advance

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 4 Dec 2017, 18:18 last edited by mrjj 12 Apr 2017, 18:28
              #6

              @Sewing
              Just as info
              I did try to add it to
              alt text

              and the attach command
              alt text

              But it seems to only accept it once actually DEBUGGING and
              i could not find any place in Creator for that state.
              (the Attach Command seems before actually debugging)

              I then tried the
              GDB init file
              https://sourceware.org/gdb/current/onlinedocs/gdb/gdbinit-man.html

              and add "skip file " to the STOP state
              https://sourceware.org/gdb/current/onlinedocs/gdb/Hooks.html#Hooks
              but i could not get it to work. ( it still went into the files)

              I think it CAN work but ran out of time and didn't dig deeper into the
              various state/sequences

              I found this
              https://xaizek.github.io/2016-05-26/skipping-standard-library-in-gdb/
              But have not tried it yet but it confirmed that gdb init is loaded before
              symbols and hence was ignore.

              1 Reply Last reply
              0

              1/6

              4 Dec 2017, 14:30

              • Login

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