From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id C1F85385800E for ; Wed, 22 Sep 2021 21:49:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C1F85385800E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-lf1-x136.google.com with SMTP id t10so17821820lfd.8 for ; Wed, 22 Sep 2021 14:49:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lwSyEapkZ0Z2bjijAa6ZjpOGcV169NTRK36vyP4YivQ=; b=PHgpU/EKrg0ehpRcPuXLalXycmmlSCNFjAdvkkUhtJec2ROXRMP7RyqjBIQ3vjUc/i xfxCNfWcGh+0Z2wZD5dLzo04MswXXUnJjyHvKC1jE8iLTPbTyxI5TBj6Xs+B7/7tdcmi BAFv9h9LvkVzpMMBWgqxHljMEnFyYwo4oi8TNMowqZAA/DdFWI91T+tkaSFtbbv59FF9 pKs3lY3udYLZHd8YwM3gaK+9qVgoVw9+0nGUi+fdxO9YOnNWO84YVs0P6TV7CSDMfhdW 3jCbhph3XQC3wbj7IyX5BIhtGLNV9kK4VgERS5+GwU/MCgHJgPobUZPiZjcwylMdCIf/ r4Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lwSyEapkZ0Z2bjijAa6ZjpOGcV169NTRK36vyP4YivQ=; b=tb7h1vzZLedeSzFvYSmvHEfRrVgS043C1ze58DIEvc6ejCmoRrVOeLmKpB7aBQuq1u SuAdtf7IMruo4/pSGf7LqcWloN/UCx/zptx/g7ZK5Uh7HX64mtK69PruwPUi0qV138Pi N0OE9sMMwxNQWmWHxZlIJc8qJU4c7PMmbSnraIoWYye3zlRhE3nDOBtZwpQZURJgwElM ADmJO97IU1pUoFCYYopx0Doivqkojq3d5uI9I7oXizpse/I0kr5fPpokj3b6zwEbl8a2 7dySNb2QYzM66uVIk/Me9hOsDZ0mgFnrrkD8Ale8kziP6785oI1j223CqN1cGuqj4di4 pSAA== X-Gm-Message-State: AOAM533eOhoM3Vj7P2BOoued//Y9op4Lo42l7h26xCAqNvsIV7MpKPtQ dvRK2zluapWu07+pjkzIx84wlR6MtsPELl28vloMiw== X-Google-Smtp-Source: ABdhPJzch0iYcuNX4nODQSdlIsk5D7K2j6bop+FCG4lc2E3EdX3ZwPU2OM3BngOUDzKzTB8a0dxY4yd59fb6WujI2Wo= X-Received: by 2002:a05:6512:2294:: with SMTP id f20mr1071901lfu.489.1632347349605; Wed, 22 Sep 2021 14:49:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jim Wilson Date: Wed, 22 Sep 2021 14:48:58 -0700 Message-ID: Subject: Re: GDB will set bp at a function for RISC-V when step over this function call To: John Baldwin Cc: Simon Marchi , "Ge, Lei" , "gdb@sourceware.org" , "Xin, Wenyan" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2021 21:49:13 -0000 On Mon, Sep 20, 2021 at 10:06 AM John Baldwin wrote: > RISC-V doesn't (to my knowledge) have support for hardware single step and > should be using software single step on bare metal as well. > There is hardware single-step/breakpoint/watchpoint support. However, in old versions of the debug spec (e.g. HiFive Unleashed), this support was only visible via jtag, and hence unusable to linux/freebsd/etc. But openocd does have hardware single-step/breakpoint/watchport support which does work. People doing bare metal debugging are expected to use openocd with gdb. In new versions of the debug spec (e.g. HiFive Unmatched), this support is now visible in machine mode, but we need opensbi and kernel support before gdb can use it. I don't know of anyone working on that, though I might try it if I ever find the time. Jim