1 /* Inferior process information for the remote server for GDB.
3 Free Software Foundation, Inc.
5 Contributed by MontaVista Software.
7 This file is part of GDB.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
33 struct inferior_info
*next
;
36 static struct inferior_info
*inferiors
;
37 struct inferior_info
*current_inferior
;
41 add_inferior (int pid
)
43 struct inferior_info
*new_inferior
44 = (struct inferior_info
*) malloc (sizeof (*new_inferior
));
46 memset (new_inferior
, 0, sizeof (*new_inferior
));
48 new_inferior
->pid
= pid
;
50 new_inferior
->next
= inferiors
;
51 inferiors
= new_inferior
;
53 if (current_inferior
== NULL
)
54 current_inferior
= inferiors
;
56 create_register_cache (new_inferior
);
63 clear_inferiors (void)
65 struct inferior_info
*inf
= inferiors
, *next_inf
;
72 free (inf
->target_data
);
73 if (inf
->regcache_data
)
74 free_register_cache (inf
);
84 inferior_target_data (struct inferior_info
*inferior
)
86 return inferior
->target_data
;
90 set_inferior_target_data (struct inferior_info
*inferior
, void *data
)
92 inferior
->target_data
= data
;
96 inferior_regcache_data (struct inferior_info
*inferior
)
98 return inferior
->regcache_data
;
102 set_inferior_regcache_data (struct inferior_info
*inferior
, void *data
)
104 inferior
->regcache_data
= data
;
This page took 0.032679 seconds and 4 git commands to generate.