Re: Question regarding debugging with gdb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is the backtrace not helpful in figuring out where to set up breakpoints? As in, “gdb foo”, then “run”, wait for the crash, and type “bt”?

The darktable development documentation suggests[1] the following to log useful backtraces:

   |$ gdb darktable ... crash dt here ... (gdb) set pagination off
   (gdb) set logging file gdb.txt (gdb) set logging on (gdb) thread
   apply all bt full|

If you need to do this non-interactively, you can combine it with gdb’s batch mode. Strangely, I have a spec file that demonstrates this [2]. The debugbreak package is a header-only C library that implements programmatic breakpoints, so the natural way to test it is with the debugger.

Hopefully some of that is helpful.

– Ben

[1] https://www.darktable.org/development/

[2] https://src.fedoraproject.org/rpms/debugbreak/blob/e009ccfac2b8e05a6018921ed6d3e732837a9e52/f/debugbreak.spec#_62

On 12/28/21 08:08, JT wrote:
Hey all,
I havent used gdb in a while, so I'm trying to knock the rust off my knowledge and pick up a few more skills. I'm trying to track down an issue in the Lumina Desktop. One of the utilities (lumina-screenshot) segfaults when starting up and I'm trying to deduce why.  The problem is that it gets pretty far into the program starting before it finally dies and I havent been able to step through gdb enough manually to find that point.

Is there a way to run gdb in a capture mode of some kind and dump the output entirely like I can do with strace? I kinda need to know where it's crashing to have an idea of where to set up breakpoints.

Unless my memory is off, I was sure there was a way to do this but I just can't seem to remember or figure out how to do it.

Any pointers?  Thanks!

JT

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux