From owner-cvs-all@FreeBSD.ORG Sat Jul 2 23:52:37 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D17F416A41C; Sat, 2 Jul 2005 23:52:37 +0000 (GMT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA1AE43D1F; Sat, 2 Jul 2005 23:52:37 +0000 (GMT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j62NqbC4029715; Sat, 2 Jul 2005 23:52:37 GMT (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j62NqbYN029713; Sat, 2 Jul 2005 23:52:37 GMT (envelope-from marcel) Message-Id: <200507022352.j62NqbYN029713@repoman.freebsd.org> From: Marcel Moolenaar Date: Sat, 2 Jul 2005 23:52:37 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/ia64/ia64 db_interface.c src/sys/ia64/include db_machdep.h src/sys/ddb db_command.c ddb.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jul 2005 23:52:38 -0000 marcel 2005-07-02 23:52:37 UTC FreeBSD src repository Modified files: sys/ia64/ia64 db_interface.c sys/ia64/include db_machdep.h sys/ddb db_command.c ddb.h Log: Implement functions calls from within DDB on ia64. On ia64 a function pointer doesn't point to the first instruction of that function, but rather to a descriptor. The descriptor has the address of the first instruction, as well as the value of the global pointer. The symbol table doesn't know anything about descriptors, so if you lookup the name of a function you get the address of the first instruction. The cast from the address, which is the result of the symbol lookup, to a function pointer as is done in db_fncall is therefore invalid. Abstract this detail behind the DB_CALL macro. By default DB_CALL is defined as db_fncall_generic, which yields the old behaviour. On ia64 the macro is defined as db_fncall_ia64, in which a descriptor is constructed to yield a valid function pointer. While here, introduce DB_MAXARGS. DB_MAXARGS replaces the existing (local) MAXARGS. The DB_MAXARGS macro can be defined by platforms to create a convenient maximum. By default this will be the legacy 10. On ia64 we define this macro to be 8, for 8 is the maximum number of arguments that can be passed in registers. This avoids having to implement spilling of arguments on the memory stack. Approved by: re (dwhite) Revision Changes Path 1.60 +24 -16 src/sys/ddb/db_command.c 1.39 +10 -0 src/sys/ddb/ddb.h 1.27 +20 -0 src/sys/ia64/ia64/db_interface.c 1.12 +4 -0 src/sys/ia64/include/db_machdep.h