Bug 10754 - breakpoints referring to JITted code should be disabled between runs
Summary: breakpoints referring to JITted code should be disabled between runs
Status: UNCONFIRMED
Alias: None
Product: gdb
Classification: Unclassified
Component: breakpoints (show other bugs)
Version: unknown
: P2 normal
Target Milestone: 6.8
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-10 23:51 UTC by Zoltan Varga
Modified: 2012-08-09 19:07 UTC (History)
4 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build: x86_64-pc-linux-gnu
Last reconfirmed:


Attachments
patch against gdb 7.0 (557 bytes, patch)
2009-10-10 23:51 UTC, Zoltan Varga
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltan Varga 2009-10-10 23:51:03 UTC
When a breakpoint is placed on a location which is described by a symbol file
registered using the new JIT interface in gdb 7.0, and the program is restarted,
it will fail with a message like:
Warning:                                                                       
                         
Cannot insert breakpoint 1.                                                    
                         
Error accessing memory address 0x40010200: Input/output error.       

This is because the breakpoint is resolved to the address of a JITted function
which doesn't exist at the start of the next run.

The attached patch fixes this by disabling breakpoint locations referring to
JITted code between runs. Its against the gdb 7.0 sources. I hope its of 
acceptable quality.
Comment 1 Zoltan Varga 2009-10-10 23:51:51 UTC
Created attachment 4264 [details]
patch against gdb 7.0
Comment 2 Tom Tromey 2010-02-04 19:37:12 UTC
The best thing to do is submit the patch following the
contribution instructions; see http://sourceware.org/gdb/contribute/
FWIW the idea seems reasonable to me.