keiths / rpms / gdb

Forked from rpms/gdb a day ago
Clone
4b781db
commit f19ba6e3238e359f2c147d080f7364fd667d202d
4b781db
Author: Jan Kratochvil <jkratoch@host1.dyn.jankratochvil.net>
4b781db
Date:   Sat Aug 1 14:52:19 2009 +0200
4b781db
4b781db
    Fix crash with archer-tromey-python vs. FSF GDB HEAD.
4b781db
    
4b781db
    Crashing at least on gdb.server/server-run.exp .
4b781db
    
4b781db
    +  /* FIXME: Workaround archer-tromey-python crash in
4b781db
    +     add_inferior_object->get_current_arch on FSF GDB update:
4b781db
    +     is_thread_state would assertion check here as
4b781db
    +     remote_start_remote->add_inferior_silent->observer_notify_new_inferior is
4b781db
    +     before remote_start_remote->add_thread_silent.  */
4b781db
    
4b781db
    	* frame.c (has_stack_frames): Safely return 0 if INFERIOR_PTID
4b781db
    	currently has no associated thread.
4b781db
4b781db
Running ../../../gdb/testsuite/gdb.mi/mi-file-transfer.exp ...
4b781db
Executing on host: gcc ../../../gdb/testsuite/gdb.mi/basics.c  -g  -lm   -m32 -o /home/jkratoch/hammock/20090802Build-fedora11/fedora-11-x86_64/build/gdb-6.8.50.20090302/build-x86_64-redhat-linux-gnu/gdb/testsuite.unix.-m32/gdb.mi/basics    (timeout = 300)
4b781db
4b781db
~"../../gdb/thread.c:78: internal-error: inferior_thread: Assertion `tp' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nQuit this debugging session? "
4b781db
4b781db
[ Backport for gdb-6.8.50.20090302.  ]
4b781db
4b781db
--- gdb-6.8.50.20090302/gdb/frame.c.orig	2009-08-02 05:15:28.000000000 +0200
4b781db
+++ gdb-6.8.50.20090302/gdb/frame.c	2009-08-02 05:16:59.000000000 +0200
4b781db
@@ -1086,6 +1086,14 @@ has_stack_frames (void)
4b781db
   if (!target_has_registers || !target_has_stack || !target_has_memory)
4b781db
     return 0;
4b781db
 
4b781db
+   /* FIXME: Workaround archer-tromey-python crash in
4b781db
+      add_inferior_object->get_current_arch on FSF GDB update:
4b781db
+      is_thread_state would assertion check here as
4b781db
+      remote_start_remote->add_inferior_silent->observer_notify_new_inferior is
4b781db
+      before remote_start_remote->add_thread_silent.  */
ac0d835
+   if (find_thread_pid (inferior_ptid) == NULL)
4b781db
+     return 0;
4b781db
+ 
4b781db
   /* If the current thread is executing, don't try to read from
4b781db
      it.  */
4b781db
   if (is_executing (inferior_ptid))