This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch 1/3] Code cleanup: strcpy + strlen -> sprintf


On Wed, 19 Oct 2011 15:57:44 +0200, Tom Tromey wrote:
> Jan> I am unfamiliar with gdbserver but there is no single use of snprintf while
> Jan> 75 uses of sprintf.  Isn't it for some platform compatibility?
> 
> The gnulib page is informative:
> 
> http://www.gnu.org/s/hello/manual/gnulib/snprintf.html

thanks, this and
	http://www.gnu.org/s/hello/manual/gnulib/sprintf.html
would suggest sprintf wrt OS compatibility is OK but snprintf is not and
therefore this [patch 1/3] is the best + compatible variant.

Still I no longer mind much, I am going to drop this 3-part series (unless
discussed otherwise) and return back to the former form with incompatible/new
SVR4 protocol and separate protocol producer/consumer:
	Re: [patch 3/3] Implement qXfer:libraries for Linux/gdbserver #2
	http://sourceware.org/ml/gdb-patches/2011-10/msg00175.html

This variant has no technical advantages, the code is just more tricky.


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]