public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: William Tambe <tambewilliam@gmail.com>, gdb@sourceware.org
Subject: Re: Is it possible to support gdb command hbreak with target sim ?
Date: Wed, 13 Jan 2021 00:46:49 -0500	[thread overview]
Message-ID: <20210113054649.GC6938@vapier> (raw)
In-Reply-To: <20200929084653.GB1540867@embecosm.com>

[-- Attachment #1: Type: text/plain, Size: 1123 bytes --]

On 29 Sep 2020 09:46, Andrew Burgess wrote:
> * William Tambe via Gdb <gdb@sourceware.org> [2020-09-28 21:29:26 -0500]:
> > Is it possible to support gdb command hbreak with target sim ?
> 
> There's currently no support for hardware breakpoints in the simulator
> target, instead only software breakpoints are supported where GDB
> takes responsibility for reading and backing up the old memory
> contents before writing in a software breakpoint instruction.
> 
> This doesn't mean that hardware breakpoint support couldn't be added.

this is a bit inaccurate.  i guess "hardware breakpoints" are a bit
confusing when talking about simulators.  and depending on who you
talk to, they might call them "watchpoints" rather than "breakpoints".

there is a sim-watch module that some sim's support.  looks like:
  avr bfin frv iq2000 m32r mips mn10300 moxie v850

so if you're using one of those, it'd be something like:
  $ gdb <prog>
  (gdb) target sim --watch-pc-int 0x1234
  (gdb) load
  (gdb) run

that said, it appears to have a few bugs.  i'm not sure how well it's
tested :).  g'luck!
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-01-13  5:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29  2:29 William Tambe
2020-09-29  8:46 ` Andrew Burgess
2021-01-13  5:46   ` Mike Frysinger [this message]
2021-01-13 11:08     ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210113054649.GC6938@vapier \
    --to=vapier@gentoo.org \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb@sourceware.org \
    --cc=tambewilliam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).