From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96851 invoked by alias); 25 Feb 2015 13:25:25 -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 96825 invoked by uid 48); 25 Feb 2015 13:25:24 -0000 From: "tom_van at users dot sourceforge.net" To: gdb-prs@sourceware.org Subject: [Bug remote/18024] New: non-stop mode notification from server sometimes not handled properly Date: Wed, 25 Feb 2015 13:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote X-Bugzilla-Version: 7.9 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tom_van at users dot sourceforge.net X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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-q1/txt/msg00305.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18024 Bug ID: 18024 Summary: non-stop mode notification from server sometimes not handled properly Product: gdb Version: 7.9 Status: NEW Severity: normal Priority: P2 Component: remote Assignee: unassigned at sourceware dot org Reporter: tom_van at users dot sourceforge.net GNU gdb (GDB) 7.9.50.20150225-cvs This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-none-eabi". In non-stop mode gdb sometimes shows an error on receive of notification %Stop:T05.... Inspection of remoce.c shows obvious problem in handle_notification call. At remote.c:7368 handle_notification() is correctly called with rs->buf pointing to the first char after '%'. At remote.c:7757 handle_notification() called with *buf pointing to a leading '%' and therefore packet not handled correctly. Proposed patch ----------------- --- a/gdb/remote.c +++ b/gdb/remote.c @@ -7751,7 +7751,7 @@ getpkt_or_notif_sane_1 (char **buf, long *sizeof_buf, int forever, if (is_notif != NULL) *is_notif = 1; - handle_notification (rs->notif_state, *buf); + handle_notification (rs->notif_state, (*buf) + 1); /* Notifications require no acknowledgement. */ -- You are receiving this mail because: You are on the CC list for the bug.