aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-09-27 13:23:32 +0000
committerPedro Alves <palves@redhat.com>2013-09-27 13:23:32 +0000
commit5b5596ff6b245d165956649a81ba5e6628579c39 (patch)
treecb17eaacefb6c34eeacefcc4553f69f1908b9e35 /gdb
parent86a367af41ed1121021a4fd9f131378b638aca62 (diff)
downloadgdb-5b5596ff6b245d165956649a81ba5e6628579c39.zip
gdb-5b5596ff6b245d165956649a81ba5e6628579c39.tar.gz
gdb-5b5596ff6b245d165956649a81ba5e6628579c39.tar.bz2
remote.c: Remove unnecessary fields from 'struct stop_reply'.
I noticed these fields aren't really necessary -- if the T stop reply indicated any we have any special event, the fallthrough doesn't really do anything. Tested on x86_64 Fedora 17 w/ local gdbserver, and also confirmed "catch load" against a Windows gdbserver running under Wine, which exercises TARGET_WAITKIND_LOADED, still works as expected. gdb/ 2013-09-27 Pedro Alves <palves@redhat.com> * remote.c (struct stop_reply) <solibs_changed, replay_event>: Delete fields. (remote_parse_stop_reply): Adjust, setting event->ws.kind directly.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/remote.c31
2 files changed, 18 insertions, 20 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a906fe9..555dc3f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2013-09-27 Pedro Alves <palves@redhat.com>
+
+ * remote.c (struct stop_reply) <solibs_changed, replay_event>:
+ Delete fields.
+ (remote_parse_stop_reply): Adjust, setting event->ws.kind
+ directly.
+
2013-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix set debug frame output.
diff --git a/gdb/remote.c b/gdb/remote.c
index 2e116d9..0fa1e2b 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -5284,9 +5284,6 @@ typedef struct stop_reply
int stopped_by_watchpoint_p;
CORE_ADDR watch_data_address;
- int solibs_changed;
- int replay_event;
-
int core;
} *stop_reply_p;
@@ -5546,8 +5543,6 @@ remote_parse_stop_reply (char *buf, struct stop_reply *event)
event->ptid = null_ptid;
event->ws.kind = TARGET_WAITKIND_IGNORE;
event->ws.value.integer = 0;
- event->solibs_changed = 0;
- event->replay_event = 0;
event->stopped_by_watchpoint_p = 0;
event->regcache = NULL;
event->core = -1;
@@ -5611,15 +5606,14 @@ Packet: '%s'\n"),
while (*p_temp && *p_temp != ';')
p_temp++;
- event->solibs_changed = 1;
+ event->ws.kind = TARGET_WAITKIND_LOADED;
p = p_temp;
}
else if (strncmp (p, "replaylog", p1 - p) == 0)
{
- /* NO_HISTORY event.
- p1 will indicate "begin" or "end", but
- it makes no difference for now, so ignore it. */
- event->replay_event = 1;
+ event->ws.kind = TARGET_WAITKIND_NO_HISTORY;
+ /* p1 will indicate "begin" or "end", but it makes
+ no difference for now, so ignore it. */
p_temp = strchr (p1 + 1, ';');
if (p_temp)
p = p_temp;
@@ -5675,18 +5669,15 @@ Packet: '%s'\n"),
buf, p);
++p;
}
+
+ if (event->ws.kind != TARGET_WAITKIND_IGNORE)
+ break;
+
/* fall through */
case 'S': /* Old style status, just signal only. */
- if (event->solibs_changed)
- event->ws.kind = TARGET_WAITKIND_LOADED;
- else if (event->replay_event)
- event->ws.kind = TARGET_WAITKIND_NO_HISTORY;
- else
- {
- event->ws.kind = TARGET_WAITKIND_STOPPED;
- event->ws.value.sig = (enum gdb_signal)
- (((fromhex (buf[1])) << 4) + (fromhex (buf[2])));
- }
+ event->ws.kind = TARGET_WAITKIND_STOPPED;
+ event->ws.value.sig = (enum gdb_signal)
+ (((fromhex (buf[1])) << 4) + (fromhex (buf[2])));
break;
case 'W': /* Target exited. */
case 'X':