From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: "nagaraju.m" <nagaraju.m@redpinesignals.com>, gdb@sourceware.org
Subject: Re: gdb script
Date: Thu, 23 Jul 2009 00:34:00 -0000 [thread overview]
Message-ID: <8ac60eac0907221734i18c1aa12sae62b0f2de115f32@mail.gmail.com> (raw)
In-Reply-To: <20090722213048.GD4952@adacore.com>
On Wed, Jul 22, 2009 at 2:30 PM, Joel Brobecker<brobecker@adacore.com> wrote:
>> *can any one please help me out why gdb is not giving control back to
>> script
>
> That's actually the documented behavior.
Really? I thought script execution stopped only on errors:
Node: Command Files
An error in any command terminates execution of the command
file and control is returned to the console.
Anyway, this seems to work for me:
cat t.c
int main() { return 0; }
gcc -g t.c
cat gdb.cmd
break main
run
info reg
quit
gdb -q -nx -x gdb.cmd ./a.out
Breakpoint 1 at 0x40044c: file t.c, line 1.
Breakpoint 1, main () at t.c:1
1 int main() { return 0; }
rax 0x7ffff7ddca60 140737351895648
rbx 0x7ffff7ffdc00 140737354128384
rcx 0x400470 4195440
rdx 0x7fffffffdb88 140737488345992
rsi 0x7fffffffdb78 140737488345976
rdi 0x1 1
rbp 0x7fffffffda90 0x7fffffffda90
rsp 0x7fffffffda90 0x7fffffffda90
r8 0x7ffff7ddb2e0 140737351889632
r9 0x7ffff7dee580 140737351968128
r10 0x0 0
r11 0x7ffff7a9c0d0 140737348485328
r12 0x0 0
r13 0x7fffffffdb70 140737488345968
r14 0x0 0
r15 0x0 0
rip 0x40044c 0x40044c <main+4>
eflags 0x246 [ PF ZF IF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
fctrl 0x37f 895
fstat 0x0 0
ftag 0xffff 65535
fiseg 0x0 0
fioff 0x0 0
foseg 0x0 0
fooff 0x0 0
fop 0x0 0
mxcsr 0x1f80 [ IM DM ZM OM UM PM ]
The program is running. Exit anyway? (y or n) [answered Y; input not
from terminal]
--
Paul Pluzhnikov
next prev parent reply other threads:[~2009-07-23 0:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-22 13:07 nagaraju.m
2009-07-22 21:30 ` Joel Brobecker
2009-07-23 0:34 ` Paul Pluzhnikov [this message]
2009-07-23 1:53 ` Joel Brobecker
2009-07-24 6:18 ` nagaraju.m
2009-07-24 6:39 ` Paul Pluzhnikov
2009-07-24 9:50 ` nagaraju.m
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=8ac60eac0907221734i18c1aa12sae62b0f2de115f32@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
--cc=nagaraju.m@redpinesignals.com \
/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