Can I view other tasks in gdb?
-
- Posts: 17
- Joined: Wed May 02, 2018 4:26 pm
Can I view other tasks in gdb?
Debugging with the gdb stub is very useful. But I can only see the thread/task that crashed, not any others -- `info threads` only shows that thread. I'm trying to debug a problem where a thread is hung inside system code (`select`), and while I can easily make another task force an exception and drop into gdb, I don't know how to find or inspect the task that's hung. Is there any way to do this?
-
- Posts: 17
- Joined: Wed May 02, 2018 4:26 pm
Re: Can I view other tasks in gdb?
Of course, right after asking I found a (partial) answer. I can configure the program to log a core-dump when it crashes, and then read that dump into gdb. Then I can use the `info thread` and `thread` commands to view and switch to different threads/tasks. It even shows what the parameters and local variables were, for the most part.
And sure enough, once I dug around through the thread calling `select`, I found that the problem is that I hadn't initialized the `fd_count` parameter properly, so it sometimes had a very large garbage value, and it took lwIP a long, long time to loop through that many fds.
And sure enough, once I dug around through the thread calling `select`, I found that the problem is that I hadn't initialized the `fd_count` parameter properly, so it sometimes had a very large garbage value, and it took lwIP a long, long time to loop through that many fds.
Who is online
Users browsing this forum: Google [Bot] and 58 guests