Solaris Kernel debugger

Solaris Kernel debugger

Post by B00Zagl » Thu, 06 May 2004 00:47:11



anyone know if there is a Solaris Kernel de* ?
also a Memory leak detector and Performance utilities like purify/quantify
for kernel ?

Thanks,
Elad

 
 
 

Solaris Kernel debugger

Post by Alan Coopersmit » Thu, 06 May 2004 02:08:44



|anyone know if there is a Solaris Kernel de* ?
|also a Memory leak detector and Performance utilities like purify/quantify
|for kernel ?

Of course, mdb and it's ::findleaks macro.  (How would you expect
Solaris kernel engineers to get anything done without a de*?)
http://www.veryComputer.com/

--
________________________________________________________________________


  Working for, but definitely not speaking for, Sun Microsystems, Inc.

 
 
 

Solaris Kernel debugger

Post by Alan Hargreave » Thu, 06 May 2004 05:36:01


Solaris CAT is a crashdump Analysis tool that was written by the folks
who actually use it inside Sun to look at crashdumps. It is available as
a free download from www.sun.com

mdb should be on the system already.

Memtool and the setoolkitis still around and being worked on. I think
there is a copy on sunfreeware.com, but I'm not sure where the "formal"
site for them is.

Performance utilities, ... I couldn't really say. I tend to get by with
lockstat (pre Solaris 10) and dtrace in 10.

alan.


> anyone know if there is a Solaris Kernel de* ?
> also a Memory leak detector and Performance utilities like purify/quantify
> for kernel ?

> Thanks,
> Elad

 
 
 

Solaris Kernel debugger

Post by B00Zagl » Thu, 06 May 2004 20:01:09


correct me if I am wrong but I know mdb does not have step by step
debugging.
am I right ?



> |anyone know if there is a Solaris Kernel de* ?
> |also a Memory leak detector and Performance utilities like
purify/quantify
> |for kernel ?

> Of course, mdb and it's ::findleaks macro.  (How would you expect
> Solaris kernel engineers to get anything done without a de*?)
> http://www.veryComputer.com/

> --
> ________________________________________________________________________


>   Working for, but definitely not speaking for, Sun Microsystems, Inc.

 
 
 

Solaris Kernel debugger

Post by APA » Thu, 06 May 2004 20:09:01



> correct me if I am wrong but I know mdb does not have step by step
> debugging.
> am I right ?

If you want to do that kind of thing then at this point in time, you
only have kadb available to you.

Of course in Solaris Next, you may be able to get a lot of what you are
after out of dtrace. See http://www.sun.com/bigadmin/content/dtrace

alan.
--
Alan Hargreaves
Senior Technical Support Specialist/VOSJEC Engineer
Product Technical Support (APAC)
Sun Microsystems

 
 
 

Solaris Kernel debugger

Post by McBof » Thu, 06 May 2004 20:37:10


B00Zagl0 wrote:
> correct me if I am wrong but I know mdb does not have step by step
> debugging.
> am I right ?

Sorry, you're incorrect:

if you startup mdb without the "-k" option you can see all the
process-oriented debugging facilities:

$ mdb
 > ::dcmds
$<                       - replace input with macro file
$<<                      - source macro file
$>                       - log session to a file
$?                       - print status and registers
$C                       - print stack backtrace
$G                       - enable/disable C++ demangling support
$L                       - print list of the active lwp ids
$P                       - set debugger prompt string
$Q                       - quit debugger
$V                       - get/set disassembly mode
$W                       - re-open target in write mode
$X                       - print floating point registers
$Y                       - print floating point registers
$b                       - list traced software events
$c                       - print stack backtrace
$d                       - get/set default output radix
$e                       - print listing of global symbols
$f                       - print listing of source files
$g                       - get/set C++ demangling options
$i                       - print signals that are ignored
$l                       - print the representative thread's lwp id
$m                       - print address space mappings
$p                       - change debugger target context
$q                       - quit debugger
$r                       - print general-purpose registers
$s                       - get/set symbol matching distance
$v                       - print non-zero variables
$w                       - get/set output page width
$x                       - print floating point registers
$y                       - print floating point registers
/                        - format data from virtual as
:A                       - attach to process or core file
:R                       - release the previously attached process
:a                       - set read access watchpoint
:b                       - breakpoint at the specified address
:c                       - continue target execution
:d                       - delete traced software events
:e                       - step target over next instruction
:i                       - ignore signal (delete all matching events)
:k                       - forcibly kill and release target
:p                       - set execute access watchpoint
:r                       - run a new target process
:s                       - single-step target to next instruction
:t                       - stop on delivery of the specified signals
:u                       - step target out of current function
:w                       - set write access watchpoint
:z                       - delete all traced software events
=                        - format immediate value
 >                        - assign variable
