GNU Binutils with patches for OS216
修订版 | 3ba6a043d4888ab5b227c98addbeffa36299ea0d (tree) |
---|---|
时间 | 1991-04-19 10:55:07 |
作者 | John Gilmore <gnu@cygn...> |
Commiter | John Gilmore |
@@ -854,7 +854,7 @@ lookup_symbol (name, block, namespace, is_a_field_of_this, symtab) | ||
854 | 854 | for (s = symtab_list; s; s = s->next) |
855 | 855 | { |
856 | 856 | bv = BLOCKVECTOR (s); |
857 | - b = BLOCKVECTOR_BLOCK (bv, 0); | |
857 | + b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); | |
858 | 858 | if (BLOCK_START (b) <= BLOCK_START (block) |
859 | 859 | && BLOCK_END (b) > BLOCK_START (block)) |
860 | 860 | break; |
@@ -889,7 +889,7 @@ lookup_symbol (name, block, namespace, is_a_field_of_this, symtab) | ||
889 | 889 | for (s = symtab_list; s; s = s->next) |
890 | 890 | { |
891 | 891 | bv = BLOCKVECTOR (s); |
892 | - block = BLOCKVECTOR_BLOCK (bv, 0); | |
892 | + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); | |
893 | 893 | sym = lookup_block_symbol (block, name, namespace); |
894 | 894 | if (sym) |
895 | 895 | { |
@@ -936,7 +936,7 @@ lookup_symbol (name, block, namespace, is_a_field_of_this, symtab) | ||
936 | 936 | if (s) |
937 | 937 | { |
938 | 938 | bv = BLOCKVECTOR (s); |
939 | - block = BLOCKVECTOR_BLOCK (bv, 0); | |
939 | + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); | |
940 | 940 | sym = lookup_block_symbol (block, misc_function_vector[ind].name, |
941 | 941 | namespace); |
942 | 942 | /* sym == 0 if symbol was found in the misc_function_vector |
@@ -964,7 +964,7 @@ lookup_symbol (name, block, namespace, is_a_field_of_this, symtab) | ||
964 | 964 | { |
965 | 965 | s = PSYMTAB_TO_SYMTAB(ps); |
966 | 966 | bv = BLOCKVECTOR (s); |
967 | - block = BLOCKVECTOR_BLOCK (bv, 0); | |
967 | + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); | |
968 | 968 | sym = lookup_block_symbol (block, name, namespace); |
969 | 969 | if (!sym) |
970 | 970 | fatal ("Internal: global symbol found in psymtab but not in symtab"); |
@@ -980,7 +980,7 @@ lookup_symbol (name, block, namespace, is_a_field_of_this, symtab) | ||
980 | 980 | for (s = symtab_list; s; s = s->next) |
981 | 981 | { |
982 | 982 | bv = BLOCKVECTOR (s); |
983 | - block = BLOCKVECTOR_BLOCK (bv, 1); | |
983 | + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); | |
984 | 984 | sym = lookup_block_symbol (block, name, namespace); |
985 | 985 | if (sym) |
986 | 986 | { |
@@ -996,7 +996,7 @@ lookup_symbol (name, block, namespace, is_a_field_of_this, symtab) | ||
996 | 996 | { |
997 | 997 | s = PSYMTAB_TO_SYMTAB(ps); |
998 | 998 | bv = BLOCKVECTOR (s); |
999 | - block = BLOCKVECTOR_BLOCK (bv, 1); | |
999 | + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); | |
1000 | 1000 | sym = lookup_block_symbol (block, name, namespace); |
1001 | 1001 | if (!sym) |
1002 | 1002 | fatal ("Internal: static symbol found in psymtab but not in symtab"); |
@@ -1197,7 +1197,7 @@ find_pc_symtab (pc) | ||
1197 | 1197 | for (s = symtab_list; s; s = s->next) |
1198 | 1198 | { |
1199 | 1199 | bv = BLOCKVECTOR (s); |
1200 | - b = BLOCKVECTOR_BLOCK (bv, 0); | |
1200 | + b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); | |
1201 | 1201 | if (BLOCK_START (b) <= pc |
1202 | 1202 | && BLOCK_END (b) > pc) |
1203 | 1203 | break; |
@@ -1339,7 +1339,7 @@ find_pc_line (pc, notcurrent) | ||
1339 | 1339 | { |
1340 | 1340 | val.symtab = alt_symtab; |
1341 | 1341 | val.line = alt_line - 1; |
1342 | - val.pc = BLOCK_END (BLOCKVECTOR_BLOCK (bv, 0)); | |
1342 | + val.pc = BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)); | |
1343 | 1343 | val.end = alt_pc; |
1344 | 1344 | } |
1345 | 1345 | else |
@@ -1349,7 +1349,7 @@ find_pc_line (pc, notcurrent) | ||
1349 | 1349 | val.pc = best_pc; |
1350 | 1350 | val.end = (best_end ? best_end |
1351 | 1351 | : (alt_pc ? alt_pc |
1352 | - : BLOCK_END (BLOCKVECTOR_BLOCK (bv, 0)))); | |
1352 | + : BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)))); | |
1353 | 1353 | } |
1354 | 1354 | return val; |
1355 | 1355 | } |
@@ -1850,7 +1850,7 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line) | ||
1850 | 1850 | If file specified, use that file's per-file block to start with. */ |
1851 | 1851 | |
1852 | 1852 | sym = lookup_symbol (copy, |
1853 | - (s ? BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), 1) | |
1853 | + (s ? BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK) | |
1854 | 1854 | : get_selected_block ()), |
1855 | 1855 | VAR_NAMESPACE, 0, &sym_symtab); |
1856 | 1856 |
@@ -2206,6 +2206,7 @@ list_symbols (regexp, class, bpt) | ||
2206 | 2206 | } |
2207 | 2207 | else |
2208 | 2208 | keep_going = 0; |
2209 | + continue; | |
2209 | 2210 | } |
2210 | 2211 | else |
2211 | 2212 | { |
@@ -2262,7 +2263,7 @@ list_symbols (regexp, class, bpt) | ||
2262 | 2263 | It happens that the first symtab in the list |
2263 | 2264 | for any given blockvector is the main file. */ |
2264 | 2265 | if (bv != prev_bv) |
2265 | - for (i = 0; i < 2; i++) | |
2266 | + for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++) | |
2266 | 2267 | { |
2267 | 2268 | b = BLOCKVECTOR_BLOCK (bv, i); |
2268 | 2269 | /* Skip the sort if this block is always sorted. */ |
@@ -2293,7 +2294,7 @@ list_symbols (regexp, class, bpt) | ||
2293 | 2294 | } |
2294 | 2295 | found_in_file = 1; |
2295 | 2296 | |
2296 | - if (class != 2 && i == 1) | |
2297 | + if (class != 2 && i == STATIC_BLOCK) | |
2297 | 2298 | printf_filtered ("static "); |
2298 | 2299 | if (class == 2 |
2299 | 2300 | && SYMBOL_NAMESPACE (sym) != STRUCT_NAMESPACE) |
@@ -2349,14 +2350,12 @@ functions_info (regexp) | ||
2349 | 2350 | list_symbols (regexp, 1, 0); |
2350 | 2351 | } |
2351 | 2352 | |
2352 | -#if 0 | |
2353 | 2353 | static void |
2354 | 2354 | types_info (regexp) |
2355 | 2355 | char *regexp; |
2356 | 2356 | { |
2357 | 2357 | list_symbols (regexp, 2, 0); |
2358 | 2358 | } |
2359 | -#endif | |
2360 | 2359 | |
2361 | 2360 | #if 0 |
2362 | 2361 | /* Tiemann says: "info methods was never implemented." */ |
@@ -2540,7 +2539,7 @@ make_symbol_completion_list (text) | ||
2540 | 2539 | |
2541 | 2540 | for (s = symtab_list; s; s = s->next) |
2542 | 2541 | { |
2543 | - b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), 0); | |
2542 | + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); | |
2544 | 2543 | |
2545 | 2544 | for (i = 0; i < BLOCK_NSYMS (b); i++) |
2546 | 2545 | if (!strncmp (SYMBOL_NAME (BLOCK_SYM (b, i)), text, text_len)) |
@@ -2549,7 +2548,7 @@ make_symbol_completion_list (text) | ||
2549 | 2548 | |
2550 | 2549 | for (s = symtab_list; s; s = s->next) |
2551 | 2550 | { |
2552 | - b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), 1); | |
2551 | + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); | |
2553 | 2552 | |
2554 | 2553 | /* Don't do this block twice. */ |
2555 | 2554 | if (b == surrounding_static_block) continue; |
@@ -2569,8 +2568,8 @@ _initialize_symtab () | ||
2569 | 2568 | "All global and static variable names, or those matching REGEXP."); |
2570 | 2569 | add_info ("functions", functions_info, |
2571 | 2570 | "All function names, or those matching REGEXP."); |
2572 | -#if 0 | |
2573 | - /* This command has at least the following problems: | |
2571 | + | |
2572 | + /* FIXME: This command has at least the following problems: | |
2574 | 2573 | 1. It prints builtin types (in a very strange and confusing fashion). |
2575 | 2574 | 2. It doesn't print right, e.g. with |
2576 | 2575 | typedef struct foo *FOO |
@@ -2580,7 +2579,7 @@ _initialize_symtab () | ||
2580 | 2579 | there is much disagreement "info types" can be fixed). */ |
2581 | 2580 | add_info ("types", types_info, |
2582 | 2581 | "All types names, or those matching REGEXP."); |
2583 | -#endif | |
2582 | + | |
2584 | 2583 | #if 0 |
2585 | 2584 | add_info ("methods", methods_info, |
2586 | 2585 | "All method names, or those matching REGEXP::REGEXP.\n\ |