From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68696 invoked by alias); 4 Jun 2015 13:51:20 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 68669 invoked by uid 48); 4 Jun 2015 13:51:19 -0000 From: "arma2ff0 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/13000] Return value with -batch is always 0 Date: Thu, 04 Jun 2015 13:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 7.9 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: arma2ff0 at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: version Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q2/txt/msg00376.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=13000 Armando changed: What |Removed |Added ---------------------------------------------------------------------------- Version|7.2 |7.9 --- Comment #3 from Armando --- 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.