• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revision029981e273adac51b865e6dc49cc332f5df6aa2b (tree)
Zeit1991-04-19 10:10:52
AutorJohn Gilmore <gnu@cygn...>
CommiterJohn Gilmore

Log Message

        • symfile.c (clear_symtab_users_once, cashier_psymtab,
          free_named_symtabs): Move these routines from symmisc.c.
        • symmisc.c (same): same.

Ändern Zusammenfassung

Diff

--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -26,9 +26,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
2626
2727 #include <stdio.h>
2828 #include <obstack.h>
29-
30-static void free_symtab ();
31-
3229
3330 /* Free all the symtabs that are currently installed,
3431 and all storage associated with them.
@@ -91,7 +88,7 @@ free_symtab_block (b)
9188 which maybe per symtab even when the rest is not).
9289 It is s->free_code that says which alternative to use. */
9390
94-static void
91+void
9592 free_symtab (s)
9693 register struct symtab *s;
9794 {
@@ -102,7 +99,7 @@ free_symtab (s)
10299 switch (s->free_code)
103100 {
104101 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),
106103 and some other symtab is in charge of freeing that block.
107104 Therefore, do nothing. */
108105 break;
@@ -141,85 +138,6 @@ free_symtab (s)
141138 free (s->fullname);
142139 free (s);
143140 }
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-
223141
224142 static int block_depth ();
225143 static void print_symbol ();