Discussion:
[Bug gdb/23703] New: -break-delete should allow to delete by file and line
b2.temp at gmx dot com
2018-09-23 16:20:29 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23703

Bug ID: 23703
Summary: -break-delete should allow to delete by file and line
Product: gdb
Version: 8.1.1
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: b2.temp at gmx dot com
Target Milestone: ---

As it worked previously when using the "clear" TUI command when it still was
allowed in MI mode.

Expected syntax is "-break-delete --source <fname> --line <number>", to be
consistent with the "-break-insert" equivalent.

For example if my UI at some points send


-break-insert --source foo.c --line 42

I really expect to be able to do the opposite, i.e


-break-delete --source foo.c --line 42

Actually i even think that any syntax allowed with "-break-insert" MUST have
its "-break-delete" counterpart.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-23 19:09:06 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23703

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Basile B. from comment #0)
Post by b2.temp at gmx dot com
As it worked previously when using the "clear" TUI command when it still was
allowed in MI mode.
If this doesn't work, I think it deserves a separate bug.
As far as I know CLI commands should continue to work in MI,
as well as they always have at least.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-23 13:39:38 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23703

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Component|gdb |mi
--
You are receiving this mail because:
You are on the CC list for the bug.
simon.marchi at ericsson dot com
2018-09-23 19:52:31 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23703

Simon Marchi <simon.marchi at ericsson dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |simon.marchi at ericsson dot com

--- Comment #2 from Simon Marchi <simon.marchi at ericsson dot com> ---
(In reply to Basile B. from comment #0)
Post by b2.temp at gmx dot com
As it worked previously when using the "clear" TUI command when it still was
allowed in MI mode.
Ok, I just tried it and I think I know why the command seems to not work
anymore. Some commit, I think this one:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=a9e408182d2faaed5c2457b68ea3276c719a590f

changed how breakpoint locations are reported. If you put a breakpoint on a
line that has no code associated to it, GDB will report that the breakpoint as
on the first following line that does have code associated to it. So I tried
putting a breakpoint on line test.c:1 and it was actually installed on line
test.c:3. Then, I tried "clear test.c:1", which didn't work, as I had to do
"clear test.c:3".
Post by b2.temp at gmx dot com
Expected syntax is "-break-delete --source <fname> --line <number>", to be
consistent with the "-break-insert" equivalent.
For example if my UI at some points send
-break-insert --source foo.c --line 42
I really expect to be able to do the opposite, i.e
-break-delete --source foo.c --line 42
Actually i even think that any syntax allowed with "-break-insert" MUST have
its "-break-delete" counterpart.
I am really not convinced of that. The current way of handling breakpoint
deletion, by breakpoint number, is easy to implement and unambiguous. I don't
understand what would be the advantage of doing it by explicit
location/linespec over the existing way.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...