[RFC] How to get target_ops from to_kill method?
Joel Brobecker
brobecker@adacore.com
Tue Mar 17 19:11:00 GMT 2009
> Yes. You're not accessing the inherited or de_faulted
> current_target.to_kill anymore. You always go through the non-inherited
> current_target.beneath->to_kill, so, you can remove the INHERIT, and the
> de_fault for to_kill.
Cool! I really like your ideas about the target vector. I think
it really is going to simplify the handling for that target stack
a lot.
New patch:
Add a target_ops parameter to the to_kill method in struct target_ops.
* target.h (struct target_ops): Add a "target_ops *" parameter to
method to_kill.
(target_kill): Remove macro. Add declaration.
* target.c (debug_to_kill): Delete, no longer necessary.
(target_kill): New function.
(update_current_target): Stop inheriting the to_kill method.
Do not de_fault it to no_process either.
(setup_target_debug): Do not set current_target.to_kill.
* gnu-nat.c, go32-nat.c, hpux-thread.c, inf-ptrace.c, inf-ttrace.c,
linux-nat.c, monitor.c, nto-procfs.c, procfs.c, remote-m32r-sdi.c,
remote-mips.c, remote-sim.c, remote.c, windows-nat.c: Update
accordingly.
Tested on x86_64-linux again...
--
Joel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: to_kill.diff
Type: text/x-diff
Size: 11633 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20090317/0b0620fc/attachment.bin>
More information about the Gdb-patches
mailing list