Gavin - MDB sets a number of internal breakpoints in rtld in order to catch loading of libraries and such. See pt_rtld_event() and pt_post_attach() in usr/src/cmd/mdb/common/mdb/mdb_proc.c. However, this is supposed to be transparent: MDB should notice the new library, do whatever's necessary, and then continue on without interrupting the user experience. I'm not sure what's going on in this case, but it's probably worth investigating. Does it also stop if you use ":c" to continue over the dlopen() call?
- Eric On Fri, Sep 16, 2005 at 02:58:06PM +0100, Gavin Maltby wrote: > Hi > > I was stepping over instructions (in fmd_scheme_lookup of fmdump) and was a > bit > surprised that this did not step over the call to dlopen. It also did > not single step into the dlopen, but stopped well down the stack > at rtld_db_dlactivity+4. This is a stock snv_22 install. > > # mdb /usr/sbin/fmdump > > fmd_scheme_lookup::dis > ... > fmd_scheme_lookup+0x114: ld [%fp - 8], %i0 > fmd_scheme_lookup+0x118: ret > fmd_scheme_lookup+0x11c: restore > fmd_scheme_lookup+0x120: call +0x12e70 <PLT:dlopen> > fmd_scheme_lookup+0x124: mov 2, %o1 > fmd_scheme_lookup+0x128: st %o0, [%fp - 0x410] > ... > > > fmd_scheme_lookup:b > > ::run -v > > mdb: stop at fmd_scheme_lookup > mdb: target stopped at: > fmd_scheme_lookup: save %sp, -0x470, %sp > > :e > mdb: target stopped at: > fmd_scheme_lookup+4: sethi %hi(0x26400), %i5 > > (several more :e) > > mdb: target stopped at: > fmd_scheme_lookup+0xec: tst %o0 > > :e > mdb: target stopped at: > fmd_scheme_lookup+0xf0: be +0x30 <fmd_scheme_lookup+0x120> > > :e > mdb: target stopped at: > fmd_scheme_lookup+0xf4: add %fp, -0x408, %o0 > > :e > mdb: target stopped at: > fmd_scheme_lookup+0x120:call +0x12e70 <PLT:dlopen> > > :e > mdb: target stopped at: > fmd_scheme_lookup+0x124:mov 2, %o1 > > :e > mdb: target stopped at: > ld.so.1`rtld_db_dlactivity+4: call +8 > <ld.so.1`rtld_db_dlactivity+0xc> > > > $c > ld.so.1`rtld_db_dlactivity+4(ff3ee000, 3, 1, 200000, 2f474, 0) > ld.so.1`relocate_lmc+0xb0(1c, 1c, 2821, ff3ee0f8, 2, 10000) > ld.so.1`dlmopen_core+0x388(ff3516b8, 10000, 1c, ff3f0f58, 0, ff3517c4) > ld.so.1`dlmopen_intn+0x20(ff3ee0f8, ffbff310, c02, ff3f0f58, 8000, 0) > ld.so.1`dlmopen_check+0x14c(ff3ee0f8, ffbff310, c02, ff3f0f58, ffbff2a4, > c00) > ld.so.1`dlopen+0x64(ffbff310, 2, 821, 29508, 26008, 1d) > fmd_scheme_lookup+0x120(147b4, 2b1b8, 0, ffbff798, 0, 26400) > fmdump_nvl2str+0x54(2b148, 13, 0, ffbff804, 130, 14400) > flt_verb1+0xcc(268b0, ffbff878, 26548, 14400, 0, 0) > libfmd_log.so.1`fmd_log_xiter+0x1a0(268b0, 29bf8, 1, 0, 12f88, 11970) > main+0x7f4(0, 13d34, 268b0, 0, 1, ffbff910) > _start+0x108(0, 0, 0, 0, 0, 0) > > Gavin > _______________________________________________ > mdb-discuss mailing list > mdb-discuss at opensolaris.org -- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock