From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 9608C3858C51 for ; Mon, 23 May 2022 17:05:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9608C3858C51 Received: from ubuntu.lan (unknown [IPv6:2a02:390:9086::635]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 75ABC86E09; Mon, 23 May 2022 17:05:58 +0000 (UTC) Date: Mon, 23 May 2022 17:05:49 +0000 From: Lancelot SIX To: "Metzger, Markus T" Cc: Pedro Alves , "gdb-patches@sourceware.org" Subject: Re: [PATCH 1/2] Always show locations for breakpoints & show canonical location spec Message-ID: <20220523170538.7qyaw5sm6i45ravg@ubuntu.lan> References: <20220519215552.3254012-1-pedro@palves.net> <20220519215552.3254012-2-pedro@palves.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Mon, 23 May 2022 17:05:58 +0000 (UTC) X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Mon, 23 May 2022 17:06:01 -0000 On Fri, May 20, 2022 at 07:45:09AM +0000, Metzger, Markus T via Gdb-patches wrote: > Hello Pedro, > > > (top-gdb) info breakpoints > > Num Type Disp Enb Address What > > 1 breakpoint keep y internal_error > > 1.1 y 0x00000000005755a5 in internal_error(char const*, int, char const*, ...) at src/gdb/common/errors.c:54 > > 2 breakpoint keep y -qualified internal_error > > 2.1 y 0x00000000005755a5 in internal_error(char const*, int, char const*, ...) at src/gdb/common/errors.c:54 > > 3 breakpoint keep y errors.c:54 > > 3.1 y 0x00000000005755a5 in internal_error(char const*, int, char const*, ...) at src/gdb/common/errors.c:54 > > 3.2 y 0x00007ffff6d50410 in PyErr_SetObject at /usr/src/debug/python2-2.7.15-4.fc27.x86_64/Python/errors.c:54 > > This change looks very nice to me. It will be very helpful once GDB starts > sliding breakpoints per function and we end up with different source lines > for different instances. > > I wouldn't indent the breakpoint instances, though. There is already visual > feedback in the longer breakpoint numbers and the fact that 'type' and 'disp' > are omitted to separate the groups. Hi, I also find it usefull to have some information about the breakpoint location as entered by the user. I think the motivating examples Pedro gave give good examples that similar breakpoint locations can come from quite different user intentions. As for the indentation, I have to admit I do not really have a strong opinion. I am used to the way the things currently are, but this is probably not the greatest justifications. Just to experiment with other options, I have a prototype usign a `tree`-like indentation: (gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y errors.cc:50 └─ 1.1 y 0x000000000224fd06 in internal_error(char const*, int, char const*, ...) at ../../gdbsupport/errors.cc:51 2 breakpoint keep y internal_error └─ 2.1 y 0x000000000224fd06 in internal_error(char const*, int, char const*, ...) at ../../gdbsupport/errors.cc:51 3 breakpoint keep y -qualified internal_error └─ 3.1 y 0x000000000224fd06 in internal_error(char const*, int, char const*, ...) at ../../gdbsupport/errors.cc:51 4 breakpoint keep y error ├─ 4.1 y 0x00000000010b30fe in gcc_c_plugin::error(char const*) const at ../../gdb/../include/gcc-c-fe.def:198 ├─ 4.2 y 0x00000000010c6290 in gcc_cp_plugin::error(char const*) const at ../../gdb/../include/gcc-cp-fe.def:983 └─ 4.3 y 0x000000000224fbe1 in error(char const*, ...) at ../../gdbsupport/errors.cc:39 I am not sure this is a clear improvement, but I can push the patches somewhere if someone wants to give it a try. Best, Lancelot.