* Reconstructing corrupt stacks/patching frame pointers [not found] <2108A3A691C70B41B22A8C5ED3725423024DA3F9@sjcpexch02.citrite.net> @ 2008-12-09 23:28 ` Eric Cooper 2008-12-10 23:20 ` Michael Snyder 0 siblings, 1 reply; 7+ messages in thread From: Eric Cooper @ 2008-12-09 23:28 UTC (permalink / raw) To: gdb Hello, I have a kernel core dump with a corrupt stack and I can identify the stack location that is corrupted and what it should be and I want to write the correct frame pointer to the stack so that bt and frame x work. I have tried that using the "set" command and it says: kvm_write not implemented for dead kernels. I see this code is in kvm-fbsd.c (I am using BSD) and I have hacked around a little bit to allow the write but ultimately it fails on writes to /dev/kmem. Is there a reasonable way to do what I want to achieve? Thanks in advance, Eric ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Reconstructing corrupt stacks/patching frame pointers 2008-12-09 23:28 ` Reconstructing corrupt stacks/patching frame pointers Eric Cooper @ 2008-12-10 23:20 ` Michael Snyder 2008-12-11 2:33 ` Daniel Jacobowitz 0 siblings, 1 reply; 7+ messages in thread From: Michael Snyder @ 2008-12-10 23:20 UTC (permalink / raw) To: Eric Cooper; +Cc: gdb Eric Cooper wrote: > Hello, > I have a kernel core dump with a corrupt stack and I can identify the stack location that is corrupted and what it should be and I want to write the correct frame pointer to the stack so that bt and frame x work. I have tried that using the "set" command and it says: > kvm_write not implemented for dead kernels. > > I see this code is in kvm-fbsd.c (I am using BSD) and I have hacked around a little bit to allow the write but ultimately it fails on writes to /dev/kmem. Is there a reasonable way to do what I want to achieve? I presume this is a core dump from a Free BSD system. Unfortunately, for the most part, the folks here in the gdb maintainer group don't play a very active role in maintaining the bits for gdb on BSD. Somebody may correct me if I'm wrong... You may need to approach the Free BSD community for this. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Reconstructing corrupt stacks/patching frame pointers 2008-12-10 23:20 ` Michael Snyder @ 2008-12-11 2:33 ` Daniel Jacobowitz 2008-12-11 18:05 ` Michael Snyder 0 siblings, 1 reply; 7+ messages in thread From: Daniel Jacobowitz @ 2008-12-11 2:33 UTC (permalink / raw) To: Michael Snyder; +Cc: Eric Cooper, gdb On Wed, Dec 10, 2008 at 03:16:32PM -0800, Michael Snyder wrote: > I presume this is a core dump from a Free BSD system. > > Unfortunately, for the most part, the folks here in the gdb > maintainer group don't play a very active role in maintaining > the bits for gdb on BSD. Somebody may correct me if I'm wrong... > > You may need to approach the Free BSD community for this. Well, Mark Kettenis does. But the problem is general to all core files; I've seen requests to change the $sp in Linux corefiles too. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Reconstructing corrupt stacks/patching frame pointers 2008-12-11 2:33 ` Daniel Jacobowitz @ 2008-12-11 18:05 ` Michael Snyder 2008-12-11 18:19 ` Daniel Jacobowitz 0 siblings, 1 reply; 7+ messages in thread From: Michael Snyder @ 2008-12-11 18:05 UTC (permalink / raw) To: Michael Snyder, Eric Cooper, gdb Daniel Jacobowitz wrote: > On Wed, Dec 10, 2008 at 03:16:32PM -0800, Michael Snyder wrote: >> I presume this is a core dump from a Free BSD system. >> >> Unfortunately, for the most part, the folks here in the gdb >> maintainer group don't play a very active role in maintaining >> the bits for gdb on BSD. Somebody may correct me if I'm wrong... >> >> You may need to approach the Free BSD community for this. > > Well, Mark Kettenis does. But the problem is general to all core > files; I've seen requests to change the $sp in Linux corefiles too. It might be possible with a normal elf core file. I know there is a mode that allows gdb to treat a corefile as read-write. Lemme see... here it is: "help set write". Don't know whether it works for registers... Don't know whether it works with fbsd kgdb... ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Reconstructing corrupt stacks/patching frame pointers 2008-12-11 18:05 ` Michael Snyder @ 2008-12-11 18:19 ` Daniel Jacobowitz 2008-12-12 0:17 ` Michael Snyder 0 siblings, 1 reply; 7+ messages in thread From: Daniel Jacobowitz @ 2008-12-11 18:19 UTC (permalink / raw) To: Michael Snyder; +Cc: Eric Cooper, gdb On Thu, Dec 11, 2008 at 10:01:01AM -0800, Michael Snyder wrote: > Don't know whether it works for registers... It doesn't yet. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Reconstructing corrupt stacks/patching frame pointers 2008-12-11 18:19 ` Daniel Jacobowitz @ 2008-12-12 0:17 ` Michael Snyder 2008-12-12 1:04 ` Daniel Jacobowitz 0 siblings, 1 reply; 7+ messages in thread From: Michael Snyder @ 2008-12-12 0:17 UTC (permalink / raw) To: Michael Snyder, Eric Cooper, gdb Daniel Jacobowitz wrote: > On Thu, Dec 11, 2008 at 10:01:01AM -0800, Michael Snyder wrote: >> Don't know whether it works for registers... > > It doesn't yet. Does that mean you're working on it? If not, I might look into it myself... ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Reconstructing corrupt stacks/patching frame pointers 2008-12-12 0:17 ` Michael Snyder @ 2008-12-12 1:04 ` Daniel Jacobowitz 0 siblings, 0 replies; 7+ messages in thread From: Daniel Jacobowitz @ 2008-12-12 1:04 UTC (permalink / raw) To: Michael Snyder; +Cc: Eric Cooper, gdb On Thu, Dec 11, 2008 at 04:12:43PM -0800, Michael Snyder wrote: > Daniel Jacobowitz wrote: >> On Thu, Dec 11, 2008 at 10:01:01AM -0800, Michael Snyder wrote: >>> Don't know whether it works for registers... >> >> It doesn't yet. > > Does that mean you're working on it? No, just that someone ought to. I don't think tieing it to 'set write' is the best idea; I'd like to be able to poke around, without having to make a copy of the core dump. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-12-12 1:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <2108A3A691C70B41B22A8C5ED3725423024DA3F9@sjcpexch02.citrite.net>
2008-12-09 23:28 ` Reconstructing corrupt stacks/patching frame pointers Eric Cooper
2008-12-10 23:20 ` Michael Snyder
2008-12-11 2:33 ` Daniel Jacobowitz
2008-12-11 18:05 ` Michael Snyder
2008-12-11 18:19 ` Daniel Jacobowitz
2008-12-12 0:17 ` Michael Snyder
2008-12-12 1:04 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox