This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH/RFC] Per-architecture DWARF CFI register state initialization hooks
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 7 Feb 2004 18:03:30 -0500
- Subject: Re: [PATCH/RFC] Per-architecture DWARF CFI register state initialization hooks
- References: <200402072237.i17Mbqae011375@elgar.kettenis.dyndns.org>
On Sat, Feb 07, 2004 at 11:37:52PM +0100, Mark Kettenis wrote:
> Here's my proposal for the per-architecture DWARF CFI register state
> initialization hooks needed for S/390, and others. This is a RFC,
> since I'm not entirely confident whether my approach is acceptable. I
> chose to implement this using per-architecture data instead of adding
> a function to the architecture vector. I think it is cleaner since it
> keeps things localized and modular, and the architecture vector is big
> enough as it stands. However you folks might think otherwise.
Hmm, I do. You're adding a per-architecture data item which is a
function pointer, and what amounts to the rest of what gdbarch.sh would
generate (wrapper functions, default initialization. I'd rather you
just used gdbarch.sh.
> Ulrich, this should privide the hooks you need. For S/390 you should
> provide a function with the following signature:
>
> void
> s390_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
> struct gdbarch dwarf2_frame_state_reg *reg);
>
> and initialize REG according to your needs for the REGNUMs you care
> about. Note that REGNUM is the GDB register number.
>
> Comments?
I've no objection. I would have done something like:
void
gdbarch_dwarf2_frame_init_reg (struct gdbarch *gdbarch,
struct dwarf3_frame_state_reg *reg);
dwarf2_frame_default_init_reg (reg);
gdbarch_dwarf2_frame_init_reg (gdbarch, reg);
but this is just as good, and we're not _that_ pinched for startup
time.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer