This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: add file I/O support when debugging an embedded target via jtag
- From: Daniel Jacobowitz <drow at false dot org>
- To: Bart Veer <bartv at ecoscentric dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 1 Oct 2008 17:09:33 -0400
- Subject: Re: add file I/O support when debugging an embedded target via jtag
- References: <pnr685s96z.fsf@delenn.bartv.net> <48BAAC44.4000002@codesourcery.com> <pnod39ry8d.fsf@delenn.bartv.net> <pnr67brwxa.fsf@delenn.bartv.net> <e394668d0809230502s26c5a421rbde991bb94b775eb@mail.gmail.com> <pnljxhs0kb.fsf@delenn.bartv.net> <e394668d0809251004s4dbac963n3e8baa8c521bd8bf@mail.gmail.com> <pnabdwrmyx.fsf@delenn.bartv.net> <20080925222009.GA8202@caradoc.them.org> <pn1vz017q9.fsf@delenn.bartv.net>
On Wed, Oct 01, 2008 at 07:38:22PM +0100, Bart Veer wrote:
> Adding a new stratum certainly appears to be controversial, although I
> am not certain why.
Because this is not about what in the current sources will break.
It's about the purpose of the target stack, which does not include
synthesizing operations like this.
> Daniel> I don't see why it has to be in the target vector at all.
>
> The h/w debug file I/O code needs to take some action for every load,
> resume and wait operation. For the wait, deprecated_target_wait_hook
> provides an alternative but I assume that hook is going to disappear
> at some point. There are no equivalent hooks for load and resume.
Those operations are where your patch acts, but I don't think they're
what you actually want. What you do after load doesn't have anything
to do with "load"; I assume that at load time you're setting the
breakpoint, but GDB already has several hooks to set internal
breakpoints. And it already has support for hitting an internal
breakpoint, hiding it from the user, and taking some action - this is
how SVR4 shared library support works.
--
Daniel Jacobowitz
CodeSourcery