mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-16 20:32:21 +08:00
* sky-pke.h: PKE_REG_SET_MASK / PKE_MEM_WRITE macros updated
to check/open the debug trace file
This commit is contained in:
@ -330,12 +330,20 @@ do { \
|
||||
BIT_MASK_SET(((me)->regs[PKE_REG_##reg][0]), \
|
||||
PKE_REG_##reg##_##flag##_B, PKE_REG_##reg##_##flag##_E, \
|
||||
(value)); \
|
||||
if( indebug (me->dev.name)) \
|
||||
if( indebug ((me)->dev.name)) \
|
||||
{ \
|
||||
if (old != (value)) \
|
||||
fprintf(((me)->fifo_trace_file != NULL) ? (me)->fifo_trace_file : stdout, \
|
||||
{ \
|
||||
if (((me)->fifo_trace_file == NULL ) && \
|
||||
((me)->fifo_trace_file_name != NULL )) \
|
||||
sky_open_file (&((me)->fifo_trace_file), \
|
||||
(me)->fifo_trace_file_name, \
|
||||
(char *) NULL); \
|
||||
fprintf (((me)->fifo_trace_file != NULL) ? \
|
||||
(me)->fifo_trace_file : stdout, \
|
||||
"# Reg %s:%s = 0x%x\n", #reg, #flag, (unsigned)(value)); \
|
||||
} \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
/* get a bitfield from a register by "name" */
|
||||
@ -460,14 +468,23 @@ int read_pke_pcx (struct pke_device *device, void *buf);
|
||||
int i; \
|
||||
unsigned_##size value_te; \
|
||||
value_te = H2T_##size(value); \
|
||||
fprintf(((me)->fifo_trace_file != NULL) ? (me)->fifo_trace_file : stdout, \
|
||||
if (((me)->fifo_trace_file == NULL ) && \
|
||||
((me)->fifo_trace_file_name != NULL )) \
|
||||
sky_open_file (&((me)->fifo_trace_file), \
|
||||
(me)->fifo_trace_file_name, \
|
||||
(char *) NULL); \
|
||||
fprintf (((me)->fifo_trace_file != NULL) ? \
|
||||
(me)->fifo_trace_file : stdout, \
|
||||
"# Write %2d bytes to ", size); \
|
||||
fprintf(((me)->fifo_trace_file != NULL) ? (me)->fifo_trace_file : stdout, \
|
||||
fprintf (((me)->fifo_trace_file != NULL) ? \
|
||||
(me)->fifo_trace_file : stdout, \
|
||||
"0x%08lx: ", (unsigned long)(addr)); \
|
||||
for(i=0; i<size; i++) \
|
||||
fprintf(((me)->fifo_trace_file != NULL) ? (me)->fifo_trace_file : stdout, \
|
||||
fprintf (((me)->fifo_trace_file != NULL) ? \
|
||||
(me)->fifo_trace_file : stdout, \
|
||||
" %02x", ((unsigned_1*)(& value_te))[i]); \
|
||||
fprintf(((me)->fifo_trace_file != NULL) ? (me)->fifo_trace_file : stdout, \
|
||||
fprintf (((me)->fifo_trace_file != NULL) ? \
|
||||
(me)->fifo_trace_file : stdout, \
|
||||
"\n"); \
|
||||
} \
|
||||
} while(0)
|
||||
|
Reference in New Issue
Block a user