From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9542 invoked by alias); 12 May 2009 16:06:42 -0000 Received: (qmail 9534 invoked by uid 22791); 12 May 2009 16:06:42 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mtagate4.de.ibm.com (HELO mtagate4.de.ibm.com) (195.212.29.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 May 2009 16:06:33 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.14.3/8.13.8) with ESMTP id n4CG6Uib072092 for ; Tue, 12 May 2009 16:06:30 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4CG6UND3887256 for ; Tue, 12 May 2009 18:06:30 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4CG6Tk1029293 for ; Tue, 12 May 2009 18:06:30 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id n4CG6Kgx029225; Tue, 12 May 2009 18:06:20 +0200 Message-Id: <200905121606.n4CG6Kgx029225@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 12 May 2009 18:06:20 +0200 Subject: Re: [RFC] Remove i386 low level debug register function from nm- header file. To: muller@ics.u-strasbg.fr (Pierre Muller) Date: Tue, 12 May 2009 16:06:00 -0000 From: "Ulrich Weigand" Cc: eliz@gnu.org ('Eli Zaretskii'), gdb-patches@sourceware.org, pedro@codesourcery.com In-Reply-To: <004601c9d318$a13c4fd0$e3b4ef70$@u-strasbg.fr> from "Pierre Muller" at May 12, 2009 05:45:09 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/msg00249.txt.bz2 Pierre Muller wrote: > What about something like this: > (once my main patch is accepted) > > static void > maint_show_debug_regs (char * args, int from_tty) > { > if (i386_dr_low.set_addr && i386_dr_low.get_status && > i386_dr_low.set_control) > { > } > else > { > error (_("x86 debug register cannot be used for that target")); > } > } > > void > _initialize_i386_nat (void) > { > #ifdef I386_USE_GENERIC_WATCHPOINTS > /* A maintenance command to enable printing the internal DRi mirror > variables. */ > add_cmd ("show-debug-regs", class_maintenance, > maint_show_debug_regs, _("\ > Set whether to show variables that mirror the x86 debug registers.\n\ > Use \"on\" to enable, \"off\" to disable.\n\ > If enabled, the debug registers values are shown when GDB inserts\n\ > or removes a hardware breakpoint or watchpoint, and when the inferior\n\ > triggers a breakpoint or watchpoint."), > &maintenancelist); > #endif Well, I guess a simpler way to have that effect would be to just move installing the command into the i386_use_watchpoints routine; on targets that do not use watchpoints the command then simply would not be available, just as it is the case today. > This would also remove one of the ARI var_boolean warnings! You're right, but we should be using one of the new routines (probably add_setshow_boolean_cmd) instead of the old deprecated_add_set_cmd. That's a separate issue though. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com