Date: Fri, 21 Nov 2014 01:25:27 -0500 From: Zaphod Beeblebrox <zbeeble@gmail.com> To: "K. Macy" <kmacy@freebsd.org> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: Debugging the ZDB debugger. Message-ID: <CACpH0Mdk4ZC8-ZiQDQYwZzSdtJZCxY2RS6-DeyigD02G4nJYkA@mail.gmail.com> In-Reply-To: <CAHM0Q_O1ZN6cfuXUboits0iwpCAX7dZpFhaoKiOM=6BjEn%2B2%2BA@mail.gmail.com> References: <CACpH0Mcm57vRq=RLjwhbc6sMwAv=zVQvftt-t2MOUV4tQjB5BQ@mail.gmail.com> <CAHM0Q_O1ZN6cfuXUboits0iwpCAX7dZpFhaoKiOM=6BjEn%2B2%2BA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Ok... that advice got me somewhere... now my stack is:
(gdb) bt
#0 0x00000000004098a9 in dump_dir (os=0x80d302000)
at
/usr/src/cddl/usr.sbin/zdb/../../../cddl/contrib/opensolaris/cmd/zdb/zdb.c:1464
#1 0x0000000000406222 in main (argc=0, argv=<value optimized out>)
at
/usr/src/cddl/usr.sbin/zdb/../../../cddl/contrib/opensolaris/cmd/zdb/zdb.c:3604
and we got here on a segmentation fault. Now ... I'm a little confused:
(gdb) frame 0
#0 0x00000000004098a9 in dump_dir (os=0x80d302000)
at
/usr/src/cddl/usr.sbin/zdb/../../../cddl/contrib/opensolaris/cmd/zdb/zdb.c:1464
1464 zdb_nicenum(dl->dl_phys->dl_used, bytes);
(gdb) p dl
No symbol "dl" in current context.
(gdb) p *dl
No symbol "dl" in current context.
I thought for a second that I was using gdb wrong (it's been awhile), but:
(gdb) frame 1
#1 0x0000000000406222 in main (argc=0, argv=<value optimized out>)
at
/usr/src/cddl/usr.sbin/zdb/../../../cddl/contrib/opensolaris/cmd/zdb/zdb.c:3604
3604 dump_dir(os);
(gdb) p os
$3 = (objset_t *) 0x80d302000
... my first thought was "is the stack trashed"? ... but shouldn't gdb know
what 'dl' is regardless of the process state?
Then I realized that line 1464 isn't in dump_dir() ... it's in dump_dead()
help?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACpH0Mdk4ZC8-ZiQDQYwZzSdtJZCxY2RS6-DeyigD02G4nJYkA>
