From 909aec10fe871c86655e4f0452e2479f9240e4f4 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 8 Nov 2004 03:31:41 +0000 Subject: A patch included in glibc 2.3.2's libthread_db that helps remote debugging not become confused, --- libpthread/linuxthreads_db/td_ta_new.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libpthread') diff --git a/libpthread/linuxthreads_db/td_ta_new.c b/libpthread/linuxthreads_db/td_ta_new.c index f19798b71..9bf926719 100644 --- a/libpthread/linuxthreads_db/td_ta_new.c +++ b/libpthread/linuxthreads_db/td_ta_new.c @@ -126,6 +126,10 @@ td_ta_new (struct ps_prochandle *ps, td_thragent_t **ta) { if (ps_pdread (ps, addr, &(*ta)->sizeof_descr, sizeof (int)) != PS_OK) goto free_return; + /* Don't let bogons in the inferior make us mess ourselves. */ + if ((*ta)->sizeof_descr > sizeof (struct _pthread_descr_struct)) + (*ta)->sizeof_descr = sizeof (struct _pthread_descr_struct); + } /* Now add the new agent descriptor to the list. */ -- cgit v1.2.3