From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 0BB293858D35 for ; Wed, 22 Dec 2021 17:19:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0BB293858D35 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-619-OkRN3T6cMFCxu2tlR7UUbA-1; Wed, 22 Dec 2021 12:19:09 -0500 X-MC-Unique: OkRN3T6cMFCxu2tlR7UUbA-1 Received: by mail-wm1-f72.google.com with SMTP id p22-20020a05600c1d9600b00345a25ea8cfso985827wms.5 for ; Wed, 22 Dec 2021 09:19:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bbMi3lXiwjSAsp50ZtvMlqc5nKK8iDq24PGHtYGpOEk=; b=t2NdR/f0P2FSG1ylN5jflQYyi5RLeM0DmyGq0H7RaxzlO4hmAv76JCCk6IvLMm9VXE XCGEvoqyBeLb2qDL9JUDhDsOizQHAHyvUYOvAQpHyHtQo+2K5Hrszr/1FUVDPFqYZudm 7ksnMFZHtrMMgX2EScKBfQAcHQazEm/gImufifGS3pVMGEmUYqX+YbTJNmib0BcnojnY 3yC2vLbOvvLLYabLv5Mcl8vJbYi4e1mYt3JRueA1ULeig3tr7GUDOnFPX7d8jyHcB3Sm k8zOxKeWozFNnd23S9We9Csrw6u7jCDpBZy2OGN1D2Rjr3M0a7EfwcRivzlq+YR0EuS0 0+Hw== X-Gm-Message-State: AOAM531ieQHGVGEQtHPf6ZYY+Ng86044nSJhIUM/b9AxCPoH2ZFkGIxv WVfZTaRqGqpIMzHNnggDZeGYtiHjU0LRuQUWpBASCXsyBkMP7Mt4QDvFAbYUkQXT9QUunVXiPnx WlytCwMDqqkxAA5ncihXJhnzFttIhqVaCYLfYCnpoRHHDo2QNuyU1DTra7RbIQKFZk1oOQZ5L/w == X-Received: by 2002:a05:6000:156c:: with SMTP id 12mr2818961wrz.502.1640193547974; Wed, 22 Dec 2021 09:19:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3//dwBvOKj92XtjUZMCAuMOFlQTS7dS6uJhaw/H/w4s0MHQlDJaXBtwNg3CjWgxX6MgeFzw== X-Received: by 2002:a05:6000:156c:: with SMTP id 12mr2818945wrz.502.1640193547658; Wed, 22 Dec 2021 09:19:07 -0800 (PST) Received: from localhost (host86-134-238-138.range86-134.btcentralplus.com. [86.134.238.138]) by smtp.gmail.com with ESMTPSA id r7sm2319694wrt.77.2021.12.22.09.19.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Dec 2021 09:19:07 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH] gdb: rename lin-lwp to linux-native in set/show debug Date: Wed, 22 Dec 2021 17:19:02 +0000 Message-Id: <20211222171902.2304210-1-aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Dec 2021 17:19:12 -0000 Rename 'set debug lin-lwp' to 'set debug linux-native' and 'show debug lin-lwp' to 'show debug linux-native'. I've updated the documentation and help text to match, as well as making it clear that the debug that is coming out relates to all aspects of Linux native inferior support, not just the LWP aspect of it. The boundary between general "native" target debug, and the lwp specific part of that debug was always a little blurry, but the actual debug variable inside GDB is debug_linux_nat, and the print routine linux_nat_debug_printf, is used throughout the linux-nat.c file, not just for lwp related debug, so the new name seems to make more sense. I've left the tag that is printed in the debug messages as [linux-nat] so that the actual debug output doesn't change, and the debug lines don't get any longer. I could change the tag to match the switch, or update the switch to 'linux-nat' if people thing that would be better. --- gdb/NEWS | 12 ++++++++++++ gdb/doc/gdb.texinfo | 12 ++++++------ gdb/linux-nat.c | 6 +++--- gdb/testsuite/gdb.threads/ia64-sigill.exp | 2 +- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/gdb/NEWS b/gdb/NEWS index 1e4afa91bc5..a8ec8905247 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -64,6 +64,12 @@ set debug threads on|off show debug threads Print additional debug messages about thread creation and deletion. +set debug linux-native on|off +show debug linux-native + These new commands replaced the old 'set debug lin-lwp' and 'show + debug lin-lwp' respectively. Turning this setting on prints debug + messages relating to GDB's handling of native Linux inferiors. + * Changed commands maint packet @@ -72,6 +78,12 @@ maint packet as escaped hex, e.g. \x?? where '??' is replaces with the value of the non-printable character. +set debug lin-lwp on|off +show debug lin-lwp + These commands have been removed from GDB. The new command 'set + debug linux-native' and 'show debug linux-native' should be used + instead. + * Python API ** New function gdb.add_history(), which takes a gdb.Value object diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 2d3414175c1..dfcc7cbb386 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -27024,12 +27024,12 @@ @item show debug jit Displays the current state of @value{GDBN} JIT debugging. -@item set debug lin-lwp -@cindex @sc{gnu}/Linux LWP debug messages -@cindex Linux lightweight processes -Turn on or off debugging messages from the Linux LWP debug support. -@item show debug lin-lwp -Show the current state of Linux LWP debugging messages. +@item set debug linux-native @r{[}on@r{|}off@r{]} +@cindex @sc{gnu}/Linux native target debug messages +@cindex Linux native targets +Turn on or off debugging messages from the Linux native target debug support. +@item show debug linux-native +Show the current state of Linux native target debugging messages. @item set debug linux-namespaces @cindex @sc{gnu}/Linux namespaces debug messages diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 59924873915..bb5d2878433 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -195,13 +195,13 @@ enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN; static bool debug_linux_nat; -/* Implement 'show debug lin-lwp'. */ +/* Implement 'show debug linux-native'. */ static void show_debug_linux_nat (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) { - fprintf_filtered (file, _("Debugging of GNU/Linux lwp module is %s.\n"), + fprintf_filtered (file, _("Debugging of GNU/Linux native targets is %s.\n"), value); } @@ -4529,7 +4529,7 @@ void _initialize_linux_nat (); void _initialize_linux_nat () { - add_setshow_boolean_cmd ("lin-lwp", class_maintenance, + add_setshow_boolean_cmd ("linux-native", class_maintenance, &debug_linux_nat, _("\ Set debugging of GNU/Linux native target."), _(" \ Show debugging of GNU/Linux native target."), _(" \ diff --git a/gdb/testsuite/gdb.threads/ia64-sigill.exp b/gdb/testsuite/gdb.threads/ia64-sigill.exp index 636b387d388..6322acae210 100644 --- a/gdb/testsuite/gdb.threads/ia64-sigill.exp +++ b/gdb/testsuite/gdb.threads/ia64-sigill.exp @@ -55,7 +55,7 @@ gdb_breakpoint [gdb_get_line_number "break-at-exit"] gdb_test_no_output "set debug infrun 1" -# The ia64 SIGILL signal is visible only in the lin-lwp debug. +# The ia64 SIGILL signal is visible only in the linux-native debug output. set prompt "$gdb_prompt \\\[infrun\\\] fetch_inferior_event: exit\r\n$" gdb_test_multiple "continue" "continue" -prompt $prompt { -- 2.25.4