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: [RFC] Have an option to tell GDB to detect and possibly handle mismatched exec-files.


>>>>> "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


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