From patchwork Mon Feb 4 15:27:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 2093281 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 796D03FC23 for ; Mon, 4 Feb 2013 15:58:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 67A86E6027 for ; Mon, 4 Feb 2013 07:58:45 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F2F3E60E7 for ; Mon, 4 Feb 2013 07:29:55 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 04 Feb 2013 07:29:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,600,1355126400"; d="scan'208";a="257442160" Received: from unknown (HELO dyon.amr.corp.intel.com) ([10.255.12.132]) by orsmga001.jf.intel.com with ESMTP; 04 Feb 2013 07:29:54 -0800 From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Mon, 4 Feb 2013 15:27:56 +0000 Message-Id: <1359991705-5254-62-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 1.7.7.5 In-Reply-To: <1359991705-5254-1-git-send-email-damien.lespiau@intel.com> References: <1359991705-5254-1-git-send-email-damien.lespiau@intel.com> Subject: [Intel-gfx] [PATCH 61/90] assembler: Add the input filename to the error/warning messages X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Signed-off-by: Damien Lespiau --- assembler/gen4asm.h | 2 ++ assembler/gram.y | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assembler/gen4asm.h b/assembler/gen4asm.h index 1e67c1c..9558a29 100644 --- a/assembler/gen4asm.h +++ b/assembler/gen4asm.h @@ -47,6 +47,8 @@ extern long int gen_level; #define WARN_ALL (1 << 31) extern unsigned int warning_flags; +extern char *input_filename; + extern struct brw_context genasm_context; extern struct brw_compile genasm_compile; diff --git a/assembler/gram.y b/assembler/gram.y index b3578e8..93d3bd5 100644 --- a/assembler/gram.y +++ b/assembler/gram.y @@ -120,10 +120,10 @@ static void message(enum message_level level, YYLTYPE *location, va_list args; if (location) - fprintf(stderr, "%d:%d: %s: ", location->first_line, + fprintf(stderr, "%s:%d:%d: %s: ", input_filename, location->first_line, location->first_column, level_str[level]); else - fprintf(stderr, "%s: ", level_str[level]); + fprintf(stderr, "%s:%s: ", input_filename, level_str[level]); va_start(args, fmt); vfprintf(stderr, fmt, args);