rpms/gdb/devel gdb-6.6-upstream.patch,1.8,1.9 gdb.spec,1.250,1.251
Jan Kratochvil (jkratoch)
fedora-extras-commits at redhat.com
Fri Oct 12 09:20:10 UTC 2007
- Previous message (by thread): rpms/gdb/F-8 gdb-6.6-upstream.patch,1.8,1.9 gdb.spec,1.249,1.250
- Next message (by thread): rpms/superiotool/EL-4 .cvsignore, 1.3, 1.4 sources, 1.3, 1.4 superiotool-version_fix.diff, 1.2, 1.3 superiotool.spec, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jkratoch
Update of /cvs/pkgs/rpms/gdb/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9070
Modified Files:
gdb-6.6-upstream.patch gdb.spec
Log Message:
* Fri Oct 12 2007 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.6-34
- Fix gdbserver for threaded applications and recent glibc (BZ 328021).
gdb-6.6-upstream.patch:
Index: gdb-6.6-upstream.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.6-upstream.patch,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- gdb-6.6-upstream.patch 22 Sep 2007 15:56:10 -0000 1.8
+++ gdb-6.6-upstream.patch 12 Oct 2007 09:20:08 -0000 1.9
@@ -1163,3 +1163,84 @@
:
else
MAKEINFO="$MISSING makeinfo"
+
+
+
+https://bugzilla.redhat.com/show_bug.cgi?id=328021
+
+2007-06-27 Daniel Jacobowitz <dan at codesourcery.com>
+
+ * thread-db.c (thread_db_find_new_threads): Add prototype.
+ (thread_db_create_event): Check for the main thread before adding
+ a new thread.
+ (maybe_attach_thread): Only enable event reporting if TID == 0.
+ (thread_db_get_tls_address): Check for new threads.
+
+--- ./gdb/gdbserver/thread-db.c 9 Jan 2007 17:59:08 -0000 1.9
++++ ./gdb/gdbserver/thread-db.c 27 Jun 2007 11:52:02 -0000 1.10
+@@ -41,6 +41,7 @@ static struct ps_prochandle proc_handle;
+ /* Connection to the libthread_db library. */
+ static td_thragent_t *thread_agent;
+
++static void thread_db_find_new_threads (void);
+ static int find_new_threads_callback (const td_thrhandle_t *th_p, void *data);
+
+ static char *
+@@ -135,6 +136,8 @@ thread_db_create_event (CORE_ADDR where)
+ td_event_msg_t msg;
+ td_err_e err;
+ struct inferior_linux_data *tdata;
++ struct thread_info *inferior;
++ struct process_info *process;
+
+ if (debug_threads)
+ fprintf (stderr, "Thread creation event.\n");
+@@ -150,6 +153,14 @@ thread_db_create_event (CORE_ADDR where)
+ fprintf (stderr, "thread getmsg err: %s\n",
+ thread_db_err_str (err));
+
++ /* If we do not know about the main thread yet, this would be a good time to
++ find it. We need to do this to pick up the main thread before any newly
++ created threads. */
++ inferior = (struct thread_info *) all_threads.head;
++ process = get_thread_process (inferior);
++ if (process->thread_known == 0)
++ thread_db_find_new_threads ();
++
+ /* msg.event == TD_EVENT_CREATE */
+
+ find_new_threads_callback (msg.th_p, NULL);
+@@ -232,8 +243,24 @@ maybe_attach_thread (const td_thrhandle_
+ {
+ inferior = (struct thread_info *) all_threads.head;
+ process = get_thread_process (inferior);
++
+ if (process->thread_known == 0)
+ {
++ /* If the new thread ID is zero, a final thread ID will be
++ available later. Do not enable thread debugging yet. */
++ if (ti_p->ti_tid == 0)
++ {
++ err = td_thr_event_enable (th_p, 1);
++ if (err != TD_OK)
++ error ("Cannot enable thread event reporting for %d: %s",
++ ti_p->ti_lid, thread_db_err_str (err));
++ return;
++ }
++
++ if (process->lwpid != ti_p->ti_lid)
++ fatal ("PID mismatch! Expected %ld, got %ld",
++ (long) process->lwpid, (long) ti_p->ti_lid);
++
+ /* Switch to indexing the threads list by TID. */
+ change_inferior_id (&all_threads, ti_p->ti_tid);
+ goto found;
+@@ -332,6 +359,8 @@ thread_db_get_tls_address (struct thread
+
+ process = get_thread_process (thread);
+ if (!process->thread_known)
++ thread_db_find_new_threads ();
++ if (!process->thread_known)
+ return TD_NOTHR;
+
+ /* Note the cast through uintptr_t: this interface only works if
Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.250
retrieving revision 1.251
diff -u -r1.250 -r1.251
--- gdb.spec 9 Oct 2007 17:05:59 -0000 1.250
+++ gdb.spec 12 Oct 2007 09:20:08 -0000 1.251
@@ -11,7 +11,7 @@
Version: 6.6
# The release always contains a leading reserved number, start it at 1.
-Release: 33%{?dist}
+Release: 34%{?dist}
License: GPL
Group: Development/Debuggers
@@ -697,6 +697,9 @@
# don't include the files in include, they are part of binutils
%changelog
+* Fri Oct 12 2007 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.6-34
+- Fix gdbserver for threaded applications and recent glibc (BZ 328021).
+
* Tue Oct 9 2007 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.6-33
- Fix debug load for sparse assembler files (such as vDSO32 for i386-on-x86_64).
- Previous message (by thread): rpms/gdb/F-8 gdb-6.6-upstream.patch,1.8,1.9 gdb.spec,1.249,1.250
- Next message (by thread): rpms/superiotool/EL-4 .cvsignore, 1.3, 1.4 sources, 1.3, 1.4 superiotool-version_fix.diff, 1.2, 1.3 superiotool.spec, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list