michel.metzger at st dot com
2011-07-13 20:43:39 UTC
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: ***@sourceware.org
ReportedBy: ***@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
Summary: Return value with -batch is always 0
Product: gdb
Version: 7.2
Status: NEW
Severity: normal
Priority: P2
Component: gdb
AssignedTo: ***@sourceware.org
ReportedBy: ***@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.
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.