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: [PATCH] Re: bug in mi when setting breakpoint


On Sunday 20 January 2008 00:45:06 Nick Roberts wrote:
>  > To clarify -- are you suggesting what we should first create breakpoints
>  > for all overloaded function, and then remove those we don't need, in MI?
> 
> In Emacs, multiple breakpoints are only created when the user specifies the
> overloaded function in the GUD buffer (if he clicks on the fringe in an
> overloaded function in the source buffer he only gets one breakpoint at the
> line on which he clicked).
> 
> If GDB sets all these breakpoints, unwanted ones could then be deleted manually
> either by typing "delete BKPTNO" in the GUD buffer, or clicking on individual
> breakpoint icons in the fringe of the source buffers.

I don't think such solution is entirely satisfactory, for the following reason:

1. UI should not require to type GDB command for such basic task as adding
breakpoints.
2. Overloaded functions can be scattered over several source file, so clicking
on fringe is highly inconvenient -- the files might not be even open.
3. Assuming we have a list of breakpoints (which Eclipse and KDevelop do), we
surely can delete breakpoints there. However, adding unwanted breakpoints right
away will not be good in non-stop mode:

  - Some threads might already stop on unwanted breakpoints before you delete them
  - You might run out of hardware resources while setting unwanted breakpoints

I think it's more clear to set only those breakpoints that user want to set,
as opposed to setting all of them, and then removing undesired ones.

- Volodya


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