This is the mail archive of the
mailing list for the eCos project.
redboot gdb async break support for mips
- From: "Andy Dyer" <adyer at righthandtech dot com>
- To: <ecos-discuss at ecos dot sourceware dot org>
- Date: Mon, 16 Feb 2004 15:24:33 -0600
- Subject: [ECOS] redboot gdb async break support for mips
I'm trying to figure out how gdb async break support is
supposed to work on MIPS. I have some test code
that never enables interrupts, it just blinks LEDs
and runs in a long loop. If I load the code with
gdb from redboot and run it, gdb async breaks will
not work. After loading the code if I set the MIPS
global interrupt enable in gdb ('set $sr |= 0x01')
and then run it, async breaks work as expected.
Is this the expected behavior (ie the application
would have to enable interrupts)?
If I look in redboot/current/src/main.c trampoline()
I see a call to HAL_DISABLE_INTERRUPTS before the call
to the breakpoint() function that actually kicks me
into the gdb stubs. This clears bit 0 of the status
register, disabling interrupts and causing the register
saved version of the status register to have interrupts
disabled once the gdb stubs get to it.
On exit from the stubs (the gdb continue command)
execution passes through handle_exception_init (hal_stub.c)
and the interruptible() function sets up the COMMS stuff to
handle the serial interrupt.
Should it (or some other code) also enable the interrupt in
the register saved version of $sp before the gdb stub returns
control to the downloaded code?
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss