public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "dje at google dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/18488] New: gdb -batch exits with code 0 when there's a command error
Date: Thu, 04 Jun 2015 15:54:00 -0000	[thread overview]
Message-ID: <bug-18488-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=18488

            Bug ID: 18488
           Summary: gdb -batch exits with code 0 when there's a command
                    error
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: dje at google dot com
  Target Milestone: ---

The docs say this:

'-batch'
     Run in batch mode.  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.  Batch mode also disables pagination, sets
     unlimited terminal width and height see Screen Size, and acts
     as if 'set confirm off' were in effect (see Messages/Warnings).

bash$ gdb -batch -ex foo
Undefined command: "foo".  Try "help".
bash$ echo $?
0

-- 
You are receiving this mail because:
You are on the CC list for the bug.


             reply	other threads:[~2015-06-04 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04 15:54 dje at google dot com [this message]
2015-06-04 18:12 ` [Bug gdb/18488] " dje at google dot com

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=bug-18488-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).