Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Nov 2009 15:52:33 +0200
From:      Max Boyarov <m.boyarov@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   strange gdb behavior
Message-ID:  <87c7bb540911020552x4a602732pd2caecb17c8c4535@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87c7bb540911020552x4a602732pd2caecb17c8c4535>