NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-amd64/38969: ddb backtrace on amd64 doesn't show function arguments



>Number:         38969
>Category:       port-amd64
>Synopsis:       ddb backtrace on amd64 doesn't show function arguments
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 17 06:25:00 +0000 2008
>Originator:     Simon Burge
>Release:        Any?
>Organization:
>Environment:
        Architecture: amd64
        Machine: amd64
>Description:
        ddb's "backtrace" command doesn't show any function arguments
        on an amd64 machine.  One example is:

                db{5}> bt
                breakpoint() at netbsd:breakpoint+0x5
                panic() at netbsd:panic+0x260
                __kernassert() at netbsd:__kernassert+0x2d
                uipc_usrreq() at netbsd:uipc_usrreq+0x850
                sosend() at netbsd:sosend+0x506
                soo_write() at netbsd:soo_write+0x2d
                dofilewrite() at netbsd:dofilewrite+0x81
                sys_write() at netbsd:sys_write+0x72
                syscall() at netbsd:syscall+0x9a

>How-To-Repeat:
        Type "bt" at a ddb prompt on an amd64 machine.

>Fix:
        Not sure.  Just changing amd64/md64/db_trace.c:db_numargs()
        to return "6" instead of "0" didn't look to provide realistic
        function args at a glance - I think this is similar to
        sparc/mips/<other-register-args-archs> do?  Maybe tempt the
        compiler somehow to save function arguments on the stack?



Home | Main Index | Thread Index | Old Index