* dcache.c: Cast return value from xmalloc.

* remote.c: Move setting of immediate_quit from remote_open to
	remote_start_dummy and set it back to zero when done.
This commit is contained in:
Jim Kingdon
1993-09-03 14:26:29 +00:00
parent eba94f7d0d
commit ac7a377f64
3 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,10 @@
Fri Sep 3 08:57:10 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* dcache.c: Cast return value from xmalloc.
* remote.c: Move setting of immediate_quit from remote_open to
remote_start_dummy and set it back to zero when done.
Thu Sep 2 00:07:36 1993 Jim Kingdon (kingdon@lioth.cygnus.com) Thu Sep 2 00:07:36 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* m88k-tdep.c: Remove a bunch of unused #includes. * m88k-tdep.c: Remove a bunch of unused #includes.

View File

@ -204,10 +204,11 @@ dcache_init (reading, writing)
register struct dcache_block *db; register struct dcache_block *db;
DCACHE *dcache; DCACHE *dcache;
dcache = xmalloc(sizeof(*dcache)); dcache = (DCACHE *) xmalloc (sizeof (*dcache));
dcache->read_memory = reading; dcache->read_memory = reading;
dcache->write_memory = writing; dcache->write_memory = writing;
dcache->the_cache = xmalloc(sizeof(*dcache->the_cache) * DCACHE_SIZE); dcache->the_cache = (struct dcache_block *)
xmalloc (sizeof (*dcache->the_cache) * DCACHE_SIZE);
dcache->dcache_free.next = dcache->dcache_free.last = &dcache->dcache_free; dcache->dcache_free.next = dcache->dcache_free.last = &dcache->dcache_free;
dcache->dcache_valid.next = dcache->dcache_valid.last = &dcache->dcache_valid; dcache->dcache_valid.next = dcache->dcache_valid.last = &dcache->dcache_valid;

View File

@ -238,11 +238,14 @@ static int
remote_start_remote (dummy) remote_start_remote (dummy)
char *dummy; char *dummy;
{ {
immediate_quit = 1; /* Allow user to interrupt it */
/* Ack any packet which the remote side has already sent. */ /* Ack any packet which the remote side has already sent. */
/* I'm not sure this \r is needed; we don't use it any other time we /* I'm not sure this \r is needed; we don't use it any other time we
send an ack. */ send an ack. */
SERIAL_WRITE (remote_desc, "+\r", 2); SERIAL_WRITE (remote_desc, "+\r", 2);
putpkt ("?"); /* initiate a query from remote machine */ putpkt ("?"); /* initiate a query from remote machine */
immediate_quit = 0;
start_remote (); /* Initialize gdb process mechanisms */ start_remote (); /* Initialize gdb process mechanisms */
return 1; return 1;
@ -295,8 +298,9 @@ device is attached to the remote system (e.g. /dev/ttya).");
} }
push_target (&remote_ops); /* Switch to using remote target now */ push_target (&remote_ops); /* Switch to using remote target now */
/* Start the remote connection; if error (0), discard this target. */ /* Start the remote connection; if error (0), discard this target.
immediate_quit++; /* Allow user to interrupt it */ 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, if (!catch_errors (remote_start_remote, (char *)0,
"Couldn't establish connection to remote target\n", RETURN_MASK_ALL)) "Couldn't establish connection to remote target\n", RETURN_MASK_ALL))
pop_target(); pop_target();