Hi

I am using the following method to debug a KLD on 4.1
using gdb remote debugging:

- Add makeoptions DEBUG=-g to the kernel config
- Compile the KLD with -ggdb
- Use objdump -h to get the offset of .text in the
KLD.
- Add this value to the value reported by kldstat and 
 use this as offset for the gdb add-symbol-file
command.

The problem is that variable values reported by gdb
seems to be total garbage. If I add explicit printf's
in the C code, the value printed on the console is
correct but the values given by gdb are totally
different. Everything else seems to be working - I can
do a break <function_name_in_kld> and the breakpoint
will be set correctly.

Any help will be greatly appreciated.

jacques

__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to