GNU Binutils with patches for OS216
Revision | 029981e273adac51b865e6dc49cc332f5df6aa2b (tree) |
---|---|
Zeit | 1991-04-19 10:10:52 |
Autor | John Gilmore <gnu@cygn...> |
Commiter | John Gilmore |
@@ -26,9 +26,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
26 | 26 | |
27 | 27 | #include <stdio.h> |
28 | 28 | #include <obstack.h> |
29 | - | |
30 | -static void free_symtab (); | |
31 | - | |
32 | 29 | |
33 | 30 | /* Free all the symtabs that are currently installed, |
34 | 31 | and all storage associated with them. |
@@ -91,7 +88,7 @@ free_symtab_block (b) | ||
91 | 88 | which maybe per symtab even when the rest is not). |
92 | 89 | It is s->free_code that says which alternative to use. */ |
93 | 90 | |
94 | -static void | |
91 | +void | |
95 | 92 | free_symtab (s) |
96 | 93 | register struct symtab *s; |
97 | 94 | { |
@@ -102,7 +99,7 @@ free_symtab (s) | ||
102 | 99 | switch (s->free_code) |
103 | 100 | { |
104 | 101 | case free_nothing: |
105 | - /* All the contents are part of a big block of memory | |
102 | + /* All the contents are part of a big block of memory (an obstack), | |
106 | 103 | and some other symtab is in charge of freeing that block. |
107 | 104 | Therefore, do nothing. */ |
108 | 105 | break; |
@@ -141,85 +138,6 @@ free_symtab (s) | ||
141 | 138 | free (s->fullname); |
142 | 139 | free (s); |
143 | 140 | } |
144 | - | |
145 | -/* If a symtab for filename NAME is found, free it along | |
146 | - with any dependent breakpoints, displays, etc. | |
147 | - Used when loading new versions of object modules with the "add-file" | |
148 | - command. | |
149 | - | |
150 | - FIXME. I think this is not the right way to do this. It needs further | |
151 | - investigation, though. -- gnu@cygnus */ | |
152 | - | |
153 | -void | |
154 | -free_named_symtab (name) | |
155 | - char *name; | |
156 | -{ | |
157 | - register struct symtab *s; | |
158 | - register struct symtab *prev; | |
159 | - struct blockvector *bv; | |
160 | - | |
161 | -#if 0 /* FIXME */ | |
162 | - /* Look for a symtab with the specified name. | |
163 | - We can't use lookup_symtab () for this, since it | |
164 | - might generate a recursive call to psymtab_to_symtab (). */ | |
165 | - | |
166 | - for (s = symtab_list; s; s = s->next) | |
167 | - { | |
168 | - if (!strcmp (name, s->filename)) | |
169 | - break; | |
170 | - prev = s; | |
171 | - } | |
172 | - | |
173 | - if (s) | |
174 | - { | |
175 | - if (s == symtab_list) | |
176 | - symtab_list = s->next; | |
177 | - else | |
178 | - prev->next = s->next; | |
179 | - | |
180 | - /* For now, delete all breakpoints, displays, etc., whether or | |
181 | - not they depend on the symtab being freed. This should be | |
182 | - changed so that only those data structures affected are deleted. */ | |
183 | - | |
184 | - /* But don't delete anything if the symtab is empty. | |
185 | - This test is necessary due to a bug in "dbxread.c" that | |
186 | - causes empty symtabs to be created for N_SO symbols that | |
187 | - contain the pathname of the object file. (This problem | |
188 | - has been fixed in GDB 3.9x). */ | |
189 | - | |
190 | - bv = BLOCKLIST (s); | |
191 | - if (BLOCKLIST_NBLOCKS (bv) > 2 | |
192 | - || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, 0)) | |
193 | - || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, 1))) | |
194 | - { | |
195 | - /* Took the following line out because GDB ends up printing it | |
196 | - many times when a given module is loaded, because each module | |
197 | - contains many symtabs. */ | |
198 | - /* | |
199 | - printf ("Clearing breakpoints and resetting debugger state.\n"); | |
200 | - */ | |
201 | - | |
202 | - clear_value_history (); | |
203 | - clear_displays (); | |
204 | - clear_internalvars (); | |
205 | - clear_breakpoints (); | |
206 | - set_default_breakpoint (0, 0, 0, 0); | |
207 | - current_source_symtab = 0; | |
208 | - } | |
209 | - | |
210 | - free_symtab (s); | |
211 | - } | |
212 | - else | |
213 | - /* It is still possible that some breakpoints will be affected | |
214 | - even though no symtab was found, since the file might have | |
215 | - been compiled without debugging, and hence not be associated | |
216 | - with a symtab. In order to handle this correctly, we would need | |
217 | - to keep a list of text address ranges for undebuggable files. | |
218 | - For now, we do nothing, since this is a fairly obscure case. */ | |
219 | - ; | |
220 | -#endif /* FIXME */ | |
221 | -} | |
222 | - | |
223 | 141 | |
224 | 142 | static int block_depth (); |
225 | 143 | static void print_symbol (); |