From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EGmDEmTpcV/8JQAAWB0awg (envelope-from ) for ; Mon, 28 Sep 2020 09:47:16 -0400 Received: by simark.ca (Postfix, from userid 112) id 489DF1E590; Mon, 28 Sep 2020 09:47:16 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: ** X-Spam-Status: No, score=2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FSL_HELO_FAKE,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.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 E83221E58A for ; Mon, 28 Sep 2020 09:47:15 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6F0663941C23; Mon, 28 Sep 2020 13:47:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F0663941C23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1601300835; bh=+kvqPkwi+ROb4i1SLnsicp4g6YeaaxbZ+7z6FdODicI=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=irEiN4m52DIPdW0DWSX42W/G/GmJWqE3bS+DtSmMqLvptyla6sb+/lgV5QT3cLeto WrjD315rsP+3KVkoYMkylIsEQehwdNCsp0yKefyMs0LiQUSMWdJVySb8CCpzLE8VkA XDlZx2Fs+m/ApyY6QTBBwo34cYZYKgIOExBbuR7Q= 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 To: "Aktemur, Tankut Baris" 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-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: Shahab Vahedi via Gdb-patches Reply-To: Shahab Vahedi Cc: Simon Marchi , Anton Kolesov , Francois Bedard , "gdb-patches@sourceware.org" , Shahab Vahedi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" 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