diff options
author | Daniel Jacobowitz <drow@false.org> | 2003-07-31 21:05:38 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2003-07-31 21:05:38 +0000 |
commit | 7cf6e574cf782fea47b526196458ecbfb436aff9 (patch) | |
tree | 51fdc99c2e1acaece80a9cf969d9e3998daadb29 /gdb/dwarf2read.c | |
parent | e656e36976367c3a3f4ab8c0d939af653ccb0b3f (diff) | |
download | gdb-7cf6e574cf782fea47b526196458ecbfb436aff9.zip gdb-7cf6e574cf782fea47b526196458ecbfb436aff9.tar.gz gdb-7cf6e574cf782fea47b526196458ecbfb436aff9.tar.bz2 |
* dwarf2read.c (new_symbol): Use var_decode_location for parameters.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 115d8db..da31c60 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -5207,32 +5207,10 @@ new_symbol (struct die_info *die, struct type *type, struct objfile *objfile, attr = dwarf_attr (die, DW_AT_location); if (attr) { - SYMBOL_VALUE (sym) = - decode_locdesc (DW_BLOCK (attr), objfile, cu_header); - if (isreg) - { - SYMBOL_CLASS (sym) = LOC_REGPARM; - SYMBOL_VALUE (sym) = - DWARF2_REG_TO_REGNUM (SYMBOL_VALUE (sym)); - } - else if (offreg) - { - if (isderef) - { - if (basereg != frame_base_reg) - dwarf2_complex_location_expr_complaint (); - SYMBOL_CLASS (sym) = LOC_REF_ARG; - } - else - { - SYMBOL_CLASS (sym) = LOC_BASEREG_ARG; - SYMBOL_BASEREG (sym) = DWARF2_REG_TO_REGNUM (basereg); - } - } - else - { - SYMBOL_CLASS (sym) = LOC_ARG; - } + var_decode_location (attr, sym, objfile, cu_header); + /* FIXME drow/2003-07-31: Is LOC_COMPUTED_ARG necessary? */ + if (SYMBOL_CLASS (sym) == LOC_COMPUTED) + SYMBOL_CLASS (sym) = LOC_COMPUTED_ARG; } attr = dwarf_attr (die, DW_AT_const_value); if (attr) |