This is the mail archive of the
mailing list for the GDB project.
[RFA/RFC] Report the original location specification for a breakpoint.
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 15 Apr 2008 14:34:57 +0400
- Subject: [RFA/RFC] Report the original location specification for a breakpoint.
Presently, GDB/MI fails to report the *original* location specified
for a breakpoint. As result, it's not possible to tell a breakpoint
from a breakpoint create by
This is not very nice for frontends, because if users adds a breakpoint
in GDB console, it is desirable to show the breakpoint in the breakpoints
window exactly as user have set it. Furthermore, is the list of breakpoints
is persisted by the frontend, it is crucial to persist it using the original
location. If the program source is modified, the difference betweeen foo and
foo.cpp:10 becomes significant.
This patch adds the necessary MI support for reporting the original location.
It's not ready to be checked in because MI testsuite will likely break all over.
OTOH, I've tested this with KDevelop4, and it works just fine. I'll fix this
Is this patch OK?
In fact, I wonder if I can commit patches like this, that touch files
outside of MI code but apparently change behaviour only for MI, without
approval. Any comments?
gdb/breakpoint.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 6830efe..01e0a9b 100644
@@ -3683,6 +3683,10 @@ print_one_breakpoint_location (struct breakpoint *b,
print_command_lines (uiout, l, 4);
+ if (!part_of_multiple && b->addr_string)
+ ui_out_field_string (uiout, "original-location", b->addr_string);