From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 474 invoked by alias); 24 May 2009 16:47:57 -0000 Received: (qmail 464 invoked by uid 22791); 24 May 2009 16:47:56 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 24 May 2009 16:47:50 +0000 Received: (qmail 29512 invoked from network); 24 May 2009 16:47:48 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 24 May 2009 16:47:48 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA]: Clean up debug printing of pc in gdbserver Date: Sun, 24 May 2009 16:47:00 -0000 User-Agent: KMail/1.9.10 Cc: Doug Evans References: <20090507031109.0CBFB84890@localhost> In-Reply-To: <20090507031109.0CBFB84890@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200905241747.58832.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00531.txt.bz2 > The debug printing of pc in linux-i386-low.c/linux-x86-64-low.c can > use some clean up. >=20 > - why restrict the printing to just x86? > - the text that is printed for linux_resume_one_lwp is confusing >=20 > Ok to check in? >=20 > 2009-05-06 =A0Doug Evans =A0 >=20 > =A0=A0=A0=A0=A0=A0=A0=A0* linux-x86-64-low.c (debug_threads): Remove decl= aration. > =A0=A0=A0=A0=A0=A0=A0=A0(x86_64_get_pc,x86_64_set_pc): Remove debug print= ing of pc. > =A0=A0=A0=A0=A0=A0=A0=A0* linux-i386-low.c (debug_threads): Remove declar= ation. > =A0=A0=A0=A0=A0=A0=A0=A0(i386_get_pc,i386_set_pc): Remove debug printing = of pc. > =A0=A0=A0=A0=A0=A0=A0=A0* linux-low.c (get_stop_pc): Print pc if debug_th= reads. > =A0=A0=A0=A0=A0=A0=A0=A0(check_removed_breakpoint, linux_wait_for_lwp): D= itto. > =A0=A0=A0=A0=A0=A0=A0=A0(linux_resume_one_lwp): Ditto. Looks OK to me. Small nit below. On Thursday 07 May 2009 04:11:08, Doug Evans wrote: > if (debug_threads > - && WIFSTOPPED (*wstatp)) > + && WIFSTOPPED (*wstatp) > + && the_low_target.get_pc !=3D NULL) > { > struct thread_info *saved_inferior =3D current_inferior; > + CORE_ADDR stop_pc =3D (*the_low_target.get_pc) (); > current_inferior =3D (struct thread_info *) > find_inferior_id (&all_threads, child->head.id); > - /* For testing only; i386_stop_pc prints out a diagnostic. */ > - if (the_low_target.get_pc !=3D NULL) > - get_stop_pc (); > + fprintf (stderr, "linux_wait_for_lwp: pc is %08lx\n", (long) stop_= pc); > current_inferior =3D saved_inferior; > } Can we rename that `stop_pc' variable to, say, `pc', so we're consistent throughout? We can think of the `stop_pc' as having always the decr_pc_after_break adjustment applied. --=20 Pedro Alves