Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@codesourcery.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: dan clark <2clarkd@gmail.com>, gdb@sourceware.org
Subject: Re: setting cooked registers desirable feature for coredump analysis but results in error
Date: Tue, 08 Feb 2011 20:47:00 -0000	[thread overview]
Message-ID: <20110208204650.GA5732@caradoc.them.org> (raw)
In-Reply-To: <20110208195334.GA14914@host1.dyn.jankratochvil.net>

On Tue, Feb 08, 2011 at 08:53:34PM +0100, Jan Kratochvil wrote:
> Hello Dan,
> 
> On Mon, 07 Feb 2011 20:01:46 +0100, dan clark wrote:
> > An interesting debug scenario occurs when either a stack is corrupted
> 
> the GDB `frame' command supports syntax `frame FRAMEADDR' and
> `frame FRAMEADDR PCADDR' where FRAMEADDR should be $sp in the caller.
> See the doc, this is exactly its purpose.  It behaved a bit erratically now to
> me on x86_64.

IMO, what Dan describes is generally useful.  I'd like to be able to
modify both registers and memory during core file debugging, without
having to deal with "set write".

One way to do this would be with a new layered target.  On top of
"target core", add a "target scratchpad" or whatever other name you
like.  Then you can discard the scratchpad to get your original
program back.

This is very useful.  For instance, suppose you're pretty-printing a
variable that's slightly corrupt; you can manually un-corrupt it for
inspection.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2011-02-08 20:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 19:01 dan clark
2011-02-08 19:53 ` Jan Kratochvil
2011-02-08 20:47   ` Daniel Jacobowitz [this message]
2011-02-09 21:31   ` dan clark

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=20110208204650.GA5732@caradoc.them.org \
    --to=dan@codesourcery.com \
    --cc=2clarkd@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=jan.kratochvil@redhat.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