From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68249 invoked by alias); 14 Dec 2016 09:18:35 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 68203 invoked by uid 89); 14 Dec 2016 09:18:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=HTo:U*tim, H*MI:sk:yKLdvZq, H*f:sk:yKLdvZq, H*i:sk:yKLdvZq X-HELO: mail-wj0-f181.google.com Received: from mail-wj0-f181.google.com (HELO mail-wj0-f181.google.com) (209.85.210.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Dec 2016 09:18:33 +0000 Received: by mail-wj0-f181.google.com with SMTP id xy5so22497446wjc.0 for ; Wed, 14 Dec 2016 01:18:32 -0800 (PST) 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:content-transfer-encoding :in-reply-to:user-agent; bh=TVV8EY7DHHZdH+mKk04YnjI8G8pv+1oCHvJHDm4ZtiI=; b=RqqfGTJo7M8RD7C8dIpbjg5ct7rlu57gedszUrXugwiXqRYNzdl4FPm8CRHen0Pvn/ ZPHH4o0wNXnWRJAEntDzdunLVDFlNJruDBbVFuYjCTsT6Lh0ZIXrODnfyKqO0Z/wm+3W ktrth07H4IajlzHpnMRfLYsavn1TEfCB8mj0m99zE11hgn4RSSkbwxHyss60hegIWP8Z H4RGmpPYHZyZ2MelB39G2yGcuRPYyqLgcTofVYbAGkdcAwdGu4ZweAso47oJGlDQg9Fr GcTwXzDi7Ki4lE0MCgphaGgmU6lS2Xhv2KwS+bpFbinF6Cj2b1EdERmSQCq/Bv8UV28F aDTQ== X-Gm-Message-State: AKaTC03RyrHiMmrxJSXLelqQrqWbVf5K/dl9wPCh9DZv3XtXGmRW0uR5CQDce+e3xgz+TA== X-Received: by 10.194.85.107 with SMTP id g11mr89278744wjz.82.1481707110629; Wed, 14 Dec 2016 01:18:30 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id kp5sm66276123wjb.8.2016.12.14.01.18.28 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 14 Dec 2016 01:18:30 -0800 (PST) Date: Wed, 14 Dec 2016 09:18:00 -0000 From: Yao Qi To: Tim Newsome Cc: Antoine Tremblay , gdb Subject: Re: read target register to decide breakpoint size Message-ID: <20161214091811.GH25542@E107787-LIN> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg00020.txt.bz2 On 16-12-13 13:30:02, Tim Newsome wrote: > Actually, this seems to work inside breakpoint_kind_from_pc(): > ``` > struct frame_info *frame = get_current_frame (); > uint32_t misa = get_frame_register_unsigned (frame, RISCV_CSR_MISA_REGNUM); > ``` > > Is that kosher? If so, is there any reason for me to implement > breakpoint_kind_from_current_state? I'd like not to do so. Can't you decode the instruction to see whether it is compressed or uncompressed? I also think it is a good idea to make a decision based on ELF info, as you mentioned in the first email. -- Yao (齐尧)