This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Remote UDP support
> How's this look? I wasn't quite sure what to put in the text of the
>> >warning. Also added one to the manual.
>
>>
>> Problem is, its in the wrong place, and I suspect getting it into the
>> right place - remote.c - is tricky.
>>
>> I think adding a FIXME hack to remote.c (search for serial_open) that
>> checks for ``udp:'' and then print a warning is the most pratical.
>
>
> I don't understand. Why hoist it up into remote.c, before each call to
> serial_open? That just descends through serial_open to call net_open
> and the warning would arrive at the same position; the warning is
> specific to ser-tcp, and seems to belong there.
Sorry, yes the rationale was a big bit vague :-(
serial_open() provides a generic serial connection. Data that goes in
one end, hopefully, comes out the other end - it doesn't promise to be
reliable though.
remote.c, on the other hand, makes certain assumptions about the
properties of the SERIAL object it is using (only data overrun is
possible, single character transfers are reliable, ...). Hence, I think
remote.c should be the one reporting a potential problem.
Besides, if someone were to implement a remote-udp.c the warning would
be wrong :-)
enjoy,
Andrew