set filename to null string?
Grant Edwards
grante@visi.com
Sun Oct 24 20:09:00 GMT 1999
On Mon, Oct 25, 1999 at 11:33:37AM +1000, Andrew Cagney wrote:
> > How do you set a filename to the null string?
> >
> > for example:
> >
> > (gdb) show remotelogfile
> > Filename for remote session recording is "".
> > (gdb) set remotelogfile asdf
> > (gdb) show remotelogfile
> > Filename for remote session recording is "asdf".
> >
> > How do you set it back to ""?
> >
> > I'm working on a configurable remote log capability for the RDI
> > target, and I can't figure out how to set my log file name back to
> > NULL (either NULL or "" would be fine).
>
> Er, cute :-) Looking at the code, it would appear that that isn't
> possible :-(.
> Would a separate ``set serial log {enable,disable}'' be better?
Well, it would be betting in that it would work. ;) I suppose it might
be handy to be able to disable/re-eanble logging without having to
re-enter the filename.
> BTW, the existing mechanism has other problems. If there are two
> streams active they both get logged when most likely you didn't want
> that. (The trace mechanism is similar).
>
> Feel free to work on this.
The RDI target stuff is separate from the normal serial remote target,
so I'm not actually working on the existing remote code. I was using
the same set logfile scheme to enable logging, and the code I wrote
will disable logging if you reset the filname to either NULL or "" and
then re-open the target connection.
It looks like a separate logging enable/disable command is what I'll
need to do if I want to be able to disable logging once it has been
enabled (not an absolute necessity, but I thought it might be handy).
--
Grant Edwards
grante@visi.com
More information about the Gdb
mailing list