This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC 2/5] Frame unwinding using struct value


> +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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]