Andrew Gallatin wrote:
> [EMAIL PROTECTED] wrote:
> 
>>> ::walk mac_impl_cache | ::print mac_impl_t mi_driver
>>>
>> Or you can do
>>
>> ::prtconf ! grep <driver>
>> and then get the devi_driver_data from the dev_info
>>
>> e.g., 
>>
>>> ::prtconf ! grep bge
>>         c8ec5470 pci108e,16a8, instance #0 (driver name: bge)
>>>  c8ec5470::print struct dev_info devi_driver_data 
>> devi_driver_data = 0xcaab5000
> 
> Thanks! Both seem to work.  But I'm kind of hosed because mdb
> apparently doesn't know my driver's types.  Eg:
> 
>  > 0xffffff039660d900::print struct myri10ge_priv
> mdb: failed to look up type struct myri10ge_priv: no symbol corresponds 
> to address
> 
> How do I get mdb to recognize my types?

You want to add ctf data to your driver elf file.
You want to ctfconvert on all the object files,
and do a ctfmerge on the final elf file..

e.g. something like the following (although this is
a user app, same principle).


CTFCONVERT = /opt/onbld/bin/i386/ctfconvert
CTFMERGE = /opt/onbld/bin/i386/ctfmerge

%.o: %.c
         $(CC) $(CFLAGS) -c -o $@ $<
         $(CTFCONVERT) -i -L VERSION $@

$(APP): $(OBJS)
         $(CC) $(CFLAGS) -o $(DEST)/$(APP) $(OBJS) $(LDFLAGS) $(LIBS)
         $(CTFMERGE) -L VERSION -o $(DEST)/$(APP) $(OBJS)


You should be able to mdb the elf file and see all
the symbols, etc.  You don't need to load the driver..




MRJ

_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to