public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/13000] New: Return value with -batch is always 0
@ 2011-07-13 20:44 michel.metzger at st dot com
  2014-06-25 12:23 ` [Bug gdb/13000] " tuben at lysator dot liu.se
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: michel.metzger at st dot com @ 2011-07-13 20:44 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13000

           Summary: Return value with -batch is always 0
           Product: gdb
           Version: 7.2
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: michel.metzger@st.com
              Host: pc-linux-gnu
            Target: i686


The documentation states -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."

The following test demonstrates that it is in fact not the case:

$ 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.

Displaying the exit status shows that is is in fact 0.
$ echo $?
0

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2023-12-31 12:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13 20:44 [Bug gdb/13000] New: Return value with -batch is always 0 michel.metzger at st dot com
2014-06-25 12:23 ` [Bug gdb/13000] " tuben at lysator dot liu.se
2015-06-04 13:35 ` arma2ff0 at gmail dot com
2015-06-04 13:51 ` arma2ff0 at gmail dot com
2015-06-04 18:12 ` dje at google dot com
2015-06-05 11:50 ` arma2ff0 at gmail dot com
2023-12-31 12:23 ` ssbssa at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).