From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Daniel Berlin Cc: David Taylor , gdb-patches@sources.redhat.com Subject: Re: [PATCH] Add support for tracking/evaluating dwarf2 location expressions Date: Fri, 30 Mar 2001 15:24:00 -0000 Message-id: <3AC515A0.30F2C587@cygnus.com> References: <200103302149.QAA25007@texas.cygnus.com> X-SW-Source: 2001-03/msg00568.html > So the code doesn't belong in dwarf2read.c. dwarf2read.c is a symbol > reader. dwarf2 location expressions are a way of describing variable > locations. The other code to process the current gdb address > classes/locations is in findvar.c, so that's where i put it. No. if (frame == NULL) frame = selected_frame; ! if (SYMBOL_DWARF2_LOC (var) != NULL) ! return evaluate_dwarf2_locdesc (var, frame, (struct dwarf_block *) SYMBOL_DWARF2_LOC (var), SYMBOL_TYPE (var)); switch (SYMBOL_CLASS (var)) { case LOC_CONST: I would have expected something like: if (this symbol's location is computed dynamically) then return var->compute_location_dynamically (frame); where that ``compute_location_dynamically'' was a function supplied by dwarf2read.c. For this starts to make sense, I suspect it needs to be given some additional context - namely where in dwarf2read.c things are also going to be changed. Andrew