public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/dwarf: remove line_header::header_length field
@ 2022-04-21 19:06 Simon Marchi
0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2022-04-21 19:06 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b0b299477cc7e538b2387ec05b92c7261bf31052
commit b0b299477cc7e538b2387ec05b92c7261bf31052
Author: Simon Marchi <simon.marchi@efficios.com>
Date: Tue Apr 12 15:36:16 2022 -0400
gdb/dwarf: remove line_header::header_length field
This can be a local in dwarf_decode_line_header.
Change-Id: I2ecf4616d1a3197bd1e81ded9f999a2da9a685af
Diff:
---
| 6 ++++--
| 1 -
2 files changed, 4 insertions(+), 3 deletions(-)
--git a/gdb/dwarf2/line-header.c b/gdb/dwarf2/line-header.c
index 9a5f3fabe8d..63230847568 100644
--- a/gdb/dwarf2/line-header.c
+++ b/gdb/dwarf2/line-header.c
@@ -329,11 +329,13 @@ dwarf_decode_line_header (sect_offset sect_off, bool is_dwz,
return NULL;
}
}
- lh->header_length = read_offset (abfd, line_ptr, offset_size);
+
+ LONGEST header_length = read_offset (abfd, line_ptr, offset_size);
line_ptr += offset_size;
- lh->statement_program_start = line_ptr + lh->header_length;
+ lh->statement_program_start = line_ptr + header_length;
lh->minimum_instruction_length = read_1_byte (abfd, line_ptr);
line_ptr += 1;
+
if (lh->version >= 4)
{
lh->maximum_ops_per_instruction = read_1_byte (abfd, line_ptr);
--git a/gdb/dwarf2/line-header.h b/gdb/dwarf2/line-header.h
index 25b9e7c2032..59b317d0d72 100644
--- a/gdb/dwarf2/line-header.h
+++ b/gdb/dwarf2/line-header.h
@@ -137,7 +137,6 @@ struct line_header
unsigned offset_in_dwz : 1; /* Can't initialize bitfields in-class. */
unsigned short version {};
- unsigned int header_length {};
unsigned char minimum_instruction_length {};
unsigned char maximum_ops_per_instruction {};
unsigned char default_is_stmt {};
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-21 19:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 19:06 [binutils-gdb] gdb/dwarf: remove line_header::header_length field Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).