From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id B58CD3858D37 for ; Tue, 14 Mar 2023 12:32:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B58CD3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pc3pq-0005wC-4s; Tue, 14 Mar 2023 08:32:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5QQVJFfpLK//AyqGa4bSHaI3IPPYHXyHCMildrt0bFE=; b=pmraiZ/VmbwK DoDx0oPbzehgcJQdQh8DNyXV7q01oPNO6Iq3PJJloe3nNUv527k9Aj9j9N7G/zrZO8lAoNm38/G8Z i9B+j3QKlPcwFJ0sH8afIK1PL5XFpdbqL2XJMszY/cae67K54ovr557374MZjHu/3V2clzy/Z6Y8/ ae9+x7JjMxpUXdb7/Zf7icM1uawWT3THduTiqIdn5ZeOvTTG3smdQrDVOSkt9WvsZdmK8iFkZJk9s ksHeQng2yhzTKSTox6/CuExdhxVhDioO6qMNo2/23L9pbwj0kCS6aEB5gdGtE30PGCgm4hzrihsyJ FtOCpO2/K7/wo2bNGWW21w==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pc3pn-0000yU-9e; Tue, 14 Mar 2023 08:32:57 -0400 Date: Tue, 14 Mar 2023 14:32:48 +0200 Message-Id: <83sfe7sebz.fsf@gnu.org> From: Eli Zaretskii To: Christina Schimpe Cc: gdb-patches@sourceware.org, blarsen@redhat.com In-Reply-To: <20230313183427.2735278-2-christina.schimpe@intel.com> (message from Christina Schimpe on Mon, 13 Mar 2023 19:34:27 +0100) Subject: Re: [PATCH v2 1/1] gdb, breakpoint: add breakpoint location debugging logs References: <20230313183427.2735278-1-christina.schimpe@intel.com> <20230313183427.2735278-2-christina.schimpe@intel.com> X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > From: Christina Schimpe > Cc: eliz@gnu.org, > blarsen@redhat.com, > Christina Schimpe > Date: Mon, 13 Mar 2023 19:34:27 +0100 > > From: Mihails Strasuns > > Add new commands: > > set debug breakpoints on|off > show debug breakpoints > > This patch introduces new debugging information that prints > breakpoint location insertion and removal flow. > > The debug output looks like: > ~~~ > (gdb) set debug breakpoints on > (gdb) disassemble main > Dump of assembler code for function main: > 0x0000555555555129 <+0>: endbr64 > 0x000055555555512d <+4>: push %rbp > 0x000055555555512e <+5>: mov %rsp,%rbp > => 0x0000555555555131 <+8>: mov $0x0,%eax > 0x0000555555555136 <+13>: pop %rbp > 0x0000555555555137 <+14>: ret > End of assembler dump. > (gdb) break *0x0000555555555137 > Breakpoint 2 at 0x555555555137: file main.c, line 4. > [breakpoints] update_global_location_list: UGLL_MAY_INSERT > (gdb) c > Continuing. > [breakpoints] update_global_location_list: UGLL_INSERT > [breakpoints] insert_bp_location: bp_location (0x562881637fb0) at address 0x555555555137 in main at main.c:4 > [breakpoints] insert_bp_location: bp_location (0x56288179a4f0) at address 0x7ffff7fd37b5 > [breakpoints] insert_bp_location: bp_location (0x56288179ea60) at address 0x7ffff7fe509e > [breakpoints] insert_bp_location: bp_location (0x5628817184d0) at address 0x7ffff7fe63f4 <_dl_close_worker+2356> > [breakpoints] remove_breakpoint_1: bp_location (0x562881637fb0) due to regular remove at address 0x555555555137 in main at main.c:4 > [breakpoints] remove_breakpoint_1: bp_location (0x56288179a4f0) due to regular remove at address 0x7ffff7fd37b5 > [breakpoints] remove_breakpoint_1: bp_location (0x56288179ea60) due to regular remove at address 0x7ffff7fe509e > [breakpoints] remove_breakpoint_1: bp_location (0x5628817184d0) due to regular remove at address 0x7ffff7fe63f4 <_dl_close_worker+2356> > > Breakpoint 2, 0x0000555555555137 in main () at main.c:4 > 4 } > ~~~ > > Co-Authored-By: Christina Schimpe > --- > gdb/NEWS | 4 +++ > gdb/breakpoint.c | 66 +++++++++++++++++++++++++++++++++++++++++++++ > gdb/doc/gdb.texinfo | 8 ++++++ > 3 files changed, 78 insertions(+) Thanks, the documentation parts are OK. Reviewed-By: Eli Zaretskii