This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Have an option to tell GDB to detect and possibly handle mismatched exec-files.
- From: Tom Tromey <tom at tromey dot com>
- To: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 19 Mar 2019 10:43:47 -0600
- Subject: Re: [RFC] Have an option to tell GDB to detect and possibly handle mismatched exec-files.
- References: <20190318225822.4820-1-philippe.waroquiers@skynet.be>
>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
Philippe> A recurrent problem with GDB is that GDB uses the wrong exec-file
Philippe> when using the attach/detach commands sucessfully.
Philippe> Also, in case the user specifies a file on the command line but attaches
Philippe> to the wrong PID, this error is not made visible and gives a not user
Philippe> understandable behaviour.
I've been bitten any number of times by this. So, it would be great to
have this fixed.
Philippe> There was a previous trial to fix this PR.
Philippe> See https://sourceware.org/ml/gdb-patches/2015-07/msg00118.html
Philippe> This trial was however only fixing the problem for the automatically
Philippe> determined executable files when doing attach.
There was also this series:
https://sourceware.org/ml/gdb-patches/2014-03/msg00476.html
... which seemingly went through at least 4 rounds of review and then
did not land for some reason.
Before approving anything I would like to understand why neither of
these earlier attempts went in.
The build-id approach is appealing because (especially since the demise
of prelink) it seems that gdb could simply trust it and abandon
non-matching symbol files, without needing a "user supplied" bit.
Tom