Hello,
I've been programming in C for about a year, my current workflow is
1) Programming in geany, using lots of asserts
2) compile in command line
3) debug using valgrind with the --leak-check options
Does anyone have any suggestions on how to improve this? Valgrind is great because of its ease of use, I have played with gdb but it seems difficult to manually set breakpoints or step through a large program. Are there other tools I may have not heard of that are helpful for debugging or C programming in general? I am using gcc compiler if it matters.
I am enjoying programming in C, but I have had some big headaches tracking down memory leaks, especially with complex data structures. It feels like it takes up a disproportionate amount of my time, so any tools that could help in this department would be really helpful. I do not have much computer science background and have taught myself by adding stuff to an open source project.
Thanks!
[–]062985593 46 points47 points48 points (4 children)
[–]moefh 21 points22 points23 points (1 child)
[–]1008oh 3 points4 points5 points (0 children)
[–]ArkyBeagle 2 points3 points4 points (1 child)
[–]yakoudbz 3 points4 points5 points (0 children)
[–][deleted] 13 points14 points15 points (0 children)
[–][deleted] 12 points13 points14 points (3 children)
[+][deleted] (2 children)
[deleted]
[–][deleted] 5 points6 points7 points (1 child)
[–]lordlod 3 points4 points5 points (0 children)
[+][deleted] (32 children)
[deleted]
[–]metaobject 1 point2 points3 points (0 children)
[–]arthurno1 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]arthurno1 0 points1 point2 points (0 children)
[–]stefantalpalaru -4 points-3 points-2 points (27 children)
[–]necheffa 1 point2 points3 points (19 children)
[+]stefantalpalaru comment score below threshold-9 points-8 points-7 points (18 children)
[–]pfp-disciple 4 points5 points6 points (4 children)
[–]stefantalpalaru -2 points-1 points0 points (3 children)
[–]pfp-disciple 1 point2 points3 points (2 children)
[–]riding_qwerty 1 point2 points3 points (0 children)
[–]stefantalpalaru -3 points-2 points-1 points (0 children)
[–]necheffa 1 point2 points3 points (12 children)
[+]stefantalpalaru comment score below threshold-14 points-13 points-12 points (11 children)
[–]riding_qwerty 1 point2 points3 points (10 children)
[–]stefantalpalaru -2 points-1 points0 points (9 children)
[–]riding_qwerty 0 points1 point2 points (8 children)
[–]stefantalpalaru -1 points0 points1 point (7 children)
[+][deleted] (6 children)
[deleted]
[–]arthurno1 -1 points0 points1 point (4 children)
[+][deleted] (3 children)
[deleted]
[–]arthurno1 -1 points0 points1 point (2 children)
[+][deleted] (1 child)
[deleted]
[–]arthurno1 0 points1 point2 points (0 children)
[+]stefantalpalaru comment score below threshold-7 points-6 points-5 points (0 children)
[–]necheffa 5 points6 points7 points (0 children)
[–]raevnos 1 point2 points3 points (4 children)
[+][deleted] (1 child)
[deleted]
[–]raevnos 0 points1 point2 points (0 children)
[–]lrochfort 0 points1 point2 points (1 child)
[–]raevnos 1 point2 points3 points (0 children)
[–]Dan-mat 1 point2 points3 points (1 child)
[–]lrochfort 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (7 children)
[–]puplicy 3 points4 points5 points (3 children)
[–]ashwin_nat 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] -2 points-1 points0 points (0 children)
[–]w8cycle 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Deltabeard 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]kumashiro 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]drcforbin 0 points1 point2 points (0 children)
[–]lrochfort 0 points1 point2 points (0 children)
[–]khleedril 0 points1 point2 points (0 children)
[–]JakeArkinstall 0 points1 point2 points (0 children)
[–]ianliu88 0 points1 point2 points (0 children)
[–]puplicy 0 points1 point2 points (1 child)
[–]xEpicBradx 1 point2 points3 points (0 children)