diff options
author | Patrick Macdonald <patrickm@redhat.com> | 1998-06-25 18:58:10 +0000 |
---|---|---|
committer | Patrick Macdonald <patrickm@redhat.com> | 1998-06-25 18:58:10 +0000 |
commit | 80b86d36b3d7addb69834381e0689cbe03378001 (patch) | |
tree | 0d12481ee1c42f6535a6bd6326a5875d84313756 /sim | |
parent | 5eb78d70cc3a65fb4d60046ebdc43c17f8b93b37 (diff) | |
download | gdb-80b86d36b3d7addb69834381e0689cbe03378001.zip gdb-80b86d36b3d7addb69834381e0689cbe03378001.tar.gz gdb-80b86d36b3d7addb69834381e0689cbe03378001.tar.bz2 |
* sky-pke.c (pke_issue): use default trace file name if the
--log-file option not used
Diffstat (limited to 'sim')
-rw-r--r-- | sim/mips/sky-pke.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sim/mips/sky-pke.c b/sim/mips/sky-pke.c index 7b711f2..e89385f 100644 --- a/sim/mips/sky-pke.c +++ b/sim/mips/sky-pke.c @@ -72,6 +72,9 @@ struct fifo_quadword* pke_fifo_fit(struct pke_fifo*); struct fifo_quadword* pke_fifo_access(struct pke_fifo*, unsigned_4 qwnum); void pke_fifo_old(struct pke_fifo*, unsigned_4 qwnum); +/* Default --log-file names */ +const char *pke0_default_trace = "vif0.s"; +const char *pke1_default_trace = "vif1.s"; /* Static data */ @@ -665,9 +668,18 @@ pke_issue(SIM_DESC sd, struct pke_device* me) } /* open trace file if necessary */ - if(me->trace_file == NULL && - me->trace_file_name != NULL) + if((me->flags & PKE_FLAG_TRACE_ON) && + (me->trace_file == NULL)) { + /* use default names */ + if(me->trace_file_name == NULL) + { + if(me->pke_number == 0) + me->trace_file_name = (char *) pke0_default_trace; + else + me->trace_file_name = (char *) pke1_default_trace; + } + sky_open_file(& (me->trace_file), me->trace_file_name, (char *) NULL, _IOFBF ); |