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.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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686148658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/asXHSMmTjH6fuoqjrjnx6+NzhfP4jXfXZUIxU9cQ34=; b=EiIWkIN1i/Li1+p6BsKlxtzXtGsJBBUTUmqWf9692v/RRJzw/zKCQCSjHBBXYWGUJDpuBB /+/si8QMBbap43W4EqElGcuVphVEjwPtrIxpYHR/k81XIHuT4fW+jWZOC+nZKI29bOxgEs UTegAz2bTfEOTUC642fVgqfoR8fvC5s= 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) From: Andrew Burgess 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-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: "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