From: "Maucci, Cyrille" <cyrille.maucci@hp.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Cc: "Maucci, Cyrille" <cyrille.maucci@hp.com>
Subject: working around batch mode command errors
Date: Sun, 28 Oct 2012 22:28:00 -0000 [thread overview]
Message-ID: <7D0928B9A8397D4B9E2F9E5FFFB8D860027BED37@G6W2492.americas.hpqcorp.net> (raw)
Hello gdb'ers,
I've got a batch script that is meant to be invoked on customer production systems, should a process dump a core file. The goal of this script is to quickly and easily collect and send to support people very basic information about the coredump, because :
1- that is often painful and slow to get the core file itself (and dependant libs) out of the system for in depth analysis.
2- most of the time information contained in the script output is enough for the source code owners to understand what the problem is.
So the script looks like this:
set pagination off
info sharedlibrary
info threads
up 128
info args
info locals
frame 0
info source
info args
info locals
info frame
info all-registers
print *this
thread apply all bt
thread apply all bt full
quit
One of the problem I have is that when frame 0 is not C++ code, "print *this" fails and the script aborts with the following error
Error in sourced command file:
No symbol "this" in current context.
And therefore all subsequent commands are not executed.
I wanted to know if there would be any possiblity to avoid halting on such errors.
An aside question would be is there any built-in commands allowing to do something like
for each frame do
info source
info args
info locals
info frame
info all-registers
print *this
done
Thanks a bunch for your help
++Cyrille
next reply other threads:[~2012-10-28 22:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-28 22:28 Maucci, Cyrille [this message]
2012-10-30 17:27 ` Jan Kratochvil
2012-10-30 17:39 ` Pedro Alves
2012-10-30 17:43 ` Tom Tromey
2012-11-01 20:30 ` Doug Evans
2012-11-01 20:38 ` Tom Tromey
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=7D0928B9A8397D4B9E2F9E5FFFB8D860027BED37@G6W2492.americas.hpqcorp.net \
--to=cyrille.maucci@hp.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