X-Git-Url: https://rtime.felk.cvut.cz/gitweb/l4.git/blobdiff_plain/d2904c5e14a2d9c6585ce5e2ff536584c91aeb99..72f8c5b742f7e0c579f3025c1e736ab5011c10ee:/l4/tool/kconfig/scripts/kconfig/menu.c diff --git a/l4/tool/kconfig/scripts/kconfig/menu.c b/l4/tool/kconfig/scripts/kconfig/menu.c index 203632cc3..edda8b496 100644 --- a/l4/tool/kconfig/scripts/kconfig/menu.c +++ b/l4/tool/kconfig/scripts/kconfig/menu.c @@ -58,6 +58,8 @@ void menu_add_entry(struct symbol *sym) *last_entry_ptr = menu; last_entry_ptr = &menu->next; current_entry = menu; + if (sym) + menu_add_symbol(P_SYMBOL, sym, NULL); } void menu_end_entry(void) @@ -318,6 +320,8 @@ void menu_finalize(struct menu *parent) parent->next = last_menu->next; last_menu->next = NULL; } + + sym->dir_dep.expr = parent->dep; } for (menu = parent->list; menu; menu = menu->next) { if (sym && sym_is_choice(sym) && @@ -419,9 +423,13 @@ bool menu_is_visible(struct menu *menu) if (!sym || sym_get_tristate_value(menu->sym) == no) return false; - for (child = menu->list; child; child = child->next) - if (menu_is_visible(child)) + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child)) { + if (sym) + sym->flags |= SYMBOL_DEF_USER; return true; + } + } return false; } @@ -501,9 +509,19 @@ void get_symbol_str(struct gstr *r, struct symbol *sym) bool hit; struct property *prop; - if (sym && sym->name) + if (sym && sym->name) { str_printf(r, "Symbol: %s [=%s]\n", sym->name, sym_get_string_value(sym)); + str_printf(r, "Type : %s\n", sym_type_name(sym->type)); + if (sym->type == S_INT || sym->type == S_HEX) { + prop = sym_get_range_prop(sym); + if (prop) { + str_printf(r, "Range : "); + expr_gstr_print(prop->expr, r); + str_append(r, "\n"); + } + } + } for_all_prompts(sym, prop) get_prompt_str(r, prop); hit = false;