* Attaching and inspecting crash with gdb
@ 2004-11-01 11:04 Devrim Erdem
2004-11-01 11:34 ` Marco Molteni
2004-11-01 21:20 ` Eli Zaretskii
0 siblings, 2 replies; 6+ messages in thread
From: Devrim Erdem @ 2004-11-01 11:04 UTC (permalink / raw)
To: gdb
Hello,
Classic problem. Customer uses software heavily. Software crashes from
time to time. No core dumps.
Is there a way of attaching and application and ask gdb to write a
core dump ( or any kind of dump of data ) which I could later load in
gdb to debug the problem remotely.
If this is not possible, I will need to implement my current solution.
The current not so elegant way:
=============================
In my crash crash handler, I simply run a small python script which
attaches gdb to the currently crashed application.
So far I can use the command line argument "--command" to specify
commands like printing the current stack trace. But I need more
information about the crash such as the value of data at the point of
crash.
I would like to be able to tell gdb to do:
For each thread
For each frame ( n to 0 )
print values of all data of the current frame
Then the user sends this text to me and then I can try to figure out
the problem.
But at the moment I can not tell gdb to do a "for" loop for threads
and frames. Is this possible or is there another way of getting the
same kind of information.
Thanks in advance,
Devrim.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Attaching and inspecting crash with gdb
2004-11-01 11:04 Attaching and inspecting crash with gdb Devrim Erdem
@ 2004-11-01 11:34 ` Marco Molteni
2004-11-01 14:07 ` Daniel Jacobowitz
2004-11-01 21:20 ` Eli Zaretskii
1 sibling, 1 reply; 6+ messages in thread
From: Marco Molteni @ 2004-11-01 11:34 UTC (permalink / raw)
To: Devrim Erdem; +Cc: gdb
On Mon, 1 Nov 2004 12:03:58 +0100
Devrim Erdem <devrim.erdem@gmail.com> wrote:
> Is there a way of attaching and application and ask gdb to write a
> core dump ( or any kind of dump of data ) which I could later load in
> gdb to debug the problem remotely.
On BSD systems (don't know about others) there is gcore
http://www.freebsd.org/cgi/man.cgi?query=gcore
marco
--
panic("The moon has moved again.");
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Attaching and inspecting crash with gdb
2004-11-01 11:34 ` Marco Molteni
@ 2004-11-01 14:07 ` Daniel Jacobowitz
2004-11-01 14:26 ` Devrim Erdem
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2004-11-01 14:07 UTC (permalink / raw)
To: Marco Molteni; +Cc: Devrim Erdem, gdb
On Mon, Nov 01, 2004 at 12:32:34PM +0100, Marco Molteni wrote:
> On Mon, 1 Nov 2004 12:03:58 +0100
> Devrim Erdem <devrim.erdem@gmail.com> wrote:
>
> > Is there a way of attaching and application and ask gdb to write a
> > core dump ( or any kind of dump of data ) which I could later load in
> > gdb to debug the problem remotely.
>
> On BSD systems (don't know about others) there is gcore
> http://www.freebsd.org/cgi/man.cgi?query=gcore
It is also provided by recent versions of GDB on a number of systems.
Devrim, take a look at the "generate-core-file" command.
--
Daniel Jacobowitz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Attaching and inspecting crash with gdb
2004-11-01 14:07 ` Daniel Jacobowitz
@ 2004-11-01 14:26 ` Devrim Erdem
0 siblings, 0 replies; 6+ messages in thread
From: Devrim Erdem @ 2004-11-01 14:26 UTC (permalink / raw)
To: Marco Molteni, Devrim Erdem, gdb
I have just tried to use the generate-core-file function with 5.2.1.
I attached to the crashed application and saved a core file. This
works fine. Then I start gdb with this core and the same executable
like :
gdb myExec core.13979
I get the warning :
warning: core file may not match the specified executable file.
Then I get messages like :
Cannot access memory at address 0xbf7ff954
when I use frame or where commands.
Any hints maybe for this problem ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Attaching and inspecting crash with gdb
2004-11-01 11:04 Attaching and inspecting crash with gdb Devrim Erdem
2004-11-01 11:34 ` Marco Molteni
@ 2004-11-01 21:20 ` Eli Zaretskii
[not found] ` <ba9d846304110206473dfc3a5@mail.gmail.com>
1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2004-11-01 21:20 UTC (permalink / raw)
To: Devrim Erdem; +Cc: gdb
> Date: Mon, 1 Nov 2004 12:03:58 +0100
> From: Devrim Erdem <devrim.erdem@gmail.com>
>
> Classic problem. Customer uses software heavily. Software crashes from
> time to time. No core dumps.
Why ``no core dumps''? It's easier to cause them than to look for
other solutions, in my experience. Then the customer could send you
the core file, and you could debug the problem at your place.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-11-02 19:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-01 11:04 Attaching and inspecting crash with gdb Devrim Erdem
2004-11-01 11:34 ` Marco Molteni
2004-11-01 14:07 ` Daniel Jacobowitz
2004-11-01 14:26 ` Devrim Erdem
2004-11-01 21:20 ` Eli Zaretskii
[not found] ` <ba9d846304110206473dfc3a5@mail.gmail.com>
2004-11-02 19:21 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox