This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: right way to_post_attach ?
- To: Duncan Coutts <dcoutts at cray dot com>
- Subject: Re: right way to_post_attach ?
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 06 Sep 2001 01:19:45 -0400
- Cc: gdb at sources dot redhat dot com
- References: <Pine.SGI.4.33.0108221405200.1037-100000@underbird7.mw.cray.com>
> Hi,
>
> I can't quite figure out what the right way to setup a
> target_ops.to_post_attach hook. I'm not defining a whole new target (am
> I?), I'm using the procfs target. I just need to hook the to_post_attach
> so I can do some random symbol fiddling just after the attach.
>
> I notice that several targets do a push_target during their attach, so
> that their operations become avaliable, but presumably I still want to
> use the procfs target so I can't have the attach operation push my extra
> target vector.
>
> In oop terms, I just want to 'override' the to_post_attach
> method. I can't find anywhere that uses the to_post_attach in any
> substantial way, so I'm rather short on clues.
>
> What's the way to do this, or is to_post_attach not the tool to be using
> here?
>
> Thank's for any tips.
i cant comment on post attach but i can comment on the underlying
problem. yes, the push / pop mechanism and gdb's target stack is
primative at best - little wonder you're having problems. the oo
concept is simple, what gdb did to it is not, sigh,
andrew