gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gold / dwarf_reader.cc
index 4da9c1e2be8511a7158ae9ea891d890a6e913f9b..ac9fbad5482f997117a9f2b465e2b3502dacd884 100644 (file)
@@ -1,6 +1,6 @@
 // dwarf_reader.cc -- parse dwarf2/3 debug information
 
-// Copyright (C) 2007-2017 Free Software Foundation, Inc.
+// Copyright (C) 2007-2020 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -1667,6 +1667,17 @@ Sized_dwarf_line_info<size, big_endian>::read_header_prolog(
   header_.min_insn_length = *lineptr;
   lineptr += 1;
 
+  if (header_.version < 4)
+    header_.max_ops_per_insn = 1;
+  else
+    {
+      // DWARF 4 added the maximum_operations_per_instruction field.
+      header_.max_ops_per_insn = *lineptr;
+      lineptr += 1;
+      // TODO: Add support for values other than 1.
+      gold_assert(header_.max_ops_per_insn == 1);
+    }
+
   header_.default_is_stmt = *lineptr;
   lineptr += 1;
 
This page took 0.031189 seconds and 4 git commands to generate.