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. Generic advice: capture core dump
Forum Updated to NodeBB v4.3 + New Features

Generic advice: capture core dump

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 8.8k Views 1 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.
  • R Offline
    R Offline
    ronM71
    wrote on last edited by
    #1

    Ideally, when/if my Qt app crashes, I'd like to be able to "eject" a core-dump that will allow me to take that dump (e.g. user e-mails support), put it on a machine with the source code and do some 'forensics' on what occurred at the time of the crash. Sort of like Visual studio and its dmp files.

    Any ideas/pointers on how I do this on a C++ Qt app that'll be targeting Win32, OSX and Ubuntu?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      I think,

      thins is more platform and compiler dependent that Qt dependent. Getting the call stack on windows can (afaik) be done with win32 API calls for MSDEV builds. how to do it with mingw? I don't know. and it will be different for other platforms and tool chains.

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • F Offline
        F Offline
        florent.revelut
        wrote on last edited by
        #3

        I think you coudld have a look at breakpad:"https://code.google.com/p/google-breakpad/".
        From what I know, it's cross-platform, allows easy reporting and does part of the tricky work for you (like reading map file and crash report to give you an human readable format).

        I planned to use it personnally with Qt but it was thrown out of my roadmap, so can't give actual feedback

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          ZapB
          wrote on last edited by
          #4

          Take a look at Dr Konqi that ships with KDE.

          Nokia Certified Qt Specialist
          Interested in hearing about Qt related work

          1 Reply Last reply
          0
          • ? This user is from outside of this forum
            ? This user is from outside of this forum
            Guest
            wrote on last edited by
            #5

            Ubuntu idea:
            ulimit -c unlimited (to allow writing core files)
            ulimit -a (to check status of previous, -c, operation)
            gdb <corefilename> (+ man gdb, to explore the resulting data)

            C idea: (Ubuntu & OSX approved)
            http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/backtrace.3.html (code snippet for printing the call stack... provided it's not been smashed... yet XD)

            --

            1 Reply Last reply
            0
            • F Offline
              F Offline
              florent.revelut
              wrote on last edited by
              #6

              The only way to be portable amongst Mac / linux / windows is to rely on 3rd party : otherwise, you'll end up writting #ifdef code everywhere (and breakpad is definitely a good idea)

              1 Reply Last reply
              0

              • Login

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