Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* GDB return code and batch mode
@ 2011-07-12 21:08 Michel METZGER
  2011-07-13 19:39 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Michel METZGER @ 2011-07-12 21:08 UTC (permalink / raw)
  To: gdb

Hi,

I'm probably missing something here, the question is: what is it? ;)

According to the documentation, -batch has the following effect: 
"Exit with status 0 after processing all the command files specified with `-x' (and all commands from initialization files, if not inhibited with `-n'). Exit with nonzero status if an error occurs in executing the gdb commands in the command files."

A quick test:
$ gdb -batch -x "gdb.script"

with a file gdb.script containing the line:
file toto

(of course toto doesn't exist, to raise an error).

The output is:
gdb.script:1: Error in sourced command file:
toto: No such file or directory.
$ echo $?
0

Ideas? 

Regards,

Michel Metzger.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GDB return code and batch mode
  2011-07-12 21:08 GDB return code and batch mode Michel METZGER
@ 2011-07-13 19:39 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2011-07-13 19:39 UTC (permalink / raw)
  To: Michel METZGER; +Cc: gdb

>>>>> "Michel" == Michel METZGER <michel.metzger@st.com> writes:

Michel> According to the documentation, -batch has the following effect: 
Michel> "Exit with status 0 after processing all the command files specified
Michel> with `-x' (and all commands from initialization files, if not
Michel> inhibited with `-n'). Exit with nonzero status if an error occurs in
Michel> executing the gdb commands in the command files."

Michel> Ideas? 

Looks like a bug.

Tom


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-07-13 19:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-12 21:08 GDB return code and batch mode Michel METZGER
2011-07-13 19:39 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox