Skip to contentSkip to conversation

about kdb for Xen

DISCUSSION Mukesh Rathor 1 participant 3 messages Mar 25, 2009 – Mar 30, 2009 5 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

You cannot continue execution when system crashed. The only thing to do is reboot. So go is disabled, as sometimes accidentally one might type that while debugging.

There is some work to get gdb to debug xen, but I'm not sure what state it's in.

To assist in debugging via kdb, use gdb on xen-syms file. Then use gdb to find
matching line numbers in C file. Look at gdb manual how to do that.

Thanks,
Mukesh

Quoted 12 lines · [email protected] wrote:

Hi Mukesh,

Why system often show"cmd not available in fatal/crashed state .....", after
enter "go" in kdb for Xen. I have just cloned the codes from the branch.

btw: Is there any other debug method for xen itself? for example, using gdb at source code level like linux or freebsd. I think it will be more convenient than kdb. You know, there are too many optimazation on code after compiled by gcc.

Cheers:)

Liu Jian

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 11 lines · Liu Jian
Quoted 8 lines · Mukesh Rathor

I think I'm not following you. If you enter go first time, the system is crashing. You are hitting an assert (BUG()) in the hypervisor. The victim is accpting input as you are able to type the second "go" when it's says cmd not avail in crash state.

After the crash, you can use dr, f, dw, etc... all those commands but not the "go" cmd.

Quoted 6 lines

Yes, "df, f, dw" works well. But the second "go" not and it show as following:

[1]xkdb> go
cmd not available in fatal/crashed state......

Of course, now target victim cannot accept any input.

You are saying you don't get kdb prompt back now?

Quoted 9 lines
Quoted 2 lines

1. what version of xen are you using?

All the code is cloned from your branch as following:

[root@localhost ~]hg clone http://xenbits.xensource.com/ext/debuggers.hg

In the compile process as following, It show the version is "3.4-unstable"

Quoted 7 lines
Quoted 1 line

2. Are you compiling hyp with -DEBUG?

I just compile xen by:

[root@localhost xen>make kdb=y

Do you mean I need other parameters?

The problem is debug is turned on. kdb is not currently supported with debug on, as I had said before. Do > make kdb=y debug=n
I also suggest frame_pointer=y to get reliable stacks.

Mukesh

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw
Quoted 8 lines · Liu Jian
Quoted 4 lines

The problem is debug is turned on. kdb is not currently supported with debug on, as I had said before. Do > make kdb=y debug=n
I also suggest frame_pointer=y to get reliable stacks.

after add "debug=n", it works well. Thanks lots!

btw: what is the function about "frame_pointer=y"?

you'll get reliable stack as the compiler will dedicate a register for stack usage.

Mukesh