This is the mail archive of the
mailing list for the GDB project.
Re: Can we make gdbinit.in set the data-directory to @srcdir@?
On Tuesday 06 October 2009 06:34:39, Doug Evans wrote:
> I think data-dir *is* set on start up, and we want it to.
> The testcase should set data-dir to something appropriate instead of
> assuming what it is (or isn't).
> Maybe the testcase could set data-dir to something that doesn't exist
> when testing for non-existent xml files, etc.
> Since the syscall files aren't read until the first request, one can
> set data-dir to a non-existent directory first, and then do "catch
FTR, there are a few issues with when is the syscall file read.
First, when the user changes the data-directory, gdb doesn't try
to re-read the syscall file. This means no ammount of
"set data-directory" to point at the real data directory path
fixes "catch syscall" after gdb having noticed it didn't find
the xml once.
Second, the syscall file and the syscall name mappings aren't
associated with gdbarch, they're global. This means that e.g., a
gdb configured with native linux debugging support connected to
a !linux remote target of linux remote target !arch than the native
target mistakingly uses the native syscall name mapping. I'll probably
file PRs for these.