This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/18488] New: gdb -batch exits with code 0 when there's a command error


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]