Unable to 'load' to extended-remote target
"Jon Beniston" <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Im trying to connect to an extended remote target and download some code before running it. E.g: tar ext-remote:1025 load run However, if when connecting, the remote target indicates that the last program has exited (via a Wxx packet), the load will fail with the error Load failed. This seems to be due to the following code in remote_xfer_partial() in remote.c : /* If the remote target is connected but not running, we should pass this request down to a lower stratum (e.g. the executable file). */ if (!target_has_execution) return TARGET_XFER_EOF; It also seems the remote_verify_memory function checks target_has_execution, so memory cant be verified, before running. I can see this makes some sense, in that GDB thinks there is no process on the target to load to / verify, but equally, how else can new code be loaded before running? Perhaps the remote target shouldnt send the Wxx packet, but that doesnt seem right either. Any thoughts as to how this should be made to work? Cheers, Jon