From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29539 invoked by alias); 9 Sep 2010 16:11:56 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 29526 invoked by uid 22791); 9 Sep 2010 16:11:55 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Resent-From: Jan Kratochvil Resent-Date: Thu, 9 Sep 2010 18:11:34 +0200 Resent-Message-ID: <20100909161134.GA10711@host1.dyn.jankratochvil.net> Resent-To: oleg@redhat.com, fche@redhat.com, archer@sourceware.org, utrace-devel@redhat.com Date: Thu, 09 Sep 2010 16:11:00 -0000 From: Jan Kratochvil To: Oleg Nesterov Cc: "Frank Ch. Eigler" , archer@sourceware.org, utrace-devel@redhat.com Subject: Re: gdbstub initial code, v9 Message-ID: <20100909160423.GA9768@host1.dyn.jankratochvil.net> References: <20100908191838.GA27120@redhat.com> <20100909152937.GA21586@redhat.com> <20100909155047.GA22403@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100909155047.GA22403@redhat.com> User-Agent: Mutt/1.5.20 (2010-07-18) X-SW-Source: 2010-q3/txt/msg00164.txt.bz2 On Thu, 09 Sep 2010 17:50:47 +0200, Oleg Nesterov wrote: > Probably I need to implement G/P first, otherwise gdb can't change ip. > > Still, I'd appreciate if someone can explain me what gdb needs/expects > to handle breakpoints before I start to read the sources. Yes, GDB tries to set PC to PC-1 to skip back after the hit of 0xCC. As it fails to fix-up PC then PC is wrong and trap_expected is then 0 (it should be 1) and everything fails. BTW ugdb needs one simple fix. :-) (gdb) p/x done=0x5a $1 = 0xa5 Thanks, Jan