From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14531 invoked by alias); 5 May 2018 19:28:23 -0000 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 Received: (qmail 14520 invoked by uid 89); 5 May 2018 19:28:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*F:D*be, H*F:D*skynet.be, Prints, RFC X-HELO: mailsec109.isp.belgacom.be Received: from mailsec109.isp.belgacom.be (HELO mailsec109.isp.belgacom.be) (195.238.20.105) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 05 May 2018 19:28:19 +0000 IronPort-PHdr: =?us-ascii?q?9a23=3AQIv3cxL2NnO0s/P/kdmcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgRLfzxwZ3uMQTl6Ol3ixeRBMOHs6kC07KempujcFRI2YyGvnEGfc4EfD4+ou?= =?us-ascii?q?JSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgpp?= =?us-ascii?q?POT1HZPZg9iq2+yo9JDffwtFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+?= =?us-ascii?q?RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLd?= =?us-ascii?q?QgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflhi?= =?us-ascii?q?cZOTAk/m/Zict+gblHrB69vRFz35TZbJ2JOPd4Y6jTfckaRW1EXstJTSJBAoK8?= =?us-ascii?q?b48OD+oZJeZXsZT2qFsUohukAgmsHf7vyj5WiX/sxq0xzuMsERnG3AwhG9IOsW?= =?us-ascii?q?zUrM3rO6sIX+G61rPIzTLab/NL2Dfy9pLIcgs6rPGXXrJxcczRxlczFw/flVqf?= =?us-ascii?q?t5XoMjWI3eoOq2iW9/dsWf6rhmI9tg18rCSjyt0xhoXXh48Z0E7I+CtnzIszON?= =?us-ascii?q?a2UlR0YcS+H5tVryyaMox2Td48TGxwoyY6z6EGuYa8fCgX1JQr3x7fZOKDc4iP?= =?us-ascii?q?+h/jUfueLS14hHJifbKwmQ6+8UmmyuLiSsm5yEtGojZBn9XWq3wA2QDf5tKaRv?= =?us-ascii?q?dj/0qtwyiD2g7N5u1cJEA7j6vbK5ovwr4qkZoTtFzOHjf2mEX3iK+Wd10k+vC2?= =?us-ascii?q?5Oj9bLTpvIWcN4htigHjM6QhhNa/Af8jPwgVXGia+eK826P//UHjW7pFkOU6kr?= =?us-ascii?q?PFv5DCOcQbuqm5Dhda0ok+8BmzFi+m384EnXYbLFJKZgmHgpPyO1HJPfD4F+uw?= =?us-ascii?q?jEqikThx3fDJIKftApLXLnjMw//deuNy50QZ0AMvxtBS/LpPDawbK//sU1X88t?= =?us-ascii?q?vCAUwXKQuxlt7nCdF8zpsTEV2GGKiALaLfq0TAsvovIu2NfJcY/in0Mf88+v/j?= =?us-ascii?q?l2QRglwMe6S1m5EaPiPrVs96KlmUNCK/yuwKFn0H61Iz?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2BHBAAkBe5a/+h+gm1cg3WBW4x2jBUBg?= =?us-ascii?q?ikBXZMkgXgLKwGGeSI0GAECAQEBAQEBAgFrKII1IoMucktQAYULqhuEWINpgji?= =?us-ascii?q?JeT+BD4hKhQgCmCQIgWWMXQuMYpBJgSUcOIFSbYMXkE89gSgBGgGPIwEB?= X-IPAS-Result: =?us-ascii?q?A2BHBAAkBe5a/+h+gm1cg3WBW4x2jBUBgikBXZMkgXgLKwG?= =?us-ascii?q?GeSI0GAECAQEBAQEBAgFrKII1IoMucktQAYULqhuEWINpgjiJeT+BD4hKhQgCm?= =?us-ascii?q?CQIgWWMXQuMYpBJgSUcOIFSbYMXkE89gSgBGgGPIwEB?= Received: from 232.126-130-109.adsl-dyn.isp.belgacom.be (HELO md.home) ([109.130.126.232]) by relay.skynet.be with ESMTP/TLS/DHE-RSA-AES128-GCM-SHA256; 05 May 2018 21:28:17 +0200 From: Philippe Waroquiers To: gdb-patches@sourceware.org Subject: [RFC 0/5] Implenent 'frame apply COMMAND', enhance 'thread apply COMMAND' Date: Sat, 05 May 2018 19:28:00 -0000 Message-Id: <20180505192804.12731-1-philippe.waroquiers@skynet.be> X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00152.txt.bz2 This patch series : * implements a new command 'frame apply [all | COUNT | -COUNT] [-FLAGS...] COMMAND'. * enhance 'thread apply COMMAND' by adding a -FLAGS argument * adds some shortcuts commands * documents the above in gdb.texinfo and NEWS. Th new command 'frame apply' allows to apply a COMMAND to a number of frames, or to all frames. The optional -FLAGS... argument allows to control what output to produce and how to handle errors raised when applying COMMAND to a frame. Some examples usages for this new command: frame apply all info frame Produce info frame for all frames frame apply all p $sp For each frame, print the location, followed by the frame sp frame apply all -qq p $sp Same as before, but -qq flags (q = quiet) indicate to only print the frames sp. frame apply all -vv p $sp Same as before, but -vv flags (v = verbose) indicate to print location and source line for each frame. frame apply all p some_local_var_somewhere Print some_local_var_somewhere in all frames. 'frame apply' will abort as soon as the print command fails. frame apply all -c p some_local_var_somewhere Same as before, but -c flag (c = continue) means to print the error and continue applying command in case the print command fails. frame apply all -s p some_local_var_somewhere Same as before, but -s flag (s = silent) means to be silent for frames where the print command fails. In other words, this allows to 'search' the frame in which some_local_var_somewhere can be printed. 'thread apply' command has been enhanced to also accepts a -FLAGS... argument. Some examples usages for this new argument: thread apply all -s frame apply all -s p some_local_var_somewhere Prints the thread id, frame location and some_local_var_somewhere value in frames of threads that have such local var. To make the life of the user easier, the most typical use cases have shortcuts : faas : shortcut for 'frame apply all -s' taas : shortcut for 'thread apply all -s' tfaas : shortcut for 'thread apply all -s frame apply all -s" An example usage : tfaas p some_local_var_somewhere same as the longer: 'thread apply all -s frame apply all -s p some_local_var_somewhere' The patch serie provides the implementation and all user visible documentation. What is still missing is: * Missing regression tests. Not yet done as this is painful, and so is better done once there is an agreement on the behaviour. * Missing ChangeLog. Not yet done as this is painful, and is IMO close to or completely useless. So, I will do it for the (first) RFA, once the flow of RFC comments stops :).