From owner-freebsd-current@FreeBSD.ORG Wed May 14 06:33:01 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 31FD537B401 for ; Wed, 14 May 2003 06:33:01 -0700 (PDT) Received: from pump2.york.ac.uk (pump2.york.ac.uk [144.32.128.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1181743F85 for ; Wed, 14 May 2003 06:33:00 -0700 (PDT) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from ury.york.ac.uk (ury.york.ac.uk [144.32.108.81]) by pump2.york.ac.uk (8.12.9/8.12.9) with ESMTP id h4EDWw1C000025; Wed, 14 May 2003 14:32:58 +0100 (BST) Received: from ury.york.ac.uk (localhost.york.ac.uk [127.0.0.1]) by ury.york.ac.uk (8.12.8p1/8.12.8) with ESMTP id h4EDWwJF091306; Wed, 14 May 2003 14:32:58 +0100 (BST) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from localhost (gavin@localhost)h4EDWwUx091303; Wed, 14 May 2003 14:32:58 +0100 (BST) X-Authentication-Warning: ury.york.ac.uk: gavin owned process doing -bs Date: Wed, 14 May 2003 14:32:57 +0100 (BST) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Creep In-Reply-To: <20030513154225.GA684@mistress.home.astercity.net> Message-ID: <20030514141529.B90949-100000@ury.york.ac.uk> References: <20030513154225.GA684@mistress.home.astercity.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: 5.0-RELEASE-p7 boot's while debugging asm (!?!?) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 13:33:01 -0000 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