From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 2 14:25:07 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43A9A1065695 for ; Mon, 2 Nov 2009 14:25:07 +0000 (UTC) (envelope-from m.boyarov@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by mx1.freebsd.org (Postfix) with ESMTP id D05AE8FC18 for ; Mon, 2 Nov 2009 14:25:06 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id d26so644709eyd.9 for ; Mon, 02 Nov 2009 06:25:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=CyFrmHq29JqELuFcMJx6Jd7PBCxQK+lXfk8dF65U6y4=; b=Cz6VyZbH4sKjUPitpzFrB+GYeF2VM+Cq/D2SS92YWPsg3djG2y8F34P3k/ZOCFbxmh P4SgS1RpvA81F8657381ShfYmKWDXSguy3ypktfevNl03JUxoPtSY0yrTOy4pCkm3sWz 0tpVvZzRjEjVhO3zrUNyWdeyQjRx6RPoDCPWg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=uFJkgGt4FSi2MjHWXXqx0pmLnhWqaQ/Qvo+vCwN/na/7Co+D10M6P19K4WcoabF5Xe l4EGl+bvmG86TW9UimONywSAb/SS0hZmGCDT5bAPFZ2GpIf87ZZhcBqg6zY1Ya4kzABO 4RiH0zVmIAMF+2qFjMNBHks1KO8y1tDrgTAvM= MIME-Version: 1.0 Received: by 10.216.86.80 with SMTP id v58mr4556568wee.40.1257169953638; Mon, 02 Nov 2009 05:52:33 -0800 (PST) Date: Mon, 2 Nov 2009 15:52:33 +0200 Message-ID: <87c7bb540911020552x4a602732pd2caecb17c8c4535@mail.gmail.com> From: Max Boyarov To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: strange gdb behavior X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2009 14:25:07 -0000 Hi, Who could help understand this: `--> cat 1.c int main(int argc, char **argv) { return 0; } `--> cc -ggdb -o 1 1.c `--> gdb 1 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) set args test (gdb) b main Breakpoint 1 at 0x80483d0: file 1.c, line 3. (gdb) r Starting program: /tmp/1 test Breakpoint 1, main () at 1.c:3 3 { (gdb) print argc Error accessing memory address 0x0: Bad address. (gdb) list 1 int 2 main(int argc, char **argv) 3 { 4 return 0; 5 } checked on 9.0-CURRENT, 8.0-BETA3 -- // Max N. Boyarov