From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Blandy To: Andrew Cagney Cc: Nick Duffek , ezannoni@cygnus.com, gdb-patches@sources.redhat.com, taylor@candd.org Subject: Re: [RFA] findvar.c: support LOC_BASEREG[_ARG] on Harvard archs Date: Mon, 16 Jul 2001 15:59:00 -0000 Message-id: References: <200107161954.f6GJskB20239@rtl.cygnus.com> <3B536F7B.7060106@cygnus.com> X-SW-Source: 2001-07/msg00403.html Andrew Cagney writes: > > > >> - char *buf = (char*) alloca (MAX_REGISTER_RAW_SIZE); > >> + value_ptr regval; > > > value_ptr is really ``struct value *'' so ... > > > >> + regval = value_from_register (lookup_pointer_type (type), > >> + SYMBOL_BASEREG (var), frame); > >> + if (regval == NULL) > >> + error ("Value of base register not available."); > >> + addr = value_as_pointer (regval); > > > I suspect you need xfree() or the like. No --- all values get put in a global list, `all_values', which gets freed automatically when the current expression evaluation is complete. Grep for `all_values' and see how it gets used.