Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Robert Norton" <rnorton@broadcom.com>
To: gdb@sourceware.org
Subject: Loading a Core File
Date: Fri, 06 Jul 2007 11:26:00 -0000	[thread overview]
Message-ID: <B0D822BFECD50F4991F2516EA50F273C01E4DFEA@NT-IRVA-0752.brcm.ad.broadcom.com> (raw)

Hi,
 
Our built in simulator (using remote-sim.c) has the ability to load core
files via a custom command 'sim loadcore'. This causes the simulator to
load all the state from the core file, but it doesn't but GDB into a
state which is suitable for examining core files. We can do this with
some trickery to fool gdb into thinking it is in a running state e.g.:
 
target sim
load
break main
run
sim loadcore <corefile>
 
But this is arcane and doesn't result in a completely consistent state
e.g. some things are still cached by gdb which isn't aware that memory /
registers have just changed under its feet. I borrowed the following
from corelow.c:

      target_fetch_registers (-1);
 
      /* Now, set up the frame cache, and print the top of stack.  */
      flush_cached_frames ();
      select_frame (get_current_frame ());
 
But it's not a complete solution. What is the 'proper' way of doing core
files in gdb? What is involved in getting it to work via 'target core'?
 
Many thanks,
 
Robert


             reply	other threads:[~2007-07-06 11:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-06 11:26 Robert Norton [this message]
2007-07-06 12:03 ` Daniel Jacobowitz

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=B0D822BFECD50F4991F2516EA50F273C01E4DFEA@NT-IRVA-0752.brcm.ad.broadcom.com \
    --to=rnorton@broadcom.com \
    --cc=gdb@sourceware.org \
    /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