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 remote/18024] New: non-stop mode notification from server sometimes not handled properly


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.


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