Browse Source

debug: replace __FILE__ by RIOT_RELATIVE_FILE

dev/timer
Oleg Hahm 7 years ago
parent
commit
e15bdd257a
  1. 8
      core/msg.c
  2. 4
      cpu/lpc2387/lpc2387-adc.c
  3. 11
      cpu/lpc2387/mci/lpc2387-mci.c
  4. 4
      cpu/msp430-common/include/assert.h
  5. 2
      cpu/stellaris_common/include/stellaris_periph/debug.h
  6. 4
      sys/crypto/3des.c
  7. 7
      sys/include/embUnit/AssertImpl.h
  8. 17
      sys/net/routing/nhdp/iib_table.c
  9. 9
      sys/trickle/trickle.c

8
core/msg.c

@ -94,17 +94,17 @@ static int _msg_send(msg_t *m, kernel_pid_t target_pid, bool block, unsigned sta
}
DEBUG("msg_send() %s:%i: Sending from %" PRIkernel_pid " to %" PRIkernel_pid
". block=%i src->state=%i target->state=%i\n", __FILE__, __LINE__,
sched_active_pid, target_pid,
". block=%i src->state=%i target->state=%i\n", RIOT_FILE_RELATIVE,
__LINE__, sched_active_pid, target_pid,
block, sched_active_thread->status, target->status);
if (target->status != STATUS_RECEIVE_BLOCKED) {
DEBUG("msg_send() %s:%i: Target %" PRIkernel_pid " is not RECEIVE_BLOCKED.\n",
__FILE__, __LINE__, target_pid);
RIOT_FILE_RELATIVE, __LINE__, target_pid);
if (queue_msg(target, m)) {
DEBUG("msg_send() %s:%i: Target %" PRIkernel_pid
" has a msg_queue. Queueing message.\n", __FILE__,
" has a msg_queue. Queueing message.\n", RIOT_FILE_RELATIVE,
__LINE__, target_pid);
restoreIRQ(state);
if (sched_active_thread->status == STATUS_REPLY_BLOCKED) {

4
cpu/lpc2387/lpc2387-adc.c

@ -134,7 +134,7 @@ uint16_t adc_read(uint8_t channel)
}
adc_data = (regVal >> 6) & 0x3FF;
DEBUG("%s, %d: %lu\n", __FILE__, __LINE__, t1);
DEBUG("%s, %d: %lu\n", __FILE__, __LINE__, t2);
DEBUG("%s, %d: %lu\n", RIOT_FILE_RELATIVE, __LINE__, t1);
DEBUG("%s, %d: %lu\n", RIOT_FILE_RELATIVE, __LINE__, t2);
return (uint16_t) adc_data; /* return A/D conversion value */
}

11
cpu/lpc2387/mci/lpc2387-mci.c

@ -558,7 +558,7 @@ DSTATUS MCI_initialize(void)
do { /* Wait while card is busy state (use ACMD41 with HCS bit) */
/* This loop will take a time. Insert wai_tsk(1) here for multitask envilonment. */
if (xtimer_now() > start + 1000000/*!Timer[0]*/) {
DEBUG("%s, %d: Timeout #1\n", __FILE__, __LINE__);
DEBUG("%s, %d: Timeout #1\n", RIOT_FILE_RELATIVE, __LINE__);
goto di_fail;
}
}
@ -579,12 +579,12 @@ DSTATUS MCI_initialize(void)
}
do { /* Wait while card is busy state (use ACMD41 or CMD1) */
DEBUG("%s, %d: %lX\n", __FILE__, __LINE__, resp[0]);
DEBUG("%s, %d: %lX\n", RIOT_FILE_RELATIVE, __LINE__, resp[0]);
/* This loop will take a time. Insert wai_tsk(1) here for multitask envilonment. */
if (xtimer_now() > start + 1000000/*!Timer[0]*/) {
DEBUG("now: %lu, started at: %lu\n", xtimer_now(), start);
DEBUG("%s, %d: Timeout #2\n", __FILE__, __LINE__);
DEBUG("%s, %d: Timeout #2\n", RIOT_FILE_RELATIVE, __LINE__);
goto di_fail;
}
}
@ -597,7 +597,8 @@ DSTATUS MCI_initialize(void)
/*---- Card is 'ready' state ----*/
if (!send_cmd(CMD2, 0, 2, resp)) {
DEBUG("%s, %d: Failed entering ident state", __FILE__, __LINE__);
DEBUG("%s, %d: Failed entering ident state", RIOT_FILE_RELATIVE,
__LINE__);
goto di_fail; /* Enter ident state */
}
@ -609,7 +610,7 @@ DSTATUS MCI_initialize(void)
if (ty & CT_SDC) { /* SDC: Get generated RCA and save it */
if (!send_cmd(CMD3, 0, 1, resp)) {
DEBUG("%s, %d: Failed generating RCA\n", __FILE__, __LINE__);
DEBUG("%s, %d: Failed generating RCA\n", RIOT_FILE_RELATIVE, __LINE__);
goto di_fail;
}

4
cpu/msp430-common/include/assert.h

@ -51,8 +51,8 @@ extern "C" {
#ifndef NDEBUG
# define assert(assertion) \
if (!(assertion)) { \
printf("%s:%d: %s: Assertion '%s' failed", __FILE__, __LINE__, \
ASSERT_FUNC, #assertion); \
printf("%s:%d: %s: Assertion '%s' failed", RIOT_FILE_RELATIVE, \
__LINE__, ASSERT_FUNC, #assertion); \
abort(); \
}
#else

2
cpu/stellaris_common/include/stellaris_periph/debug.h

@ -62,7 +62,7 @@ extern void __error__(char *pcFilename, unsigned long ulLine);
#define ASSERT(expr) { \
if(!(expr)) \
{ \
__error__(__FILE__, __LINE__); \
__error__(RIOT_FILE_RELATIVE, __LINE__); \
} \
}
#else

4
sys/crypto/3des.c

@ -321,7 +321,7 @@ int tripledes_decrypt(const cipher_context_t *context, const uint8_t *crypt, uin
if (!key) {
DEBUG("%s:%d in %s: [ERROR] Could NOT malloc space for the des3_key_s struct.\r\n",
__FILE__, __LINE__, DEBUG_FUNC);
RIOT_FILE_RELATIVE, __LINE__, DEBUG_FUNC);
return -1;
}
@ -330,7 +330,7 @@ int tripledes_decrypt(const cipher_context_t *context, const uint8_t *crypt, uin
if (res < 0) {
DEBUG("%s:%d in %s: [ERROR] des3_key_setup failed with Code %i\r\n",
__FILE__, __LINE__, DEBUG_FUNC, res);
RIOT_FILE_RELATIVE, __LINE__, DEBUG_FUNC, res);
free(key);
return -2;
}

7
sys/include/embUnit/AssertImpl.h

@ -49,7 +49,7 @@ void assertImplementationCStr(const char *expected,const char *actual, long line
__typeof__(expected_) ____expected__ = expected_; \
__typeof__(actual_) ____actual__ = actual_; \
if (stdimpl_strcmp(____expected__, ____actual__) != 0) { \
assertImplementationCStr(____expected__, ____actual__, __LINE__, __FILE__); \
assertImplementationCStr(____expected__, ____actual__, __LINE__, RIOT_FILE_RELATIVE); \
return; \
} \
} while (0)
@ -59,7 +59,8 @@ void assertImplementationCStr(const char *expected,const char *actual, long line
long long ____expected__ = (long long) (expected_); \
long long ____actual__ = (long long) (actual_); \
if (____expected__ != ____actual__) { \
assertImplementationLongLong(____expected__, ____actual__, __LINE__, __FILE__); \
assertImplementationLongLong(____expected__, ____actual__, \
__LINE__, RIOT_FILE_RELATIVE); \
return; \
} \
} while (0)
@ -91,7 +92,7 @@ void assertImplementationCStr(const char *expected,const char *actual, long line
#define TEST_FAIL(message) \
do { \
addFailure((message), __LINE__, __FILE__); \
addFailure((message), __LINE__, RIOT_FILE_RELATIVE); \
return; \
} while (0)

17
sys/net/routing/nhdp/iib_table.c

@ -195,7 +195,7 @@ void iib_fill_wr_addresses(kernel_pid_t if_pid, struct rfc5444_writer *wr)
default:
/* Should not happen */
DEBUG("%s:%d in %s: [WARNING] Unknown link tuple status\n",
__FILE__, __LINE__, DEBUG_FUNC);
RIOT_FILE_RELATIVE, __LINE__, DEBUG_FUNC);
break;
}
}
@ -261,8 +261,9 @@ void iib_process_metric_msg(iib_link_set_entry_t *ls_entry, uint64_t int_time)
/* NHDP_METRIC is not set properly */
(void)ls_entry;
(void)int_time;
DEBUG("%s:%d in %s: [WARNING] Unknown NHDP_METRIC setting\n", __FILE__,
__LINE__, DEBUG_FUNC); #endif
DEBUG("%s:%d in %s: [WARNING] Unknown NHDP_METRIC setting\n",
RIOT_FILE_RELATIVE, __LINE__, DEBUG_FUNC);
#endif
}
void iib_process_metric_pckt(iib_link_set_entry_t *ls_entry, uint32_t metric_out, uint16_t seq_no)
@ -333,8 +334,9 @@ void iib_process_metric_pckt(iib_link_set_entry_t *ls_entry, uint32_t metric_out
(void)ls_entry;
(void)metric_out;
(void)seq_no;
DEBUG("%s:%d in %s: [WARNING] Unknown NHDP_METRIC setting\n", __FILE__,
__LINE__, DEBUG_FUNC); #endif
DEBUG("%s:%d in %s: [WARNING] Unknown NHDP_METRIC setting\n",
RIOT_FILE_RELATIVE, __LINE__, DEBUG_FUNC);
#endif
}
void iib_process_metric_refresh(void)
@ -345,8 +347,9 @@ void iib_process_metric_refresh(void)
dat_metric_refresh();
#else
/* NHDP_METRIC is not set properly */
DEBUG("%s:%d in %s: [WARNING] Unknown NHDP_METRIC setting\n", __FILE__,
__LINE__, DEBUG_FUNC); #endif
DEBUG("%s:%d in %s: [WARNING] Unknown NHDP_METRIC setting\n",
RIOT_FILE_RELATIVE, __LINE__, DEBUG_FUNC);
#endif
}

9
sys/trickle/trickle.c

@ -37,12 +37,13 @@ void trickle_interval(trickle_t *trickle)
DEBUG("TRICKLE new Interval %" PRIu32 "\n", trickle->I);
if (trickle->I == 0) {
DEBUG("%s:%d in %s: [WARNING] Interval was 0\n", __FILE__, __LINE__,
DEBUG_FUNC);
DEBUG("%s:%d in %s: [WARNING] Interval was 0\n", RIOT_FILE_RELATIVE,
__LINE__, DEBUG_FUNC);
if (trickle->Imax == 0) {
DEBUG("%s:%d in %s: [WARNING] Imax == 0\n", __FILE__, __LINE__,
DEBUG_FUNC); }
DEBUG("%s:%d in %s: [WARNING] Imax == 0\n", RIOT_FILE_RELATIVE,
__LINE__, DEBUG_FUNC);
}
trickle->I = (trickle->Imin << trickle->Imax);
}

Loading…
Cancel
Save