diff options
author | Daniel Jacobowitz <dan@debian.org> | 2010-03-24 21:06:28 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2010-03-24 21:06:28 +0000 |
commit | ed2e4b0e511a9d99fcc33335c5f5d7e6d3a04a90 (patch) | |
tree | fea614113841a4ae88913948f3c1e600f9feb4d3 /gdb/dwarf2-frame.c | |
parent | fb68d8a2556cda8a1b57b1b70bfdc7cb27e2de4f (diff) | |
download | gdb-ed2e4b0e511a9d99fcc33335c5f5d7e6d3a04a90.tar.gz |
* dwarf2-frame.c (dwarf2_frame_find_quirks): Use producer_is_realview.
* dwarf2read.c (load_full_comp_unit): Read DW_AT_producer.
(read_structure_type): For RealView, set TYPE_STUB on structures with
no byte size and no children.
(read_subroutine_type): Mark functions as prototyped by default.
* symtab.c (producer_is_realview): New function.
* symtab.h (expand_line_sal): Fix declaration formatting.
(producer_is_realview): Declare.
testsuite/
* gdb.base/callfuncs.exp (do_function_calls): Add XFAILs for RealView.
* gdb.base/ptype.exp (ptype_maybe_prototyped): Add overprototyped
argument. Handle "short" and "long".
(Top level): Pass overprototyped output for old_fptr and xptr.
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r-- | gdb/dwarf2-frame.c | 54 |
1 files changed, 22 insertions, 32 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 7323ca4afee..47a2cf13ed8 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -839,43 +839,33 @@ static void dwarf2_frame_find_quirks (struct dwarf2_frame_state *fs, struct dwarf2_fde *fde) { - static const char *arm_idents[] = { - "ARM C Compiler, ADS", - "Thumb C Compiler, ADS", - "ARM C++ Compiler, ADS", - "Thumb C++ Compiler, ADS", - "ARM/Thumb C/C++ Compiler, RVCT" - }; - int i; - struct symtab *s; s = find_pc_symtab (fs->pc); - if (s == NULL || s->producer == NULL) + if (s == NULL) return; - for (i = 0; i < ARRAY_SIZE (arm_idents); i++) - if (strncmp (s->producer, arm_idents[i], strlen (arm_idents[i])) == 0) - { - if (fde->cie->version == 1) - fs->armcc_cfa_offsets_sf = 1; - - if (fde->cie->version == 1) - fs->armcc_cfa_offsets_reversed = 1; - - /* The reversed offset problem is present in some compilers - using DWARF3, but it was eventually fixed. Check the ARM - defined augmentations, which are in the format "armcc" followed - by a list of one-character options. The "+" option means - this problem is fixed (no quirk needed). If the armcc - augmentation is missing, the quirk is needed. */ - if (fde->cie->version == 3 - && (strncmp (fde->cie->augmentation, "armcc", 5) != 0 - || strchr (fde->cie->augmentation + 5, '+') == NULL)) - fs->armcc_cfa_offsets_reversed = 1; - - return; - } + if (producer_is_realview (s->producer)) + { + if (fde->cie->version == 1) + fs->armcc_cfa_offsets_sf = 1; + + if (fde->cie->version == 1) + fs->armcc_cfa_offsets_reversed = 1; + + /* The reversed offset problem is present in some compilers + using DWARF3, but it was eventually fixed. Check the ARM + defined augmentations, which are in the format "armcc" followed + by a list of one-character options. The "+" option means + this problem is fixed (no quirk needed). If the armcc + augmentation is missing, the quirk is needed. */ + if (fde->cie->version == 3 + && (strncmp (fde->cie->augmentation, "armcc", 5) != 0 + || strchr (fde->cie->augmentation + 5, '+') == NULL)) + fs->armcc_cfa_offsets_reversed = 1; + + return; + } } |