Re: Script autoloading

Tom Tromey <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
>>>>> "Jan" == Jan Vrany <[email protected]> writes:

Jan> However, I struggle to make this working also on Windows, where the 
Jan> library is named "librun.dll", not "librun.so'. 

Jan> I thought I'd use .debug_gdb_scripts section as described in 
Jan> GDB manual, but this does not work very good since $cdir is 
Jan> not searched in that case. 

Jan> Any idea how to make it working on both, Linux and Windows with
Jan> no additional setup (other than autoload-safe path)? What's is the 
Jan> rationale for excluding $cdir from source directories when searching
Jan> for scipts?

I don't know why $cdir isn't searched, other than what the manual says:

    If the entry specifies a file, GDB will look for the file first in the
    current directory and then along the source search path (*note
    Specifying Source Directories: Source Path.), except that '$cdir' is not
    searched, since the compilation directory is not relevant to scripts.

This doesn't really explain it to me, though, since the compilation
directory is used to find sources.


Why can't you just rename the file at install time, depending on what
the library is called?  It seems like your build system is already doing
that for the library itself.

Tom
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.