X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fremote.c;h=152ab66ab9dcaacd31862dc074a73e82189d2342;hb=06d3b283b148a3ab8ff85a50fb127973524e700c;hp=f1d071091e7ea2fc8bb8c90633b29398d8dd5c80;hpb=9c5ea4d96566b651eb32f59813b392d5c74b6b65;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/remote.c b/gdb/remote.c index f1d071091e..152ab66ab9 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -2600,7 +2600,11 @@ remote_detach (char *args, int from_tty) /* Tell the remote target to detach. */ strcpy (rs->buf, "D"); - remote_send (&rs->buf, &rs->buf_size); + putpkt (rs->buf); + getpkt (&rs->buf, &rs->buf_size, 0); + + if (rs->buf[0] == 'E') + error (_("Can't detach process.")); /* Unregister the file descriptor from the event loop. */ if (target_is_async_p ()) @@ -4104,12 +4108,6 @@ remote_write_bytes_aux (const char *header, CORE_ADDR memaddr, internal_error (__FILE__, __LINE__, "remote_write_bytes_aux: bad packet format"); - /* Should this be the selected frame? */ - gdbarch_remote_translate_xfer_address (current_gdbarch, - current_regcache, - memaddr, len, - &memaddr, &len); - if (len <= 0) return 0; @@ -4302,12 +4300,6 @@ remote_read_bytes (CORE_ADDR memaddr, gdb_byte *myaddr, int len) int max_buf_size; /* Max size of packet output buffer. */ int origlen; - /* Should this be the selected frame? */ - gdbarch_remote_translate_xfer_address (current_gdbarch, - current_regcache, - memaddr, len, - &memaddr, &len); - if (len <= 0) return 0; @@ -6358,20 +6350,12 @@ build_remote_gdbarch_data (void) remote_address_size = TARGET_ADDR_BIT; } -/* Saved pointer to previous owner of the new_objfile event. */ -static void (*remote_new_objfile_chain) (struct objfile *); - /* Function to be called whenever a new objfile (shlib) is detected. */ static void remote_new_objfile (struct objfile *objfile) { if (remote_desc != 0) /* Have a remote connection. */ - { - remote_check_symbols (objfile); - } - /* Call predecessor on chain, if any. */ - if (remote_new_objfile_chain) - remote_new_objfile_chain (objfile); + remote_check_symbols (objfile); } void @@ -6411,8 +6395,7 @@ _initialize_remote (void) add_target (&extended_async_remote_ops); /* Hook into new objfile notification. */ - remote_new_objfile_chain = deprecated_target_new_objfile_hook; - deprecated_target_new_objfile_hook = remote_new_objfile; + observer_attach_new_objfile (remote_new_objfile); #if 0 init_remote_threadtests ();