Changeset f0d7bd9 in mainline for kernel/generic/src/debug/symtab.c
- Timestamp:
- 2012-07-10T12:32:56Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aca4a04
- Parents:
- 1e01a35
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/debug/symtab.c
r1e01a35 rf0d7bd9 43 43 #include <typedefs.h> 44 44 #include <errno.h> 45 #include <console/prompt.h> 45 46 46 47 /** Get name of a symbol that seems most likely to correspond to address. … … 232 233 size_t input_len = str_length(input); 233 234 char *sym_name; 234 char display = 'y';235 235 size_t hints_to_show = MAX_TAB_HINTS - 1; 236 236 size_t total_hints_shown = 0; 237 char continue_showing_hints = 'y';237 bool continue_showing_hints = true; 238 238 239 239 output[0] = 0; … … 256 256 if (found > MAX_TAB_HINTS) { 257 257 printf("\nDisplay all %zu possibilities? (y or n)", found); 258 wchar_t display; 258 259 do { 259 260 display = indev_pop_character(indev); 260 261 } while (display != 'y' && display != 'n' && display != 'Y' && display != 'N'); 262 continue_showing_hints = (display == 'y') || (display == 'Y'); 261 263 } 262 264 … … 268 270 pos++; 269 271 270 if ( display == 'y' || display == 'Y') { /* We are still showing hints */272 if (continue_showing_hints) { /* We are still showing hints */ 271 273 printf("%s\n", sym_name); 272 274 --hints_to_show; … … 274 276 275 277 if (hints_to_show == 0 && total_hints_shown != found) { /* Time to ask user to continue */ 276 printf("--More--"); 277 do { 278 continue_showing_hints = indev_pop_character(indev); 279 if (continue_showing_hints == 'y' || continue_showing_hints == 'Y' 280 || continue_showing_hints == ' ') { 281 hints_to_show = MAX_TAB_HINTS - 1; /* Display a full page again */ 282 break; 283 } 284 285 if (continue_showing_hints == 'n' || continue_showing_hints == 'N' 286 || continue_showing_hints == 'q' || continue_showing_hints == 'Q') { 287 display = 'n'; /* Stop displaying hints */ 288 break; 289 } 290 291 if (continue_showing_hints == '\n') { 292 hints_to_show = 1; /* Show one more hint */ 293 break; 294 } 295 } while (1); 296 297 printf("\r \r"); /* Delete the --More-- option */ 278 continue_showing_hints = console_prompt_more_hints(indev, &hints_to_show); 298 279 } 299 280 }
Note:
See TracChangeset
for help on using the changeset viewer.