From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24531 invoked by alias); 10 Sep 2010 22:03:31 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 24511 invoked by uid 22791); 10 Sep 2010 22:03:29 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Date: Fri, 10 Sep 2010 22:03:00 -0000 From: Oleg Nesterov To: "Frank Ch. Eigler" Cc: archer@sourceware.org, utrace-devel@redhat.com Subject: ugdb && breakpoints Message-ID: <20100910220007.GA6587@redhat.com> References: <20100908191838.GA27120@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-SW-Source: 2010-q3/txt/msg00183.txt.bz2 On 09/09, Frank Ch. Eigler wrote: > > Oleg Nesterov writes: > > > [...] > > But, Jan. Implementing the memory writes does not mean breakpoints > > automatically start to work! > > It approximately should though. No. Frank, I guess I did a mistake, I should have read the pdf you sent me first. I'll read it anyway later, but I think that I already understand how this work. gdb replaces the original insn with "int 3". the tracee reports SIGTRAP. Now, to continue the tracee, gdb does not restore the original instruction. Instead, it - writes this insn into _start code - changes regs->ip to point to this insn - does single-step to execute this insn - changes regs->ip again So. Let's forget about breakpoints temporary. ugdb needs the single stepping first. Damn. I spent much more time than I'd wish trying to understand this. I misunderstood the "target byte order" part in the documentation of P packet. Oleg.