mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-04 16:18:18 +00:00
* remote.c (remote_wait): Return inferior_pid instead of 0 for
`W` message.
This commit is contained in:
parent
9a1ef62dcd
commit
4fb7359d97
@ -1,3 +1,8 @@
|
|||||||
|
Fri Aug 12 15:52:37 1994 Stu Grossman (grossman@cygnus.com)
|
||||||
|
|
||||||
|
* remote.c (remote_wait): Return inferior_pid instead of 0 for
|
||||||
|
`W` message.
|
||||||
|
|
||||||
Fri Aug 12 11:47:10 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
|
Fri Aug 12 11:47:10 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
|
||||||
|
|
||||||
* sparclite/aload.c (sys_error, error): Use vfprintf to variable
|
* sparclite/aload.c (sys_error, error): Use vfprintf to variable
|
||||||
|
20
gdb/remote.c
20
gdb/remote.c
@ -411,13 +411,6 @@ device is attached to the remote system (e.g. /dev/ttya).");
|
|||||||
stub to another, we can (if the target is closed and reopened) cope. */
|
stub to another, we can (if the target is closed and reopened) cope. */
|
||||||
stub_supports_P = 1;
|
stub_supports_P = 1;
|
||||||
|
|
||||||
/* Start the remote connection; if error (0), discard this target.
|
|
||||||
In particular, if the user quits, be sure to discard it
|
|
||||||
(we'd be in an inconsistent state otherwise). */
|
|
||||||
if (!catch_errors (remote_start_remote, (char *)0,
|
|
||||||
"Couldn't establish connection to remote target\n", RETURN_MASK_ALL))
|
|
||||||
pop_target();
|
|
||||||
|
|
||||||
/* Without this, some commands which require an active target (such as kill)
|
/* Without this, some commands which require an active target (such as kill)
|
||||||
won't work. This variable serves (at least) double duty as both the pid
|
won't work. This variable serves (at least) double duty as both the pid
|
||||||
of the target process (if it has such), and as a flag indicating that a
|
of the target process (if it has such), and as a flag indicating that a
|
||||||
@ -425,7 +418,14 @@ device is attached to the remote system (e.g. /dev/ttya).");
|
|||||||
variables, especially since GDB will someday have a notion of debugging
|
variables, especially since GDB will someday have a notion of debugging
|
||||||
several processes. */
|
several processes. */
|
||||||
|
|
||||||
inferior_pid = -1;
|
inferior_pid = 42000;
|
||||||
|
|
||||||
|
/* Start the remote connection; if error (0), discard this target.
|
||||||
|
In particular, if the user quits, be sure to discard it
|
||||||
|
(we'd be in an inconsistent state otherwise). */
|
||||||
|
if (!catch_errors (remote_start_remote, (char *)0,
|
||||||
|
"Couldn't establish connection to remote target\n", RETURN_MASK_ALL))
|
||||||
|
pop_target();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remote_detach()
|
/* remote_detach()
|
||||||
@ -630,13 +630,13 @@ remote_wait (pid, status)
|
|||||||
status->value.sig = (enum target_signal)
|
status->value.sig = (enum target_signal)
|
||||||
(((fromhex (buf[1])) << 4) + (fromhex (buf[2])));
|
(((fromhex (buf[1])) << 4) + (fromhex (buf[2])));
|
||||||
|
|
||||||
return 0;
|
return inferior_pid;
|
||||||
case 'W': /* Target exited */
|
case 'W': /* Target exited */
|
||||||
{
|
{
|
||||||
/* The remote process exited. */
|
/* The remote process exited. */
|
||||||
status->kind = TARGET_WAITKIND_EXITED;
|
status->kind = TARGET_WAITKIND_EXITED;
|
||||||
status->value.integer = (fromhex (buf[1]) << 4) + fromhex (buf[2]);
|
status->value.integer = (fromhex (buf[1]) << 4) + fromhex (buf[2]);
|
||||||
return 0;
|
return inferior_pid;
|
||||||
}
|
}
|
||||||
case 'O': /* Console output */
|
case 'O': /* Console output */
|
||||||
fputs_filtered (buf + 1, gdb_stdout);
|
fputs_filtered (buf + 1, gdb_stdout);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user