Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 14326)
+++ wp-includes/functions.php	(working copy)
@@ -3158,10 +3158,27 @@
 
 	// Allow plugin to filter the output error trigger
 	if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
+
+		// gain info about context by looking in backtrace
+		$context = ''; 
+		$trace   = debug_backtrace();
+		if ( 1 < count( $trace ) && ( $trace = $trace[1] ) ) {
+			// handle missing information on lambdas etc.
+			foreach ( array('line', 'file') as $set )
+				if ( !isset( $trace[$set] ) )
+					$trace[$set] = "[no $set context]";
+
+			// remove ABSPATH from filename
+			if ( '[' != $trace[$set][0] ) 
+				$trace[$set] = substr( $trace[$set], strlen( ABSPATH ) );
+
+			$context = sprintf(' Called in file <strong>%s</strong> on line %s.', htmlspecialchars($trace['file']), $trace['line']);
+		}
+
 		if ( ! is_null($replacement) )
-			trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
+			trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.%4$s'), $function, $version, $replacement, $context ) );
 		else
-			trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
+			trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.%3$s'), $function, $version, $context ) );
 	}
 }
 
