From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WIB0F0mWgGThlSAAWB0awg (envelope-from ) for ; Wed, 07 Jun 2023 10:38:01 -0400 Received: by simark.ca (Postfix, from userid 112) id 5B74D1E11E; Wed, 7 Jun 2023 10:38:01 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=EEWPR3yC; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D63931E0D6 for ; Wed, 7 Jun 2023 10:38:00 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2859E3858296 for ; Wed, 7 Jun 2023 14:38:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2859E3858296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1686148680; bh=/asXHSMmTjH6fuoqjrjnx6+NzhfP4jXfXZUIxU9cQ34=; h=To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=EEWPR3yCoI5nPV9BBn2oaHq9MUNWNkRUB3EKU22XiE4vkbAWA52BT7e3Pn/cBLlXJ UYt9gHr40kb66s64z5mrGQYacqcMNZT4hOSkSoj9nCKX6Hoypl+AlT7c5STJiypC6q 2SVVQ2rw4zsmVBdSs1+zlNoR16pV6WpyaNceNoVU= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id A90A3385842C for ; Wed, 7 Jun 2023 14:37:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A90A3385842C Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-232-SZgxV62IO1uItQQtlobl3g-1; Wed, 07 Jun 2023 10:37:29 -0400 X-MC-Unique: SZgxV62IO1uItQQtlobl3g-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f7ecfccf2eso6584305e9.1 for ; Wed, 07 Jun 2023 07:37:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686148642; x=1688740642; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/asXHSMmTjH6fuoqjrjnx6+NzhfP4jXfXZUIxU9cQ34=; b=hgeegymOangTrmTNbnzkItfXpQC5Yiq1s81gi2v1kQWHYUt0GYsufQjxNlMULISqsB WTcPCB5ZuzBJ24BFp7Vt7eA+CW9TdAamb4kVPlq8DNVFpTIs+Z+KrnHBl7tEb1cDZK6/ f8OIyImUN8kjKBRJ9sMjTSd7ekh6dOjHsdabOXAXQceIk00eS6V86fgA9d+fbYxaWRHT HYxINcMb7l2pPtw5pHGjQYQFXbPrCJ8wbO98qupBh5QADEO0ftAU49do5HeUDl0NpufL /5hjPLo4kst5hy2RfTtP9Ifbu1mcKTqmNAvy/HEcK6p6KZX29O2KGJIvJgQXvCRXC5hH Qcxg== X-Gm-Message-State: AC+VfDx/c7PYim4iyhiUxc0kIELdO4KJ8LSunLWKTqJb9wLwTaKk+7LA mhFS+N64BttolQAb6cAyidbTjlxBkOqMu/XdW22WooopBCPf+X+uhGsfnK/ijZGv7NAy9QkTG5y yn/zqn9t5of/xxlSz83vH1poIPEob3w== X-Received: by 2002:a05:600c:257:b0:3f5:ff24:27de with SMTP id 23-20020a05600c025700b003f5ff2427demr4443185wmj.32.1686148642212; Wed, 07 Jun 2023 07:37:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7+x83mOtip6w5MaZ/TaRDfCimu5b4pl+wlFaNbZjD8NmCqJtcNiQYrE8OpHHVxfHuKHWnRNg== X-Received: by 2002:a05:600c:257:b0:3f5:ff24:27de with SMTP id 23-20020a05600c025700b003f5ff2427demr4443171wmj.32.1686148641854; Wed, 07 Jun 2023 07:37:21 -0700 (PDT) Received: from localhost (11.72.115.87.dyn.plus.net. [87.115.72.11]) by smtp.gmail.com with ESMTPSA id f17-20020a7bc8d1000000b003f7e6d7f71esm2344377wml.36.2023.06.07.07.37.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 07:37:21 -0700 (PDT) To: "Schimpe, Christina" , "gdb-patches@sourceware.org" Cc: "eliz@gnu.org" , "simark@simark.ca" Subject: RE: [PATCH v4 1/1] gdb, breakpoint: add breakpoint location debugging logs In-Reply-To: References: <20230601163345.3895525-1-christina.schimpe@intel.com> <20230601163345.3895525-2-christina.schimpe@intel.com> <87a5xb3bk9.fsf@redhat.com> Date: Wed, 07 Jun 2023 15:37:20 +0100 Message-ID: <87h6rj1gpr.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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: , From: Andrew Burgess via Gdb-patches Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" "Schimpe, Christina" writes: > Hi Andrew, > > Thanks a lot for your review. > I only have one small question, else I agree with all of your feedback. > >> > + >> > +static std::string >> > +breakpoint_location_address_str (const bp_location* bl) { >> > + std::string str = string_printf ("Breakpoint %d, location (%s) at address %s", >> > + bl->owner->number, >> > + host_address_to_string (bl), >> > + paddress (bl->gdbarch, bl->address)); >> >> I can't help but think using 'location' in this string is a bad idea, 'location' already >> has a meaning for GDB breakpoints. How about just dropping the work >> 'location'? > > Just to be sure that I understand correctly - do you suggest dropping the word 'location' in string_printf as follows: > > static std::string > breakpoint_location_address_str (const bp_location* bl) { > std::string str = string_printf ("Breakpoint %d (%s) at address %s", > bl->owner->number, > host_address_to_string (bl), > paddress (bl->gdbarch, bl->address)); Yes. For me a location would either be something like '1.1' or maybe just '1' if (given context) it is obvious we're talking about breakpoint #1, thus 1.1 would be implied. Or a location could be an address within the inferior for where the location has been placed -- which is what I would naturally assume if I saw an address labelled as a location. There's also a benefit for removing extra text that the debug message have more chance of fitting on the terminal without wrapping too much! Thanks, Andrew > > This would be fine for me. > > Best Regards, > Christina > Intel Deutschland GmbH > Registered Address: Am Campeon 10, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, www.intel.de > Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928