Bug 74977 - [modules] dcons.ko requires KDB support
Summary: [modules] dcons.ko requires KDB support
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 5.3-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-firewire (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-12 11:00 UTC by Ulrich Spoerlein
Modified: 2005-11-25 03:53 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Spoerlein 2004-12-12 11:00:51 UTC
kldload dcons will fail for the GENERIC Kernel, because the gdb_cur
symbol is missing. The module Makefile unconditionally defines KDB and
ALT_BREAK_TO_DEBUGGER

/sys/modules/dcons/Makefile:
opt_ddb.h:
        echo "#define KDB 1" > $@

opt_comconsole.h:
        echo "#define ALT_BREAK_TO_DEBUGGER 1" > $@

Therefore, on kldload you get: kernel: link_elf: symbol gdb_cur undefined

This leads to dconschat(8) becomes useless without recompiling the
kernel.

Fix: 

Remove those two 'echo defines' from the Makefile, rebuild the module,
dconschat(8) starts working! :)

I don't know if this is the right fix however. Is KDB needed on the
_client_ to debug the _servers_ Kernel via dconschat?
How-To-Repeat: Boot GENERIC, kldload dcons
Comment 1 Tilman Keskinoz freebsd_committer freebsd_triage 2005-06-06 18:13:12 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-firewire

over to firewire Mailinglist
Comment 2 caiquanqing 2005-11-25 02:58:00 UTC
It's not a bug, please carefully read man pages of dcons and dconschat agai=
n.

In your situation, you should build kernel by new way, it is described
in handbook.

If you want to use dconschat to debug remote machine, just use it, you
don't need dcons module on local machine. There is a good example in
man page of dconschat.

If you really do want to use dcons module, you should need these debug
options, because you want to debug the kernel, locally or remotely:),
I think most of developers use dcons as debug purpose.

BR
Cai, Quanqing
Comment 3 caiquanqing 2005-11-25 03:02:27 UTC
submitter's email address is invalid, please close this PR, it's not a bug.

On 11/24/05, Cai, Quanqing <caiquanqing@gmail.com> wrote:
> It's not a bug, please carefully read man pages of dcons and dconschat ag=
ain.
>
> In your situation, you should build kernel by new way, it is described
> in handbook.
>
> If you want to use dconschat to debug remote machine, just use it, you
> don't need dcons module on local machine. There is a good example in
> man page of dconschat.
>
> If you really do want to use dcons module, you should need these debug
> options, because you want to debug the kernel, locally or remotely:),
> I think most of developers use dcons as debug purpose.
>
> BR
> Cai, Quanqing
>
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2005-11-25 03:52:53 UTC
State Changed
From-To: open->closed

Later respondant notes that this is by design, and submitter's email 
address now bounces.