1130803Smarcel/* Dwarf2 location expression support for GDB. 2130803Smarcel Copyright 2003 Free Software Foundation, Inc. 3130803Smarcel 4130803Smarcel This file is part of GDB. 5130803Smarcel 6130803Smarcel This program is free software; you can redistribute it and/or modify 7130803Smarcel it under the terms of the GNU General Public License as published by 8130803Smarcel the Free Software Foundation; either version 2 of the License, or 9130803Smarcel (at your option) any later version. 10130803Smarcel 11130803Smarcel This program is distributed in the hope that it will be useful, 12130803Smarcel but WITHOUT ANY WARRANTY; without even the implied warranty of 13130803Smarcel MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14130803Smarcel GNU General Public License for more details. 15130803Smarcel 16130803Smarcel You should have received a copy of the GNU General Public License 17130803Smarcel along with this program; if not, write to the Free Software 18130803Smarcel Foundation, Inc., 59 Temple Place - Suite 330, 19130803Smarcel Boston, MA 02111-1307, USA. */ 20130803Smarcel 21130803Smarcel#if !defined (DWARF2LOC_H) 22130803Smarcel#define DWARF2LOC_H 23130803Smarcel 24130803Smarcelstruct symbol_ops; 25130803Smarcel 26130803Smarcel/* This header is private to the DWARF-2 reader. It is shared between 27130803Smarcel dwarf2read.c and dwarf2loc.c. */ 28130803Smarcel 29130803Smarcel/* The symbol location baton types used by the DWARF-2 reader (i.e. 30130803Smarcel SYMBOL_LOCATION_BATON for a LOC_COMPUTED symbol). "struct 31130803Smarcel dwarf2_locexpr_baton" is for a symbol with a single location 32130803Smarcel expression; "struct dwarf2_loclist_baton" is for a symbol with a 33130803Smarcel location list. */ 34130803Smarcel 35130803Smarcelstruct dwarf2_locexpr_baton 36130803Smarcel{ 37130803Smarcel /* Pointer to the start of the location expression. */ 38130803Smarcel unsigned char *data; 39130803Smarcel 40130803Smarcel /* Length of the location expression. */ 41240163Semaste unsigned long size; 42130803Smarcel 43130803Smarcel /* The objfile containing the symbol whose location we're computing. */ 44130803Smarcel struct objfile *objfile; 45130803Smarcel}; 46130803Smarcel 47130803Smarcelstruct dwarf2_loclist_baton 48130803Smarcel{ 49130803Smarcel /* The initial base address for the location list, based on the compilation 50130803Smarcel unit. */ 51130803Smarcel CORE_ADDR base_address; 52130803Smarcel 53130803Smarcel /* Pointer to the start of the location list. */ 54130803Smarcel unsigned char *data; 55130803Smarcel 56130803Smarcel /* Length of the location list. */ 57240163Semaste unsigned long size; 58130803Smarcel 59130803Smarcel /* The objfile containing the symbol whose location we're computing. */ 60130803Smarcel /* Used (only???) by thread local variables. The objfile in which 61130803Smarcel this symbol is defined. To find a thread-local variable (e.g., a 62130803Smarcel variable declared with the `__thread' storage class), we may need 63130803Smarcel to know which object file it's in. */ 64130803Smarcel struct objfile *objfile; 65130803Smarcel}; 66130803Smarcel 67130803Smarcelextern const struct symbol_ops dwarf2_locexpr_funcs; 68130803Smarcelextern const struct symbol_ops dwarf2_loclist_funcs; 69130803Smarcel 70130803Smarcel#endif 71