5.0-RELEASE-p7 boot's while debugging asm (!?!?)
Gavin Atkinson
gavin.atkinson at ury.york.ac.uk
Wed May 14 06:33:01 PDT 2003
On Tue, 13 May 2003, Creep wrote:
> i have a small program:
>
> .text
> .global main
> main:
> movb $2, %al
> int $0x80
>
> i do a
> gcc -o prog prog.S
>
> gcc (GCC) 3.2.1 [FreeBSD] 20021119 (release)
> GNU assembler 2.13.2 [FreeBSD] 2002-11-27
> [both from FreeBSD]
>
> when i debug it with ald [ /usr/ports/devel/ald ] as a normal user, I do
>
> ald ./prog
> break main
> run
> step
> step [here is the int $0x80 for a syscall]
[snip non-DDB stuff]
> ... it drops me to the DDB with this message:
>
> Stopped at sw1b+0xa9: movl %ecx,%fs:0
> db> trace
> sw1b(2f,2f,2f,bfbffa54,bfbffa5c) at sw1b+0xa9
> fork_trampoline() at fork_trampoline
> --- trap 0xa, eip = 0x80484a0, esp = 0xbfbffa2c, ebp = 0xbfbffa2c ---
>
> when i issue a 'cont' i the debugger continues and everything seems
> going normal, but on a system with debugging turned off
I can confirm this, and can also confirm it causes no problems under
RELENG_4. Under -CURRENT, running the program outside ald gives no output,
the program silently exits. While being stepped through with ald, -CURRENT
breaks to DDB when it hits the line
movl %ecx, PCPU(CURTHREAD) /* into next thread */
in src/sys/i386/i386/swtch.s, line 268.
No panic, just the message "Stopped at sw1+0x76: movl %ecx,%fs:0
Gavin
More information about the freebsd-current
mailing list