Subject: Re: port-amd64/30828: amd64 unable to boot into DDB
To: None <port-amd64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Martin Husemann <martin@duskware.de>
List: netbsd-bugs
Date: 11/27/2007 09:35:02
The following reply was made to PR port-amd64/30828; it has been noted by GNATS.

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-amd64/30828: amd64 unable to boot into DDB
Date: Tue, 27 Nov 2007 10:30:50 +0100

 --SUOF0GtieIMvvwua
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 The problem still exists in -current.
 
 With the attached patch a kernel boots, but if I remove the first return
 (before the call to db_stopped_at) it gets back to the debug printf, but then
 crashes.
 
 Some problem with the kernel stack? Or is there a watchdog running?
 
 Martin
 
 --SUOF0GtieIMvvwua
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=patch
 
 Index: db_run.c
 ===================================================================
 RCS file: /cvsroot/src/sys/ddb/db_run.c,v
 retrieving revision 1.31
 diff -u -p -r1.31 db_run.c
 --- db_run.c	23 Sep 2007 23:55:55 -0000	1.31
 +++ db_run.c	27 Nov 2007 09:12:00 -0000
 @@ -84,6 +84,8 @@ db_stop_at_pc(db_regs_t *regs, bool *is_
  	db_addr_t	pc;
  	db_breakpoint_t bkpt;
  
 +	return false;
 +
  	pc = PC_REGS(regs);
  
  #ifdef	FIXUP_PC_AFTER_BREAK
 Index: db_trap.c
 ===================================================================
 RCS file: /cvsroot/src/sys/ddb/db_trap.c,v
 retrieving revision 1.24
 diff -u -p -r1.24 db_trap.c
 --- db_trap.c	21 Feb 2007 22:59:57 -0000	1.24
 +++ db_trap.c	27 Nov 2007 09:12:00 -0000
 @@ -69,6 +69,7 @@ db_trap(int type, int code)
  
  	if (db_trap_callback) db_trap_callback(1);
  
 +return;
  	if (db_stop_at_pc(DDB_REGS, &bkpt)) {
  		if (db_inst_count) {
  			db_printf("After %d instructions "
 @@ -101,6 +102,9 @@ db_trap(int type, int code)
  		db_command_loop();
  	}
  
 +printf("debug printf\n");
 +return;
 +
  	db_restart_at_pc(DDB_REGS, watchpt);
  
  	if (db_trap_callback)
 
 --SUOF0GtieIMvvwua--