This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setting cooked registers desirable feature for coredump analysis but results in error


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]