From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12297 invoked by alias); 5 Nov 2004 20:34:31 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12286 invoked from network); 5 Nov 2004 20:34:29 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 5 Nov 2004 20:34:29 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id iA5KYTPe016314 for ; Fri, 5 Nov 2004 15:34:29 -0500 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iA5KYLr12749; Fri, 5 Nov 2004 15:34:21 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 706F4129D8C; Fri, 5 Nov 2004 15:34:04 -0500 (EST) Message-ID: <418BE3B9.8060605@gnu.org> Date: Fri, 05 Nov 2004 20:34:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: Randolph Chung Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] rudimentary infrun debugging References: <20041105190530.GB7666@tausq.org> In-Reply-To: <20041105190530.GB7666@tausq.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg00088.txt.bz2 Randolph Chung wrote: > I've been using this for debugging infrun for some time. Dunno if it's > suitable for inclusion. > > Thoughts? Is it too little? too verbose? Too ugly? > > (gdb) set debug infrun 1 > (gdb) step > inferior: proceed(addr=ffffffff, signal=144, step=1) > inferior: resume(step=1, signal=0) > inferior_event: infwait_normal_state > inferior_event: TARGET_WAITKIND_STOPPED > inferior_event: stop_pc = 106f8 > inferior_event: trap expected > inferior_event: stepping inside range [106f4-10708] > inferior: resume(step=1, signal=0) > inferior: prepare_to_wait > inferior_event: infwait_normal_state > inferior_event: TARGET_WAITKIND_STOPPED > inferior_event: stop_pc = 106fc > inferior_event: stepping inside range [106f4-10708] > inferior: resume(step=1, signal=0) > inferior: prepare_to_wait > inferior_event: infwait_normal_state > inferior_event: TARGET_WAITKIND_STOPPED > inferior_event: stop_pc = 10700 > inferior_event: stepping inside range [106f4-10708] > inferior: resume(step=1, signal=0) > inferior: prepare_to_wait > inferior_event: infwait_normal_state > inferior_event: TARGET_WAITKIND_STOPPED > inferior_event: stop_pc = 10704 > inferior_event: stepping inside range [106f4-10708] > inferior: resume(step=1, signal=0) > inferior: prepare_to_wait > inferior_event: infwait_normal_state > inferior_event: TARGET_WAITKIND_STOPPED > inferior_event: stop_pc = 10708 > inferior_event: INSTRUCTION_NULLIFIED > inferior: prepare_to_wait > inferior_event: infwait_nullified_state > inferior_event: TARGET_WAITKIND_STOPPED > inferior_event: stop_pc = 106f4 > inferior_event: BPSTATE_WHAT_STOP_NOISY > inferior: stop_stepping > > > 2004-11-05 Randolph Chung > > * infrun.c (debug_infrun): New variable. > (resume, proceed, wait_for_inferior): Annotate with debug messages. > (handle_inferior_event, keep_going): Likewise. > (_initialize_infrun): Register "set debug infrun" command. Hmm, nice! You'll need to add this to the gdb.texinfo documentation (it goes in appendix), just post that separatly. For the output, minor tweaks: - prefix things with a single consistent "infrun: " (and if that makes other prefixes redundant (e.g., "inferior: ") drop it - your call. - that ``space before an lparen in function calls'' vis: ``` resume (...''. - prefix addresses with 0x (I note you're spot on with using paddr_nz). Andrew