[minicoredumper] [PATCH 2/3] find_pthreads_cb: Call td_thr_get_info on the thread

Simon Marchi simon.marchi at ericsson.com
Tue Oct 13 19:54:15 CEST 2015


Call td_thr_get_info on each thread, in order to dump the metadata
associated with that thread.  Doing so saves a bit more info about each
thread, which gdb uses.

Signed-off-by: Simon Marchi <simon.marchi at ericsson.com>
---
 src/minicoredumper/corestripper.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/minicoredumper/corestripper.c b/src/minicoredumper/corestripper.c
index 19117b5..3fb3cd3 100644
--- a/src/minicoredumper/corestripper.c
+++ b/src/minicoredumper/corestripper.c
@@ -2694,7 +2694,11 @@ ps_err_e ps_pglobal_lookup(struct ps_prochandle *ph, const char *object_name,
 
 static int find_pthreads_cb(const td_thrhandle_t *th, void *cb_data)
 {
-	/* NOP */
+	/* Get thread info, in order to access (and dump) data that
+	   gdb/libthread_db needs.  */
+	td_thrinfo_t thinfo;
+	td_thr_get_info (th, &thinfo);
+
 	return TD_OK;
 }
 
-- 
2.5.1





More information about the minicoredumper mailing list