diff options
author | Pierre-Marie de Rodat <derodat@adacore.com> | 2017-03-20 17:31:46 (GMT) |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2018-03-21 10:55:49 (GMT) |
commit | 6bf2602f38e5bea4782b4ee601bd7bfb5eec6b78 (patch) | |
tree | 2710ed30e6cc604b03d186422ffed62fd45af4a0 | |
parent | 9d9c68621a71e1516325d9cdd7907bc563358046 (diff) | |
download | cv2pdb-6bf2602f38e5bea4782b4ee601bd7bfb5eec6b78.zip cv2pdb-6bf2602f38e5bea4782b4ee601bd7bfb5eec6b78.tar.gz cv2pdb-6bf2602f38e5bea4782b4ee601bd7bfb5eec6b78.tar.bz2 |
DIECursor::readNext: use -1u for missing DW_AT_ranges attributes
0 is actually a valid .debug_ranges offset, so use something really
unlikely for the "no value" special constant instead.
-rw-r--r-- | src/readDwarf.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/readDwarf.h b/src/readDwarf.h index bf56377..4d077c8 100644 --- a/src/readDwarf.h +++ b/src/readDwarf.h @@ -152,7 +152,7 @@ struct DWARF_InfoData unsigned long encoding;
unsigned long pclo;
unsigned long pchi;
- unsigned long ranges;
+ unsigned long ranges; // -1u when attribute is not present
byte* type;
byte* containing_type;
byte* specification;
@@ -180,7 +180,7 @@ struct DWARF_InfoData encoding = 0;
pclo = 0;
pchi = 0;
- ranges = 0;
+ ranges = -1u;
type = 0;
containing_type = 0;
specification = 0;
@@ -203,6 +203,7 @@ struct DWARF_InfoData if (id.encoding) encoding = id.encoding;
if (id.pclo) pclo = id.pclo;
if (id.pchi) pchi = id.pchi;
+ if (id.ranges != -1u) ranges = id.ranges;
if (id.type) type = id.type;
if (id.containing_type) containing_type = id.containing_type;
if (id.specification) specification = id.specification;
|