From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by sourceware.org (Postfix) with ESMTPS id 31C5238618E2 for ; Mon, 28 Sep 2020 13:47:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 31C5238618E2 Received: by mail-ed1-x541.google.com with SMTP id l17so1370200edq.12 for ; Mon, 28 Sep 2020 06:47:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+kvqPkwi+ROb4i1SLnsicp4g6YeaaxbZ+7z6FdODicI=; b=ROlwRHiMxXlSl7pzAQ+NYNCkH2e/qYQcRvPY1JZuVgDD7G+KHgl456DPIEHCYgYv+V wmeLB8R8FkvIlPfGKq8m8es9YrNfL6GTGGJzM+sk+4BBozkjLmB0VBKXj577Epq0oAqO 2lzF5jUb5MmtRAETtNAR+9+I/zg1uyNIdZR9vxCJ8+3aP7tb19Bc4Aa/EfarhC2dWUD3 rd1z6J2Qm515WnYm4iFxwkyL8aZnbTdA5OSQzLXpL6gcDEkgd/FK8UjQgN+6ZLcv/UZd VJSOHGmRM/VbiSAUj2tQrStqqe+ud0cT+QixPx5vdkoNyvfSQYQqZTfhW/YxEVzAMoH+ nMxQ== X-Gm-Message-State: AOAM530bI3BWl1wUTW0hjZpVfBitWcQlQsfW2I5zWq7a+GL0fPQ7CvO6 4Y8JftUZfk3FSEbgzCfrcNOC8DYLXQe8LtWr X-Google-Smtp-Source: ABdhPJyX9CCpnM/yum23V863zUjKYPyFWeahfd+YiAxQw/zS9BLABeLJ57eIDd8sTa3pD1RrBVGi1Q== X-Received: by 2002:a50:9d0a:: with SMTP id v10mr1839896ede.144.1601300832330; Mon, 28 Sep 2020 06:47:12 -0700 (PDT) Received: from gmail.com ([2a03:1b20:3:f011::6d]) by smtp.gmail.com with ESMTPSA id g20sm1304535ejx.12.2020.09.28.06.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 06:47:11 -0700 (PDT) Date: Mon, 28 Sep 2020 15:47:14 +0200 From: Shahab Vahedi To: "Aktemur, Tankut Baris" Cc: Simon Marchi , "gdb-patches@sourceware.org" , Anton Kolesov , Shahab Vahedi , Francois Bedard Subject: Re: [PATCH] arc: Add support for Linux coredump files Message-ID: <20200928134714.GA4717@gmail.com> References: <20200827112728.4275-1-shahab.vahedi@gmail.com> <18b98a56-e3cf-e05b-49a7-bd6e1f61aefb@simark.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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, 28 Sep 2020 13:47:14 -0000 Hi Baris, On Thu, Sep 17, 2020 at 11:55:42AM +0000, Aktemur, Tankut Baris wrote: > > On 2020-08-27 7:27 a.m., Shahab Vahedi via Gdb-patches wrote: > > +bool > > +arc_target::low_breakpoint_at (CORE_ADDR where) > > +{ > > + uint16_t insn; > > + uint16_t breakpoint = ntohs (TRAP_S_1_OPCODE); > > + > > + the_target->read_memory (where, (gdb_byte *) &insn, TRAP_S_1_SIZE); > > Because 'the_target' is the same as 'this', you may want to simply call > 'read_memory' without explicitly stating the receiver object. This way, > accessing the global variable could be avoided. Thank you very much for your input, but since it is not very obvious to me where/when the "the_target" is initialized, I'd rather keep it this way. Specially seeing that other targets (ARM and RISCV) doing the same. Cheers, Shahab