This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 2/5] Frame unwinding using struct value
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 4 Apr 2008 10:22:14 -0700
- Subject: Re: [RFC 2/5] Frame unwinding using struct value
- References: <20080331221024.GA22334@caradoc.them.org>
> +struct value *
> +frame_unwind_register_value (struct frame_info *frame, int regnum)
> +{
> + struct value *value;
> +
> + if (frame_debug)
> + {
> + fprintf_unfiltered (gdb_stdlog, "\
> +{ frame_unwind_register_value (frame=%d,regnum=%d(%s),...) ",
> + frame->level, regnum,
> + frame_map_regnum_to_name (frame, regnum));
> + }
> +
> + gdb_assert (frame != NULL);
The gdb_assert should be moved up before the "if (frame_debug)" block.
Otherwise, we'll bomb while dereferencing FRAME before we trip the
assertion. (I realize that this code was already like this before)
Other than that, I tried to read it as carefully as possible and
grasp as much of the big picture as I could, and it looked good
to me.
I can help with the conversion of some of the targets: hppa, ia64,
mips (but it would be better if someone having access to mips-linux
did it for me, mips-irix results are not stellar right now), powerpc,
and sparc. I can't test alpha anymore, for some reason dejagnu no
longer works on our Tru64 machines :-(.
--
Joel