From: Daniel Jacobowitz <drow@false.org>
To: Jon Ringle <jon.ringle@comdial.com>
Cc: gdb@sources.redhat.com
Subject: Re: Writing regs to corefile
Date: Tue, 26 Apr 2005 01:29:00 -0000 [thread overview]
Message-ID: <20050426003139.GA1133@nevyn.them.org> (raw)
In-Reply-To: <200504252002.33948.jon.ringle@comdial.com>
On Mon, Apr 25, 2005 at 08:02:33PM -0400, Jon Ringle wrote:
> On Monday 25 April 2005 17:45, Daniel Jacobowitz wrote:
> > On Mon, Apr 25, 2005 at 04:51:09PM -0400, Jon Ringle wrote:
> > > > > I can't seem to write directly to the core file register set from
> > > > > within gdb (which is why I was hand editing the core file):
> > > > > (gdb) set $r0 = 0xffffffe4
> > > > > You can't do that without a process to debug.
> > > >
> > > > Yeah. This is a bit unfortunate. Maybe we should allow the loaded
> > > > copy of the registers to be changed.
> > >
> > > I was looking at corelow.c to see if I could add a
> > > core_ops.to_store_registers function to do just that. However, the first
> > > problem I encountered is that the to_store_registers definition seems to
> > > only have a regno parameter. How do I get access to the value of regno to
> > > be stored?
> >
> > From the register cache. You probably don't need to do anything in
> > your dummy to_store_registers routine.
>
> Ok, I created a dummy to_store_registers and a dummy to_prepare_to_store in
> corelow.c. Now I don't get the error message, but setting a register doesn't
> seem to reflect a change:
>
> (gdb) p/x $r0
> $1 = 0xbee0244c
> (gdb) set $r0=0x1234
> (gdb) p/x $r0
> $2 = 0xbee0244c
Dunno; probably you need to change the way to_fetch_registers works.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-04-26 0:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-25 20:42 Jon Ringle
2005-04-25 20:51 ` Daniel Jacobowitz
2005-04-25 21:48 ` Jon Ringle
2005-04-26 0:13 ` Daniel Jacobowitz
2005-04-26 0:31 ` Jon Ringle
2005-04-26 1:29 ` Daniel Jacobowitz [this message]
2005-04-26 8:16 ` Jon Ringle
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=20050426003139.GA1133@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=jon.ringle@comdial.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