summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-05-08 20:19:58 +0000
committerDaniel Jacobowitz <drow@false.org>2006-05-08 20:19:58 +0000
commit62ceabe675918c1302eed696ad1989e60f0ee908 (patch)
tree5cd72fdce77fa265cbedd2b614282fc7a9207970
parent39d36a123e02665bd6fab06f3e9481cfde0e0c4a (diff)
downloadbinutils-gdb-62ceabe675918c1302eed696ad1989e60f0ee908.tar.gz
* gdb/remote.c (remote_get_shared_libraries): Check for NULL ops.
(remote_wait): Handle ",nop" on DLL packets and "dll:dll" response.
-rw-r--r--ChangeLog.csl5
-rw-r--r--gdb/remote.c49
2 files changed, 48 insertions, 6 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index f1c9837711c..0b49e239da2 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,5 +1,10 @@
2006-05-08 Daniel Jacobowitz <dan@codesourcery.com>
+ * gdb/remote.c (remote_get_shared_libraries): Check for NULL ops.
+ (remote_wait): Handle ",nop" on DLL packets and "dll:dll" response.
+
+2006-05-08 Daniel Jacobowitz <dan@codesourcery.com>
+
* gdb/solib-target.c (solib_target_remove_one_solib): Correct loop
logic.
diff --git a/gdb/remote.c b/gdb/remote.c
index a5a6f841911..53da04d9810 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -2155,7 +2155,11 @@ remote_get_shared_libraries (struct target_ops *ops)
return;
}
- if (added)
+ /* If OPS is set, we were called from the target vector and should handle
+ adding shared libraries now. If it is NULL, we were called as part of
+ a TARGET_WAITKIND_LOADED event, and the libraries will be added momentarily,
+ so we don't need to do it now. */
+ if (added && ops != NULL)
{
#ifdef SOLIB_ADD
SOLIB_ADD (NULL, 0, &current_target, auto_solib_add);
@@ -3270,9 +3274,19 @@ Packet: '%s'\n"),
while (*p_temp && *p_temp != ';')
p_temp++;
- parse_load_response (p1, p_temp, 1);
+ if (p_temp - p1 > 4
+ && strncmp (p_temp - 4, ",nop", 4) == 0)
+ {
+ /* For now, ignore no-op unload events. Later,
+ maybe report them? */
+ }
+ else
+ {
+ parse_load_response (p1, p_temp, 1);
+
+ solibs_changed = 1;
+ }
- solibs_changed = 1;
p = p_temp;
}
else if (strncmp (p, "unload", p1 - p) == 0)
@@ -3282,9 +3296,29 @@ Packet: '%s'\n"),
while (*p_temp && *p_temp != ';')
p_temp++;
- parse_load_response (p1, p_temp, 0);
+ if (p_temp - p1 > 4
+ && strncmp (p_temp - 4, ",nop", 4) == 0)
+ {
+ /* For now, ignore no-op unload events. Later,
+ maybe report them? */
+ }
+ else
+ {
+ parse_load_response (p1, p_temp, 0);
+
+ solibs_changed = 1;
+ }
- solibs_changed = 1;
+ p = p_temp;
+ }
+ else if (strncmp (p, "dll", p1 - p) == 0)
+ {
+ p1++;
+ p_temp = p1;
+ while (*p_temp && *p_temp != ';')
+ p_temp++;
+
+ solibs_changed = -1;
p = p_temp;
}
else
@@ -3378,7 +3412,10 @@ Packet: '%s'\n"),
}
}
got_status:
- if (solibs_changed)
+ if (solibs_changed == -1)
+ remote_get_shared_libraries (NULL);
+
+ if (solibs_changed != 0)
status->kind = TARGET_WAITKIND_LOADED;
if (thread_num != -1)