From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31976 invoked by alias); 11 Jan 2010 20:54:53 -0000 Received: (qmail 31960 invoked by uid 22791); 11 Jan 2010 20:54:52 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Jan 2010 20:54:42 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0BKse5F013665 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 11 Jan 2010 15:54:41 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0BKsU1T013390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 11 Jan 2010 15:54:39 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id o0BKsRX2031672; Mon, 11 Jan 2010 21:54:27 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id o0BKsLoG031669; Mon, 11 Jan 2010 21:54:21 +0100 Date: Mon, 11 Jan 2010 20:54:00 -0000 From: Jan Kratochvil To: Michael Snyder Cc: Sean Soria , "gdb@sourceware.org" Subject: Re: Reverse Debugging Headaches Message-ID: <20100111205421.GA31228@host0.dyn.jankratochvil.net> References: <4B4B7231.6010001@vmware.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline In-Reply-To: <4B4B7231.6010001@vmware.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-01/txt/msg00118.txt.bz2 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 2845 On Mon, 11 Jan 2010 19:47:13 +0100, Michael Snyder wrote: > Sean Soria wrote: > >Whenever I try to reverse debug I break into the program, set target > >record and then continue. I immediately hit some sort of simd > >instruction (in things like strlen in libc) or unsupported ioctl call. > > Is there any way around these issues? > > Shouldn't happen. What version gdb? What linux? gdb 7.0.50.20100111-cvs Fedora 12: kernel-2.6.32.1-9.fc13.x86_64 -> x86_64 gdb -> x86_64 inferior: (gdb) start Temporary breakpoint 1 at 0x400640: file threadit.c, line 40. Starting program: /home/jkratoch/t/threadit [Thread debugging using libthread_db enabled] Temporary breakpoint 1, main () at threadit.c:40 40 i = pthread_create (&thread1, NULL, start, NULL); /* create1 */ (gdb) record (gdb) c Continuing. warning: Process record ignores the memory change of instruction at address 0x362de0db46 because it can't get the value of the segment register. [...] warning: Process record ignores the memory change of instruction at address 0x362e274d46 because it can't get the value of the segment register. Process record doesn't support instruction 0xf6e at address 0x362e281a32. Process record: failed to record execution log. [Thread 0x7ffff7fe3700 (LWP 26985)] #1 stopped. memset () at ../sysdeps/x86_64/memset.S:746 746 movd %rdx,%xmm0 (gdb) kernel-2.6.32.1-9.fc13.x86_64 -> x86_64 gdb -> i386 inferior: (gdb) start Temporary breakpoint 1 at 0x80484f4: file /home/jkratoch/t/threadit.c, line 40. Starting program: /home/jkratoch/t/threadit32 warning: .dynamic section for "/lib/libc.so.6" is not at the expected address warning: difference appears to be caused by prelink, adjusting expectations [Thread debugging using libthread_db enabled] Temporary breakpoint 1, main () at /home/jkratoch/t/threadit.c:40 40 i = pthread_create (&thread1, NULL, start, NULL); /* create1 */ (gdb) record (gdb) c Continuing. warning: Process record ignores the memory change of instruction at address 0x18a7c5 because it can't get the value of the segment register. Cannot find user-level thread for LWP 11809: generic error (/lib/libpthread-2.11.so has been prelinked to avoid some existing bug) kernel-2.6.32.1-9.fc13.x86_64 -> i386 gdb -> i386 inferior: (gdb) start Temporary breakpoint 1 at 0x80484f4: file /home/jkratoch/t/threadit.c, line 40. Starting program: /home/jkratoch/t/threadit32 [Thread debugging using libthread_db enabled] Temporary breakpoint 1, main () at /home/jkratoch/t/threadit.c:40 40 i = pthread_create (&thread1, NULL, start, NULL); /* create1 */ (gdb) record (gdb) c Continuing. warning: Process record ignores the memory change of instruction at address 0x3557c5 because it can't get the value of the segment register. Program terminated with signal SIGTRAP, Trace/breakpoint trap. The program no longer exists. (gdb) --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="threadit.c" Content-length: 341 #include #include #include static volatile int var; static void *start (void *arg) { sleep (1); return arg; } int main (void) { pthread_t thread1; int i; i = pthread_create (&thread1, NULL, start, NULL); assert (i == 0); i = pthread_join (thread1, NULL); assert (i == 0); return 0; } --GvXjxJ+pjyke8COw--