From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3158 invoked by alias); 9 Mar 2004 01:25:20 -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 3141 invoked from network); 9 Mar 2004 01:25:19 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 9 Mar 2004 01:25:19 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 7DF1E2B92; Mon, 8 Mar 2004 20:25:19 -0500 (EST) Message-ID: <404D1CFF.6070209@gnu.org> Date: Tue, 09 Mar 2004 01:25:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: George Anzinger Cc: Daniel Jacobowitz , Eli Zaretskii , gdb@sources.redhat.com Subject: Re: Making "info thread" sane References: <403FEA02.6040506@mvista.com> <200403011454.35346.amitkale@emsyssoft.com> <4044FEDE.5000105@mvista.com> <20040302214535.GA24405@nevyn.them.org> <40450749.7020304@mvista.com> <20040302221718.GA26931@nevyn.them.org> <404515AA.8040709@mvista.com> <404517E8.1020708@gnu.org> <4045236B.3060104@mvista.com> <20040303142842.GA12777@nevyn.them.org> <4046267E.1080808@mvista.com> <404629E3.5020906@gnu.org> <40465651.900@mvista.com> In-Reply-To: <40465651.900@mvista.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00057.txt.bz2 > First, the objective is to get something like what "info thread" does but with a frame that is outside of the switch code (which may mean several frames up the stack). I was considering a macro that would do a silent info thread followed by a loop on each discovered thread. In your message yesterday you suggested something like: > > thread apply all try... end > > Well, I don't find "try" but the apply all seems to accept a macro as a command so I think this will do the right thing. And up-silent does a silent up. "try" isn't seen cos the patch is sitting in the bug database :-( I mentioned "try" as without it the command will abort on the first error (e.g., corrupt stack for bad memory access). > So, this would be my macro set: > > define do_threads > thread apply all do_th_lines > end > > define do_th_lines > while ($pc > $low_sched) && ($pc < $high_sched) > up-silent > end > do-silent > up > end > > What is missing are: 1) I would like to not have the newline after the > "Thread 1 (Thread 1):" (a minor point, but with 100 threads it adds up) and > 2) I would like to have the result of the "ThreadExtraInfo" on the same line (as the info thread command does). Can you post the output so we can see exactly what you mean here? > Nice, would be the ability to print the final up result without doing the down first. In fact this is really needed if it turns out that we are at the first frame which would be the case for the current thread. Is that a command I missed? You mean an abbreviated "info frame"? Yes, using "up" to get that output isn't right. > I suspect that 2) can be handled by "info remote-process" with changes to the stub AND I would like this to NOT put in a linefeed. What "info remote-process" command? > It would appear that this has unwound into a couple of rather simple things: > a) No new line capability on the "thread apply all" > b) No new line on "info remote-process" > c) Ability to do the up/down report without moving to a new frame. Andrew