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 4/4] compile: Add 'set compile-gcc'


On Wed, 22 Apr 2015 09:21:14 +0200, Eli Zaretskii wrote:
> > parameter of GCC's set_arguments.  GCC decides on the meaning of the
> > triplet_regexp parameter according to the success of:
> > 
> > +  if (access (triplet_regexp, X_OK) == 0)
> 
> Does triplet_regexp include the .exe extension on platforms that need
> it?  Otherwise, 'access' will fail on those platforms.  (Sorry,
> couldn't see where's the actual code, so couldn't verify that myself.)

Actual code is:
    triplet_rx = compile_gcc;
  add_setshow_string_cmd ("compile-gcc", class_support,
                          &compile_gcc,
so whatever user sets by 'set compile-gcc' GDB command will be passed.


> > +  add_setshow_string_cmd ("compile-gcc", class_support,
> > +			  &compile_gcc,
> 
> This doesn't offer file-name completion, does it?  I think it should.

Fixed.


> > +                          By default the environment variable
> > +@code{PATH} (@code{PATH} from shell that executed @value{GDBN}, not the
> > +one set by @value{GDBN} command @code{set environment}).
> 
> This sentence is incomplete, I think you need to combine it with the
> next one.  (I suggest to say the simple thing first, and then add the
> caveat about which PATH is searched, instead of having the caveat in
> the middle, making it harder to comprehend.)

Changed it all a bit.


> > +Besides the compiler driver @value{GDBN} needs also shared library
> > +@file{libcc1.so}.  It is searched in default shared library search path
> > +(overridable with usual environment variable @code{LD_LIBRARY_PATH}),
> > +unrelated to @code{PATH} or @code{set compile-gcc} settings.
> 
> This is Unix logic, btw.  On Windows, libcc1.dll will either be in the
> same directory where the GCC driver is, or on PATH, or in libexec.  So
> maybe you should qualify the above by saying this is on Posix hosts;
> we could then amend it when this is supported on Windows (assuming it
> isn't for now).

I do not think it would work on MS-Windows host as gcc/libcc1/ uses:
	# If any of these functions are missing, simply don't bother building
	# this plugin.
	GCC_ENABLE_PLUGINS
	AC_CHECK_FUNC(socketpair, , enable_plugin=no)
	AC_CHECK_FUNC(select, , enable_plugin=no)
	AC_CHECK_FUNC(fork, , enable_plugin=no)
	AM_CONDITIONAL(ENABLE_PLUGIN, test $enable_plugin = yes)


New patch is posted at:
	[PATCH v3 2/2] compile: Add 'set compile-gcc'
	https://sourceware.org/ml/gdb-patches/2015-04/msg00915.html
	Message-ID: <20150423210815.GA8626@host1.jankratochvil.net>


Thanks,
Jan


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