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/13000] Return value with -batch is always 0


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

Armando <arma2ff0 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|7.2                         |7.9

--- Comment #3 from Armando <arma2ff0 at gmail dot com> ---
By quick analysis, it looks like the problem resides at line main.c:1137 (I am
looking at the source-code in gdb 7.9.1). It looks to me that the error values
returned by the catch_command_errors_const is ignored. In case of errors, the
file is parsed until the end no matter what, and gdb returns always 0 because
the script was executed until the end.

As a consequence, I believe that quit_force should, at least, return the last
error returned by the catch_command_errors_const, or "1" in case of an error.

If you are interested, I could try to provide a patch.

Thanks && Cheers.
A.

-- 
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]