Unsolved MAke GDB Debugger in QT Creator not step into system headers
-
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
-
@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.
-
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
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
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
-
@mrjj: Cool!
-
@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) :) -
@Sewing
Just as info
I did try to add it to
and the attach command
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.htmland 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/sequencesI 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.