aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-09-09 19:41:14 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-09-09 19:41:14 +0000
commitdf15bd07dfd59a5176e0fa7699ab1179205491d9 (patch)
tree7ff7b013450ce8006dc803be209e036bc4a5f693 /gdb/dwarf2read.c
parentddf17726b28e169d5ec0252a777a9c528c6a772f (diff)
downloadgdb-df15bd07dfd59a5176e0fa7699ab1179205491d9.zip
gdb-df15bd07dfd59a5176e0fa7699ab1179205491d9.tar.gz
gdb-df15bd07dfd59a5176e0fa7699ab1179205491d9.tar.bz2
gdb/
Code cleanup. * amd64-tdep.c (amd64_skip_prologue): Move the XMM code to ... (amd64_skip_xmm_prologue): ... this new function. Describe its parameters. No longer use amd64_prologue_line_bug. * defs.h (producer_is_gcc_ge_4): New declaration. * dwarf2read.c (producer_is_gcc_ge_4): Move to utils.c. (process_full_comp_unit): Update its caller. Remove amd64_prologue_line_bug initialization. * symtab.h (struct symtab): Remove field amd64_prologue_line_bug. * utils.c (producer_is_gcc_ge_4): Moved here from dwarf2read.c.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c49
1 files changed, 1 insertions, 48 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index c79f2be..6b87d2a 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -4723,50 +4723,6 @@ compute_delayed_physnames (struct dwarf2_cu *cu)
}
}
-/* Check for GCC >= 4.x. Return minor version (x) of 4.x in such case. If it
- is not GCC or it is GCC older than 4.x return -1. If it is GCC 5.x or
- higher return INT_MAX. */
-
-static int
-producer_is_gcc_ge_4 (struct dwarf2_cu *cu)
-{
- const char *cs;
- int major, minor;
-
- if (cu->producer == NULL)
- {
- /* For unknown compilers expect their behavior is not compliant. For GCC
- this case can also happen for -gdwarf-4 type units supported since
- gcc-4.5. */
-
- return -1;
- }
-
- /* Skip any identifier after "GNU " - such as "C++" or "Java". */
-
- if (strncmp (cu->producer, "GNU ", strlen ("GNU ")) != 0)
- {
- /* For non-GCC compilers expect their behavior is not compliant. */
-
- return -1;
- }
- cs = &cu->producer[strlen ("GNU ")];
- while (*cs && !isdigit (*cs))
- cs++;
- if (sscanf (cs, "%d.%d", &major, &minor) != 2)
- {
- /* Not recognized as GCC. */
-
- return -1;
- }
-
- if (major < 4)
- return -1;
- if (major > 4)
- return INT_MAX;
- return minor;
-}
-
/* Generate full symbol information for PST and CU, whose DIEs have
already been loaded into memory. */
@@ -4806,7 +4762,7 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu)
if (symtab != NULL)
{
- int gcc_4_minor = producer_is_gcc_ge_4 (cu);
+ int gcc_4_minor = producer_is_gcc_ge_4 (cu->producer);
/* Set symtab language to language from DW_AT_language. If the
compilation is from a C file generated by language preprocessors, do
@@ -4829,9 +4785,6 @@ process_full_comp_unit (struct dwarf2_per_cu_data *per_cu)
if (gcc_4_minor >= 5)
symtab->epilogue_unwind_valid = 1;
-
- if (gcc_4_minor >= 6)
- symtab->amd64_prologue_line_bug = 1;
}
if (dwarf2_per_objfile->using_index)