aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-07-03 15:58:42 +0000
committerDaniel Jacobowitz <drow@false.org>2007-07-03 15:58:42 +0000
commit2bbe3cc10734408c859d08bae15039c6e7ccecf9 (patch)
treeabcdcf2e97d3725a752f8a722e5d5caa15059852 /gdb/gdbserver
parent9f43d28cb0b3e1e8fa7c4017c81b9ef81843ab4d (diff)
downloadgdb-2bbe3cc10734408c859d08bae15039c6e7ccecf9.zip
gdb-2bbe3cc10734408c859d08bae15039c6e7ccecf9.tar.gz
gdb-2bbe3cc10734408c859d08bae15039c6e7ccecf9.tar.bz2
2007-07-03 Paul Gilliam <pgilliam@us.ibm.com>
Thiago Bauermann <bauerman@br.ibm.com> Joseph S. Myers <joseph@codesourcery.com> Daniel Jacobowitz <dan@codesourcery.com> gdb/ * remote.c (remote_check_symbols): Use gdbarch_convert_from_func_ptr_addr. * infcall.c (find_function_addr): Handle function descriptors without debugging information. * ppc-linux-tdep.c (ppc_linux_convert_from_func_ptr_addr): Renamed from ppc64_linux_convert_from_func_ptr_addr. Handle -msecure-plt. (ppc_linux_init_abi): Always set convert_from_func_ptr_addr. * solib-svr4.c (solib_break_names): Remove "._dl_debug_state". (bfd_lookup_symbol): Do not take a SECT_FLAGS argument. Always allow SEC_CODE and SEC_DATA. (enable_break): Update calls. Pass current_target to solib_add. Use gdbarch_convert_from_func_ptr_addr. gdb/gdbserver/ * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog4
-rw-r--r--gdb/gdbserver/remote-utils.c33
2 files changed, 30 insertions, 7 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 7b78653..c5a7b4a 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,7 @@
+2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
+
2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
* inferiors.c (change_inferior_id): Add comment.
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index 9559148..9c407aa 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -1109,15 +1109,34 @@ look_up_one_symbol (const char *name, CORE_ADDR *addrp)
if (len < 0)
return -1;
+ /* We ought to handle pretty much any packet at this point while we
+ wait for the qSymbol "response". That requires re-entering the
+ main loop. For now, this is an adequate approximation; allow
+ GDB to read from memory while it figures out the address of the
+ symbol. */
+ while (own_buf[0] == 'm')
+ {
+ CORE_ADDR mem_addr;
+ unsigned char *mem_buf;
+ unsigned int mem_len;
+
+ decode_m_packet (&own_buf[1], &mem_addr, &mem_len);
+ mem_buf = malloc (mem_len);
+ if (read_inferior_memory (mem_addr, mem_buf, mem_len) == 0)
+ convert_int_to_ascii (mem_buf, own_buf, mem_len);
+ else
+ write_enn (own_buf);
+ free (mem_buf);
+ if (putpkt (own_buf) < 0)
+ return -1;
+ len = getpkt (own_buf);
+ if (len < 0)
+ return -1;
+ }
+
if (strncmp (own_buf, "qSymbol:", strlen ("qSymbol:")) != 0)
{
- /* Malformed response. */
- if (remote_debug)
- {
- fprintf (stderr, "Malformed response to qSymbol, ignoring.\n");
- fflush (stderr);
- }
-
+ warning ("Malformed response to qSymbol, ignoring: %s\n", own_buf);
return -1;
}