sim: common: replace SIM_FILTER_PATH with lbasename

This helper macro has largely the same behavior as libiberty's lbasename.
There is a slight nuance related to colons, but it's not clear what the
point of that is, and the code implies that it just wants the basename.
This commit is contained in:
Mike Frysinger
2015-06-24 00:36:06 +05:45
parent 8d0978fb4b
commit e750549018
3 changed files with 16 additions and 26 deletions

View File

@@ -25,6 +25,7 @@
#include "sim-main.h"
#include "sim-assert.h"
#include "libiberty.h"
#ifdef HAVE_STRING_H
#include <string.h>
@@ -147,11 +148,7 @@ do \
if (STRACE_EVENTS_P (sd)) \
{ \
if (STRACE_DEBUG_P (sd)) \
{ \
const char *file; \
SIM_FILTER_PATH (file, __FILE__); \
trace_printf (sd, NULL, "%s:%d: ", file, __LINE__); \
} \
trace_printf (sd, NULL, "%s:%d: ", lbasename (__FILE__), __LINE__); \
trace_printf ARGS; \
} \
} \