This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] dwarf2cfi.c improvements
- From: Jim Blandy <jimb at redhat dot com>
- To: Michal Ludvig <mludvig at suse dot cz>
- Cc: GDB Patches <gdb-patches at sources dot redhat dot com>
- Date: 18 Jul 2002 17:14:13 -0500
- Subject: Re: [RFA] dwarf2cfi.c improvements
- References: <3D36B967.7030205@suse.cz>
Sure --- looks good to me.
Michal Ludvig <mludvig@suse.cz> writes:
> Hi all,
> this patch adds an error() call when there is an unknown DW_OP_ value
> in a debug_frame section. Next it initialises return value CFA so that
> it isn't used uninitialised when the switch{} finishes on default
> label.
> Easy. Nothing to be broken in here. OK to commit?
>
> Michal Ludvig
> --
> * SuSE CR, s.r.o * mludvig@suse.cz
> * +420 2 9654 5373 * http://www.suse.cz
> 2002-07-17 Michal Ludvig <michal@suse.cz>
>
> * dwarf2cfi.c (execute_stack_op): Complain on unknown DW_OP_ value.
> (update_context): Initialise cfa variable.
>
> Index: dwarf2cfi.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/dwarf2cfi.c,v
> retrieving revision 1.15
> diff -u -p -r1.15 dwarf2cfi.c
> --- dwarf2cfi.c 15 Jul 2002 16:01:31 -0000 1.15
> +++ dwarf2cfi.c 18 Jul 2002 12:35:40 -0000
> @@ -1227,7 +1227,8 @@ execute_stack_op (struct objfile *objfil
> case DW_OP_ne:
> result = (LONGEST) first != (LONGEST) second;
> break;
> - default: /* This label is here just to avoid warning. */
> + default:
> + error ("execute_stack_op: Unknown DW_OP_ value");
> break;
> }
> }
> @@ -1271,7 +1272,7 @@ static void
> update_context (struct context *context, struct frame_state *fs, int chain)
> {
> struct context *orig_context;
> - CORE_ADDR cfa;
> + CORE_ADDR cfa = 0;
> long i;
>
> unwind_tmp_obstack_init ();