~ubuntu-branches/ubuntu/raring/crash/raring-proposed

« back to all changes in this revision

Viewing changes to main.c

  • Committer: Bazaar Package Importer
  • Author(s): Mario Limonciello
  • Date: 2008-11-04 13:04:16 UTC
  • mfrom: (0.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20081104130416-7s1imz9huwwfzrbt
Tags: 4.0-7.2-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/patches/01_spu_commands.dpatch
    + Provides SPU extension support
  - debian/rules:
    + Patch support
    + Enable SPU on PPC
  - debian/control:
    + Enable LPIA builds.
    + Build depend on dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        {"no_scroll", 0, 0, 0},
58
58
        {"reloc", required_argument, 0, 0},
59
59
        {"active", 0, 0, 0},
 
60
        {"minimal", 0, 0, 0},
60
61
        {0, 0, 0, 0}
61
62
};
62
63
 
201
202
                                kt->flags |= RELOC_SET;
202
203
                        }
203
204
 
 
205
                        else if (STREQ(long_options[option_index].name, "minimal")) 
 
206
                                pc->flags |= MINIMAL_MODE;
 
207
 
204
208
                        else {
205
209
                                error(INFO, "internal error: option %s unhandled\n",
206
210
                                        long_options[option_index].name);
463
467
        hq_init();
464
468
        machdep_init(PRE_SYMTAB);
465
469
        symtab_init();
 
470
        paravirt_init();
466
471
        machdep_init(PRE_GDB);
467
472
        datatype_init();
468
473
 
496
501
#else
497
502
                        error(FATAL, XEN_HYPERVISOR_NOT_SUPPORTED);
498
503
#endif
499
 
                } else {
 
504
                } else if (!(pc->flags & MINIMAL_MODE)) {
500
505
                        read_in_kernel_config(IKCFG_INIT);
501
506
                        kernel_init();
502
507
                        machdep_init(POST_GDB);
521
526
#ifdef XEN_HYPERVISOR_ARCH
522
527
                        xen_hyper_display_sys_stats();
523
528
                        xen_hyper_show_vcpu_context(XEN_HYPER_VCPU_LAST_CONTEXT());
 
529
                        fprintf(fp, "\n");
524
530
#else
525
531
                        error(FATAL, XEN_HYPERVISOR_NOT_SUPPORTED);
526
532
#endif
527
 
                } else {
 
533
                } else if (!(pc->flags & MINIMAL_MODE)) {
528
534
                        display_sys_stats();
529
535
                        show_context(CURRENT_CONTEXT());
 
536
                        fprintf(fp, "\n");
530
537
                }
531
 
                fprintf(fp, "\n");
532
538
        }
533
539
 
 
540
        if (pc->flags & MINIMAL_MODE)
 
541
            error(NOTE, 
 
542
                "minimal mode commands: log, dis, rd, sym, eval and exit\n\n");
 
543
 
534
544
        pc->flags |= RUNTIME;
535
545
 
536
546
        /*
607
617
        if (is_datatype_command()) 
608
618
                goto reattempt;
609
619
 
610
 
        if (is_gdb_command(TRUE, FAULT_ON_ERROR)) 
 
620
        if (!(pc->flags & MINIMAL_MODE) &&
 
621
            is_gdb_command(TRUE, FAULT_ON_ERROR)) 
611
622
                goto reattempt;
612
623
 
613
624
        if (REMOTE() && remote_execute())
614
625
                return;
615
626
 
616
627
        pc->curcmd = pc->program_name;
617
 
        error(INFO, "command not found: %s\n", args[0]);
 
628
 
 
629
        if (pc->flags & MINIMAL_MODE)
 
630
                error(INFO, 
 
631
                    "%s: command not available in minimal mode\n"
 
632
                    "NOTE: minimal mode commands: log, dis, rd, sym, eval and exit\n",
 
633
                        args[0]);
 
634
        else
 
635
                error(INFO, "command not found: %s\n", args[0]);
618
636
 
619
637
        if (pc->curcmd_flags & REPEAT)
620
638
                pc->curcmd_flags &= ~REPEAT;
629
647
{       
630
648
        struct command_table_entry *cp;
631
649
        struct extension_table *ext;
 
650
        
 
651
        if ((pc->flags & MINIMAL_MODE) && !minimal_functions(name)) 
 
652
                return NULL;
632
653
  
633
654
        for (cp = pc->cmd_table; cp->name; cp++) {
634
655
                if (STREQ(cp->name, name))
1062
1083
        if (pc->flags & IFILE_ERROR)
1063
1084
                sprintf(&buf[strlen(buf)],
1064
1085
                        "%sIFILE_ERROR", others++ ? "|" : "");
 
1086
        if (pc->flags & MINIMAL_MODE)
 
1087
                sprintf(&buf[strlen(buf)],
 
1088
                        "%sMINIMAL_MODE", others++ ? "|" : "");
1065
1089
 
1066
1090
        if (pc->flags)
1067
1091
                strcat(buf, ")");