Announcement

Collapse
No announcement yet.

Best program to use gdb to the fullest

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Best program to use gdb to the fullest

    Since I've started working on my own project, HiddenChest game engine, I've been dealing with some weird issues. Sometimes setting CMake to build a Debug release helps me a little bit to find bugs in my C++ and CRuby code but that's not always true. In many cases I can only see ?? characters preceded by hexadecimal numbers and followed by libraries that I don't touch directly at all. Using run and where commands in gdb didn't prove to be as useful as I wanted so what else can I do to easily get access to the information I need to speed up my app's debugging process?
    Multibooting: Kubuntu Noble 24.04
    Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
    Win XP, 7 & 10 sadly
    Using Linux since June, 2008

    #2
    This site may or may not be of help ...
    https://fedoraproject.org/wiki/KDE/D..._F26.2C_F27.29
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Originally posted by kyonides View Post
      ... In many cases I can only see ?? characters preceded by hexadecimal numbers and followed by libraries that I don't touch directly at all...
      That happens when execution goes into non-debug, stripped versions of libraries. It can help to install -dev packages. But, if you really need debugger help in those libraries, for example to find out what was wrong with something you passed in to them, you need to build debug versions of them, and that can be a mission.
      Using... gdb didn't prove to be as useful...
      I have liked kdbg in the past. I'm not sure how good it would be with CRuby, but it would be a step up from raw gdb. It's a bit old now, and I'm not sure if it understands the newer C++ features.

      [edit]Just found that there was a new release of kdbg "11 days ago", which suggests it is quite active. Also, if you are keen on vim (if not, I think you should be, but I'm a fanboy), it now has features that plug-in authors can use for debugging support; such a plug-in is Vimspector, which I might check out one day.
      Last edited by jlittle; Jan 11, 2020, 06:05 PM. Reason: add findings
      Regards, John Little

      Comment


        #4
        Originally posted by jlittle View Post
        ....
        I have liked kdbg in the past. I'm not sure how good it would be with CRuby, but it would be a step up from raw gdb. It's a bit old now, and I'm not sure if it understands the newer C++ features.

        [edit]Just found that there was a new release of kdbg "11 days ago", which suggests it is quite active. Also, if you are keen on vim (if not, I think you should be, but I'm a fanboy), it now has features that plug-in authors can use for debugging support; such a plug-in is Vimspector, which I might check out one day.
        I used Kgdb exclusively before I retired to debug Qt software. It worked flawlessly. I was surprised to see that it is no longer in the repository!
        Anyway, it can be found here: https://github.com/j6t/kdbg
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          Well, yeah, I noticed I had to include as much debug stuff in my libraries and application but even so I noticed there are several ?? entries left behind... :S Sadly I can't say I can get dbg packages for what I'm looking for because I've only found some packages for rubygems (Ruby's extensions libraries) not Ruby / CRuby itself.

          I could easily install kdbg on Bionic, I'll see if it helps me somewhat.

          Curiously I've gotta say my application is GTK and Qt agnostic for I only need CMake and g++ to compile it. OK, I also included SDL2, but that part is not causing any issues here last time I've checked.

          Who doesn't hate when a bug refuses to be killed with some insecticide spray? XD

          I gotta say it's an unusual finding, GG. I'll keep it to further inspect its contents. Thank you for the heads up.
          Multibooting: Kubuntu Noble 24.04
          Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
          Win XP, 7 & 10 sadly
          Using Linux since June, 2008

          Comment


            #6
            I just had cause to fire up kdbg to investigate a crash, and ... no kdbg. It is not packaged for 19.10; it was for 19.04.

            Can anyone explain why? If I really wanted to, what would be the best way to get it?
            Regards, John Little

            Comment


              #7
              Originally posted by jlittle View Post
              Can anyone explain why?
              The kdbg in debian/ubuntu is/was qt4/kde4 so it got removed because of the qt4 purge.

              Don't know if there exists a kf5/qt5 port (or plans for such)
              EDIT: the 3.0 version should be kf5 http://www.kdbg.org/#download
              Last edited by kubicle; Mar 11, 2020, 04:30 AM.

              Comment

              Working...
              X