?                        - format data from object file
\                        - format data from physical as
array                    - print each array element's address
attach                   - attach to process or core file
bp                       - breakpoint at the specified addresses or symbols
cat                      - concatenate and display files
cont                     - continue target execution
context                  - change debugger target context
dcmds                    - list available debugger commands
delete                   - delete traced software events
dem                      - demangle C++ symbol names
dis                      - disassemble near addr
disasms                  - list available disassemblers
dismode                  - get/set disassembly mode
dmods                    - list loaded debugger modules
dump                     - dump memory from specified address
echo                     - echo arguments
eval                     - evaluate the specified command
events                   - list traced software events
evset                    - set software event specifier attributes
files                    - print listing of source files
findstack                - find user thread stack
fltbp                    - stop on machine fault
formats                  - list format specifiers
fpregs                   - print floating point registers
gcore                    - produce a core file for the attached process
grep                     - print dot if expression is true
help                     - list commands/command help
grep                     - print dot if expression is true
help                     - list commands/command help
kill                     - forcibly kill and release target
list                     - walk list using member as link pointer
load                     - load debugger module
log                      - log session to a file
map                      - print dot after evaluating expression
mappings                 - print address space mappings
next                     - step target over next instruction
nm                       - print symbols
nmadd                    - add name to private symbol table
nmdel                    - remove name from private symbol table
objects                  - print load objects information
offsetof                 - print the offset of a given struct or union
member
print                    - print the contents of a data structure
quit                     - quit debugger
regs                     - print general-purpose registers
release                  - release the previously attached process
run                      - run a new target process
set                      - get/set debugger properties
showrev                  - print version information
sigbp                    - stop on delivery of the specified signals
sizeof                   - print the size of a type
stack                    - print stack backtrace
stackregs                - print stack backtrace and registers
status                   - print summary of current target
step                     - single-step target to next instruction
sysbp                    - stop on entry or exit from system call
tls                      - lookup TLS data in the context of a given thread
typeset                  - set variable attributes
unload                   - unload debugger module
unset                    - unset variables
vars                     - print listing of variables
version                  - print debugger version string
vtop                     - print physical mapping of virtual address
walk                     - walk data structure
walkers                  - list available walkers
whence                   - show source of walk or dcmd
which                    - show source of walk or dcmd
wp                       - set a watchpoint at the specified address
xdata                    - print list of external data buffers

Maybe you should read the Modular Debugger Guide that
Alan referenced in his post.

mcbofh

 
 
 

Solaris Kernel debugger

Post by Jonathan Ada » Fri, 07 May 2004 02:57:54






> > |anyone know if there is a Solaris Kernel de* ?
> > |also a Memory leak detector and Performance utilities like
>  purify/quantify
> > |for kernel ?

> > Of course, mdb and it's ::findleaks macro.  (How would you expect
> > Solaris kernel engineers to get anything done without a de*?)
> > http://www.veryComputer.com/

> correct me if I am wrong but I know mdb does not have step by step
> debugging.
> am I right ?

mdb(1) can only do post-mortem (crash dump) and informative (i.e.
running against a live kernel without stopping it) debugging at the
moment.  kadb(1M) allows for interactive debugging, but is missing a
lot of the functionality developed in mdb.

As far as purify-like functionality, there is optional corruption
detection and all kinds of additional debugging information avialable
-- see the "Debugging with the Kernel Memory Allocator" chapter of the
Modular De* Answerbook for instructions on enabling it and
accessing the debugging information.

For performance analysis, etc., you should look at lockstat(1m) and
dtrace(1m) (available in Solaris Express -- see
http://www.veryComputer.com/).

- jonathan

 
 
 

1. kernel debugger for Solaris 2.2

Does anyone know about the existance of a remote kernel debugger
for Solaris 2.2? I am looking for something like dbx on the MIPS
which allowed remote source level kernel debugging via a serial line
It also used the ethernet for downloading kernels from remote
machines and several nice features.

Thanks in advance.

Vijay

2. WWW: Linux Gazette Issue #25

3. Source level kernel debugger to debug a UNIX kernel remotely

4. File permissions??

5. kgdb (kernel source level debugger) for 2.4 kernels

6. How to flush memory

7. Which debugger is window debugger?

8. No visible cursor pointer G400 - RH7 - XFree86 4.0.2-1

9. Kernel 1.1.89 & 1.1.92 ptrace vs 1.0.9 and ups debugger

10. KSLD(Kernel Source Line Debugger), Have you ever uesd this?

11. Should I expect KSLD kernel debugger to be very very slow?

12. kernel mode debugger for System V 286/386 Unix...

13. which kernel debugger is "best"?