Eh, this was some time ago...
On Tue, Nov 26, 2013 at 10:12 AM, Paul Fertser <fercer...@gmail.com> wrote:

> On Mon, Nov 25, 2013 at 09:49:10PM +0100, Andreas Fritiofson wrote:
> > On Mon, Nov 25, 2013 at 11:00 AM, Paul Fertser <[1]fercer...@gmail.com>
> wrote:
> >   Would it make sense to add something like this to default
> >   configuration? What are the objections?
> >
> > Depends what you mean by default configuration.
> > I guess this could be in a tcl file somewhere and explicitly sourced
> where
> > appropriate (target configs?). I'm not sure it would be good to hide it
> in
> > startup.tcl.
>
> Why not? Gdb events are gdb-specific anyway and default values like
> that would made plenty of sense. I do not see why ordinary users
> should care if the defaults can cover all their needs.
>
> That's exactly my question: what would be bad about having these as
> defaults always for all the targets. What would be good is obvious:
> much less confusion for the users.
>

For one, you might not want to halt the target when you attach gdb. Often
you do, but not always. And I generally don't like software that assumes it
knows what I want to do and tries to "help" without asking (c.f. the
annoying auto-correct in office suites). Things like this should at least
be visible in a config file.

I can't see a way to add it to startup.tcl ($_TARGETNAME is defined
> only way later in target config) or else I would have sent my proposal
> as a patch already.
>

But we can add a proc in startup.tcl that sets up the hooks for any target.
Then a config file may include

add_default_gdb_hooks $_TARGETNAME


> > Never used wait_halt. What does it do?
>
> Waits for the target to halt, it might take non-zero time after the
> halt command returns. Is it not appropriate here? The target must be
> halted before gdb attaches or it will refuse to do so in many cases.
>

I thought the halt command blocked until the target was halted...

/Andreas
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to