diff options
author | Roland McGrath <roland@redhat.com> | 2010-02-19 17:02:54 -0800 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2010-02-19 17:02:54 -0800 |
commit | 28376ad7e30314af5cea7ec239fe4b6e7f3d512c (patch) | |
tree | 8aa64056454e1153f072d349e8cce9f2023190db | |
parent | bc87bd74a6ecf7d8559c83c8047f5ed11e93f1fe (diff) |
noodlingupstream/roland/is_stmt
-rw-r--r-- | libdw/dwarf_getsrclines.c | 6 | ||||
-rw-r--r-- | libdw/libdwP.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libdw/dwarf_getsrclines.c b/libdw/dwarf_getsrclines.c index 43fad99a..7b2eb393 100644 --- a/libdw/dwarf_getsrclines.c +++ b/libdw/dwarf_getsrclines.c @@ -1,5 +1,5 @@ /* Return line number information of CU. - Copyright (C) 2004-2009 Red Hat, Inc. + Copyright (C) 2004-2010 Red Hat, Inc. This file is part of Red Hat elfutils. Written by Ulrich Drepper <drepper@redhat.com>, 2004. @@ -268,6 +268,8 @@ dwarf_getsrclines (Dwarf_Die *cudie, Dwarf_Lines **lines, size_t *nlines) struct filelist *filelist = &null_file; unsigned int nfilelist = 1; + bool uses_stmt = default_is_stmt == 0; + if (unlikely (linep >= lineendp)) goto invalid_data; while (*linep != 0) @@ -548,6 +550,7 @@ dwarf_getsrclines (Dwarf_Die *cudie, Dwarf_Lines **lines, size_t *nlines) goto invalid_data; is_stmt = 1 - is_stmt; + uses_stmt = true; break; case DW_LNS_set_basic_block: @@ -664,6 +667,7 @@ dwarf_getsrclines (Dwarf_Die *cudie, Dwarf_Lines **lines, size_t *nlines) The buffers overlap, so we've clobbered the early elements of SORTLINES by the time we're reading the later ones. */ cu->lines = buf; + cu->lines->uses_stmt = uses_stmt; cu->lines->nlines = nlinelist; for (i = 0; i < nlinelist; ++i) { diff --git a/libdw/libdwP.h b/libdw/libdwP.h index 248a58d5..67278127 100644 --- a/libdw/libdwP.h +++ b/libdw/libdwP.h @@ -255,6 +255,7 @@ struct Dwarf_Line_s struct Dwarf_Lines_s { size_t nlines; + bool uses_stmt; struct Dwarf_Line_s info[0]; }; |