NetBSD-Bugs archive

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

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



The following reply was made to PR port-amd64/38969; it has been noted by GNATS.

From: Simon Burge <simonb%NetBSD.org@localhost>
To: David Laight <david%l8s.co.uk@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, port-amd64-maintainer%netbsd.org@localhost,
    gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: port-amd64/38969: ddb backtrace on amd64 doesn't show function 
arguments 
Date: Thu, 19 Jun 2008 15:09:54 +1000

 David Laight wrote:
 
 >  On Tue, Jun 17, 2008 at 06:25:00AM +0000, Simon Burge wrote:
 >  > >Number:         38969
 >  > >Category:       port-amd64
 >  > >Synopsis:       ddb backtrace on amd64 doesn't show function arguments
 >  > 
 >  > >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?
 >  
 >  The problem is that the first 6? arguments are passed in registers
 >  so are very hard to locate.
 
 That's what I meant by "tempt the compiler ...".  Sure it'd be a
 performance hit, but if there was some flag to say "save every arg on
 the stack on each function entry" that'd make backtraces much more
 useful.
 
 Cheers,
 Simon.
 


Home | Main Index | Thread Index | Old Index