From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5462 invoked by alias); 21 Sep 2005 04:00:22 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 5332 invoked from network); 21 Sep 2005 04:00:06 -0000 Received: from unknown (205.217.158.180) by sourceware.org with QMTP; 21 Sep 2005 04:00:06 -0000 Received: (qmail 16040 invoked by uid 10); 21 Sep 2005 04:00:06 -0000 Received: (qmail 18675 invoked by uid 500); 21 Sep 2005 03:59:58 -0000 To: Eli Zaretskii Cc: michsnyd@cisco.com, gdb@sources.redhat.com, shebs@apple.com Subject: Re: Using reverse execution References: <43309387.4020504@cisco.com> From: Ian Lance Taylor Date: Wed, 21 Sep 2005 04:00:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-09/txt/msg00153.txt.bz2 Eli Zaretskii writes: > > Cc: gdb@sources.redhat.com, shebs@apple.com > > From: Ian Lance Taylor > > Date: 20 Sep 2005 16:13:55 -0700 > > > > There is probably some cool use for which tracepoints are the > > obvious right answer, but I don't know what it is. > > In native debugging, tracepoints would be very useful to debug a > real-time program, or, more generally, a program where timing issues > are crucial to its correct operation. With such programs, normal GDB > usage disrupts the program operation and might even cause the program > to fail in ways that are unrelated to the bug you are looking for. I get that that is the idea, it's just that I wouldn't tackle that problem that way. I would put a logging framework in the program itself. That's how I've debugged this sort of issue in the past, and the logging framework generally pays off for itself over time. (I had several communicating programs with real time interactions. I arranged for each one to spit out log lines into a separate multilog-like program to add timestamps, and then after the fact sorted the lines together to see what was happening.) I can imagine an embedded system with no output facilities, where it would be helpful to use gdb to run tracepoints over JTAG--only gdb doesn't really support JTAG anyhow, so it still seems kind of hypothetical. Obviously I'm not saying that tracepoints should be removed or anything like that. I'm just responding to Stan's comment that tracepoints have been around for a while and not used, by mentioning that I personally never seen any important use for them. Ian