On Thu, 2006-10-05 at 17:04 -0700, George Anzinger wrote: 
> Piet Delaney wrote:
> > On Thu, 2006-10-05 at 12:17 -0700, Tom Rini wrote:
> > 
> ~
> 
> > ----------------------------------------------------------------------------
> > 
> > I didn't find the "static init of the trap notify"; 
> > George: where is that?
> 
> Have a look here:
> http://source.mvista.com/~ganzinger/

I was looking at your 2.4, 2.6.12, and now this 2.6.14-rc1 patch
and was looking for how you got kgdb to allow setting breakpoints
as early as the the "FIRST LINE of C CODE".

Looks like our current kgdb code calls early_trap_init() quite
late in the boot process:

    start_kernel_proc() {
        start_kernel() {
            setup_arch() {
                early_trap_init()
            }
        }
    }

My guess is that your saying that a developer can add a call to
breakpoint() in say start_kernel() and it will set up the
trap table via the calls to set_intr_*:

    123 void breakpoint(void)
    124 {
    125     set_intr_usr_gate(3,&int3); /* disable ints on trap */
    126     set_intr_gate(1,&debug);
    127     set_intr_gate(14,&page_fault);
    128
    129         BREAKPOINT;
    130 }

There's no way to breakpoint the early code without this addition.

I suppose some arch can't handle traps so early and this is the
reason early_trap_init() is called from setup_arch().


There are plenty of other CONFIG #ifdef's in setup_arch():

#ifdef CONFIG_BLK_DEV_RAM
#ifdef CONFIG_ACPI_BOOT
#ifdef CONFIG_ACPI_NUMA
#ifdef CONFIG_DISCONTIGMEM
#ifdef CONFIG_SMP 
#ifdef CONFIG_ACPI_SLEEP
#ifdef CONFIG_X86_LOCAL_APIC
#ifdef CONFIG_BLK_DEV_INITRD
#ifdef CONFIG_ACPI_BOOT
#ifdef CONFIG_GART_IOMMU
#ifdef CONFIG_VT

It appears much more consistent to do the same for the 
call to  early_trap_init(). Having a few #ifdef's in
trap.c like we had in the earlier 2.6.*-mm patches is/was
totally reasonable.

-piet

-- 
Piet Delaney                                    Phone: (408) 200-5256
Blue Lane Technologies                          Fax:   (408) 200-5299
10450 Bubb Rd.
Cupertino, Ca. 95014                            Email: [EMAIL PROTECTED]

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to