exec-file-mismatch and native-gdbserver testing

Philippe Waroquiers philippe.waroquiers@skynet.be
Fri May 8 21:25:07 GMT 2020


On Fri, 2020-05-08 at 10:30 +0000, Metzger, Markus T wrote:
> Hello Philippe,
> 
> > > > In exec.c:validate_exec_file (), we check the filenames and, if they differ,
> > print
> > > a warning and re-load the symbol file.
> > > > Should validate_exec_file () check more than just the filenames?
> > > You mean: if the filenames differs, gdb could compare the contents of files and
> > if
> > > equal,
> > > not ask the question, considering there is no mismatch ?
> > 
> > It could compare build-ids, for example.
> > 
> > If there are no build-ids, it may fall back to comparing file contents as you
> > suggested.
> 
> Does that sound OK to you?
> 
> Thanks,
> Markus.
Hello Markus,

If build ids of 2 files are equal, then effectively, validate_exec_file
can consider the existing file is still ok.
I had however no time to dig on that, and see if such build ids can be
easily extracted/retrieved in validate_exec_file.

I had no time to dig more on that, sorry

Philippe




More information about the Gdb mailing list