From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27541 invoked by alias); 10 Sep 2010 22:12:27 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 27528 invoked by uid 22791); 10 Sep 2010 22:12:27 -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 From: Tom Tromey To: Oleg Nesterov Cc: "Frank Ch. Eigler" , archer@sourceware.org, utrace-devel@redhat.com Subject: Re: ugdb && breakpoints References: <20100908191838.GA27120@redhat.com> <20100910220007.GA6587@redhat.com> Date: Fri, 10 Sep 2010 22:12:00 -0000 In-Reply-To: <20100910220007.GA6587@redhat.com> (Oleg Nesterov's message of "Sat, 11 Sep 2010 00:00:07 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2010-q3/txt/msg00184.txt.bz2 Oleg> Now, to continue the tracee, gdb does not restore the Oleg> original instruction. Instead, it Oleg> - writes this insn into _start code Oleg> - changes regs->ip to point to this insn Oleg> - does single-step to execute this insn Oleg> - changes regs->ip again This is what is done for non-stop. I believe it is called "displaced stepping" in gdb. I think eventually we would like it if uprobes did this work, instead of gdb doing it. Presumably that would yield better performance. E.g., if we have a thread-specific breakpoint, then other threads hitting that breakpoint could simply do the displaced stepping via uprobes, and not report a breakpoint hit to gdb at all. For all-stop, breakpoints are handled differently, though I don't remember how offhand. Tom