NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Debugging with gdb under netbsd-6
In article <521A4C72.8070605%gmail.com@localhost>,
Jan Danielsson <jan.m.danielsson%gmail.com@localhost> wrote:
>On 08/23/13 22:03, Jan Danielsson wrote:
>> I have had some trouble debugging shared libraries for a while. I
>> used to be able to step into shared objects during debug, but for some
>> reason I am no longer able to do so. When running the attached program
>> in gdb, I get this behavior:
>>
>> ---------------------------------------------
>> gauss$ gdb ./testprog
>> GNU gdb (GDB) 7.3.1
>> [---]
>> This GDB was configured as "x86_64--netbsd".
>> [---]
>> Reading symbols from /home/jan/tmp/dbgtest/testprog...done.
>> (gdb) break 9
>> Breakpoint 1 at 0x400a40: file testprog.c, line 9.
>> (gdb) run
>> Starting program: /home/jan/tmp/dbgtest/testprog
>>
>> Breakpoint 1, main (argc=1, argv=0x7f7fffffdb68) at testprog.c:9
>> 9 bar = foo(42, 72);
>> (gdb) step
>> 11 printf("bar=%d\n", bar);
>> (gdb)
>> ---------------------------------------------
>[---]
I don't know, seems to work fine in current (with MKDEBUG=yes):
$ gdb /bin/ps
GNU gdb (GDB) 7.3.1
[...]
Reading symbols from /bin/ps...Reading symbols from
/usr/libdata/debug/bin/ps.debug...done.
done.
(gdb) break main
Breakpoint 1 at 0x40483f: file /net/quasar/src-5/NetBSD/src/bin/ps/ps.c, line
197.
(gdb) r
Starting program: /bin/ps
Breakpoint 1, main (argc=1, argv=0x7f7fffffd718)
at /net/quasar/src-5/NetBSD/src/bin/ps/ps.c:197
197 {
(gdb) s
207 setprogname(argv[0]);
(gdb) s
setprogname (progname=0x7f7ffffff9c0 "/bin/ps")
at /net/quasar/src-5/NetBSD/src/lib/libc/gen/setprogname.c:65
65 }
(gdb) s
main (argc=1, argv=0x7f7fffffd718)
at /net/quasar/src-5/NetBSD/src/bin/ps/ps.c:208
208 (void)setlocale(LC_ALL, "");
(gdb) s
*__setlocale50 (category=0, locale=0x40556b "")
at /net/quasar/src-5/NetBSD/src/lib/libc/locale/setlocale.c:114
114 __mb_len_max_runtime = MB_LEN_MAX;
(gdb)
christos
Home |
Main Index |
Thread Index |
Old Index