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: fix PR 13987


On Monday, September 17 2012, Tom Tromey wrote:

> This fixes PR 13987.
>
> The bug is that a PIE executable that uses the JIT API will cause gdb to
> give an error when re-setting the internal JIT breakpoint.  This happens
> because jit.c caches some data and doesn't update the cache when the
> executable is relocated.
>
> This patch fixes the bug by changing how the JIT breakpoint is managed.
> Now it is handled more like the longjmp master breakpoint: deleted and
> recreated during each re-set.  The cache is still used, but now just to
> hold the relevant minimal symbols used to re-create the breakpoint.

I spent some time investigating this bug last Friday.  Thanks Tom for
the quick response.

I believe the patch is good.  I was trying another approach to fix it:
revert some parts of a7262466d02155f5f70422804e5971f8d5e78118,
specifically the observer for when the inferior is created or the
executable is changed.  Anyway, I still did not have good results and
was going to try it more today, but you were faster.

Your fix is cleaner than that approach with observers, so FWIW the patch
is OK to me.

-- 
Sergio


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