From owner-freebsd-bugs@FreeBSD.ORG Mon Aug 30 19:30:26 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8199516A4CF for ; Mon, 30 Aug 2004 19:30:26 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6646543D69 for ; Mon, 30 Aug 2004 19:30:26 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i7UJUPph001681 for ; Mon, 30 Aug 2004 19:30:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i7UJUPpX001669; Mon, 30 Aug 2004 19:30:25 GMT (envelope-from gnats) Resent-Date: Mon, 30 Aug 2004 19:30:25 GMT Resent-Message-Id: <200408301930.i7UJUPpX001669@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dag-Erling Smørgrav Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA09916A4CE for ; Mon, 30 Aug 2004 19:28:33 +0000 (GMT) Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6100043D49 for ; Mon, 30 Aug 2004 19:28:33 +0000 (GMT) (envelope-from des@des.no) Received: from dwp.des.no (37.80-203-228.nextgentel.com [80.203.228.37]) by mail.broadpark.no (Postfix) with ESMTP id 9F0823E88 for ; Mon, 30 Aug 2004 21:29:10 +0200 (MEST) Received: by dwp.des.no (Postfix, from userid 2602) id 52523B873; Mon, 30 Aug 2004 21:28:32 +0200 (CEST) Message-Id: <20040830192832.52523B873@dwp.des.no> Date: Mon, 30 Aug 2004 21:28:32 +0200 (CEST) From: Dag-Erling Smørgrav To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: gnu/71160: gdb gets confused about active frame X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dag-Erling Smørgrav List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2004 19:30:26 -0000 >Number: 71160 >Category: gnu >Synopsis: gdb gets confused about active frame >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 30 19:30:24 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Dag-Erling Smørgrav >Release: FreeBSD 6.0-CURRENT i386 >Organization: >Environment: System: FreeBSD dwp.des.no 6.0-CURRENT FreeBSD 6.0-CURRENT #12: Sun Aug 29 22:14:28 CEST 2004 des@dwp.des.no:/usr/obj/usr/src/sys/dwp_up i386 >Description: After 'where', gdb 6.1.1 gets confused about which frame is currently selected. If asked for a source listing, it will show the source corresponding to the outermost frame instead of that corresponding to the currently selected frame. >How-To-Repeat: des@dwp ~/src/gdbtest% cat gdbtest.c /* * $Id: gdbtest.c,v 1.1 2004-08-30 19:20:05 des Exp $ */ #include #include static void crash(int *arg) { sleep(*arg); } int main(void) { crash(NULL); return (0); } des@dwp ~/src/gdbtest% gcc -g -o gdbtest gdbtest.c des@dwp ~/src/gdbtest% gdb gdbtest GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... (gdb) run Starting program: /home/des/src/gdbtest/gdbtest Program received signal SIGSEGV, Segmentation fault. 0x080484e8 in crash (arg=0x0) at gdbtest.c:11 11 sleep(*arg); (gdb) where #0 0x080484e8 in crash (arg=0x0) at gdbtest.c:11 #1 0x0804851a in main () at gdbtest.c:17 (gdb) l 17 crash(NULL); 18 return (0); 19 } (gdb) down Bottom (i.e., innermost) frame selected; you cannot go down. (gdb) l Line number 20 out of range; gdbtest.c has 19 lines. (gdb) up 0 #0 0x080484e8 in crash (arg=0x0) at gdbtest.c:11 11 sleep(*arg); (gdb) l 6 #include 7 8 static void 9 crash(int *arg) 10 { 11 sleep(*arg); 12 } 13 14 int 15 main(void) (gdb) quit >Fix: >Release-Note: >Audit-Trail: >Unformatted: