Operating System - HP-UX
1834406 Members
2626 Online
110067 Solutions
New Discussion

Re: debugging kernel module

 
hp-ux technical documen
Occasional Contributor

debugging kernel module

I couldnt find a place to post this kind of question, so posting in technical docs forum.. sorry about this.

I have written a DLKM module for hpux version 11i v2 (11.23). Now the machine panics due to some wrong things in my module. Problem is when I load the core through q4 or kwdb or kwdb -q4, I see the stack but I dont see my routines in that.. it just says unknown procedure, although I have compiled my module with debugging on. Following is a sample stack trace I get -
#0 0xe0000000011f48e0:0 in panic_save_regs_switchstack+0x110
(0xe000000100635e80, 0x7, 0x713, 0xe0000000011e89c0, 0x2, 0x206c6100d3,
0xe00000010094b348, 0xe0000000002d9740)
#1 0xe0000000011e8a00:0 in panic
(0xe000000000256590, 0x896, 0xe000000000b02390, 0x2, 0x206c610011,
0xe000000100635f10, 0x2e8ae6852053, 0xe0000001005bb198) at /ux/core/kern/em/svc/shutdown/panic.c:330
#2 0xe000000000b02390:0 in unaligned_hndlr
(0x9fffffff7f7e7200, 0xa, 0x0, 0x288, 0xe000000000b088c0, 0x206c61001d,
0x9fffffff7f7e71c0, 0x1) at /ux/core/kern/em/svc/misc/hl_ivt.c:1473
#3 0xe000000000b088c0:0 in bubbleup+0x740
(0x9fffffff7f7e7200, 0x9fffffff7f7e71f0, 0x9fffffff7f7e9518,
0x9fffffff7f7e8881, 0x206c61001d, 0x9fffffff7f7e7200, 0xa,
0x0)
#4 0xe000000146d369a0:0 in +0x30
(0xe00000010e27e031, 0xe00000010e27e031, 0x29, 0x3f, 0xffffffff,
0xffffffffffffffff, 0xe00000010e27e031, 0xe00000010e27e039)
#5 0xe000000146d37390:0 in +0x790
(0x0, 0xe000000146d266e0, 0xe000000146d266d0, 0x0, 0xe000000146d266e0,
0xe000000146d266d0, 0xb, 0xe00000010e27e000)
#6 0xe000000146d37520:0 in +0x120
(0x0, 0xe000000146d266d0, 0xe000000146d266e0, 0x0, 0x17c0, 0x0,
0x0, 0xe000000146d266d0)
#7 0xe000000146d37790:0 in +0x110
(0x17c0, 0x0, 0xe000000146d266e0, 0xe000000146d266d0, 0x0, 0x186,
0xe000000146d279b0, 0x0)
#8 0xe000000146d279b0:0 in +0x270
(0x0, 0x206, 0xe000000146d273b0, 0x17c0, 0x0, 0xe000000146d266e0)
#9 0xe000000146d273b0:0 in +0xf0
(0xe000000140378b00, 0xe000000140378b00, 0x10a9, 0xe000000000b17b90,
0x0, 0x206)
#10 0xe000000000b17b90:0 in mod_load_helper
(0xe000000141e6d100, 0x915, 0xe000000000b14b90, 0x2, 0x2099, 0x9fffffff7f7e7b40,
0x2e, 0x1) at /ux/core/kern/common/svc/dlkm/modctl.c:1347

I know it is a problem in my module, but I cant point out because of this.
I am attaching the makefile which I am using to compile my module. This makefile is taken from the sample driver rdisk provided with ddk package. Please suggest me if I am need to add something to get these information in the core dump.
3 REPLIES 3
Arunvijai_4
Honored Contributor

Re: debugging kernel module

Hello, You can go through the following guide for debugging Kernel modules,

http://docs.hp.com/en/J2237-90005/ch06s03.html?btnPrev=%AB%A0prev

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Arunvijai_4
Honored Contributor

Re: debugging kernel module

Hello,

You can post your question at HP DSPP mailing lists, HP-UX dev tools and CXX-Dev list.

http://h21007.www2.hp.com/dspp/ml/ml_MailingLists_IDX/1,1275,,00.html#4

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
seldane
New Member

Re: debugging kernel module

when you start kwdb use the -m option. It will cause KWDB to load your module. If you compile your module w/ -g, then KWDB will also use that information to show you source level debug information.

You can get the KWDB User Guide at the followign location.

www.hp.com/go/hpux_ddk
- pick the version
- pick the KWDB doc
No pain no gain.