Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102822351
D27426.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27426.diff
View Options
Index: head/contrib/elftoolchain/addr2line/addr2line.c
===================================================================
--- head/contrib/elftoolchain/addr2line/addr2line.c
+++ head/contrib/elftoolchain/addr2line/addr2line.c
@@ -580,8 +580,8 @@
ranges_cnt = 0;
in_cu = false;
- ret = dwarf_attrval_unsigned(die, DW_AT_ranges, &ranges_off, &de);
- if (ret == DW_DLV_OK) {
+ if (dwarf_attrval_unsigned(die, DW_AT_ranges, &ranges_off, &de) ==
+ DW_DLV_OK) {
ret = dwarf_get_ranges(dbg, ranges_off, &ranges,
&ranges_cnt, NULL, &de);
if (ret != DW_DLV_OK)
@@ -612,33 +612,30 @@
break;
}
}
- } else {
- if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) ==
+ } else if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) ==
+ DW_DLV_OK) {
+ if (lopc == curlopc)
+ return (DW_DLV_ERROR);
+ if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, &de) ==
DW_DLV_OK) {
- if (lopc == curlopc)
+ /*
+ * Check if the address falls into the PC
+ * range of this CU.
+ */
+ if (handle_high_pc(die, lopc, &hipc) != DW_DLV_OK)
return (DW_DLV_ERROR);
- if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc,
- &de) == DW_DLV_OK) {
- /*
- * Check if the address falls into the PC
- * range of this CU.
- */
- if (handle_high_pc(die, lopc, &hipc) !=
- DW_DLV_OK)
- return (DW_DLV_ERROR);
- } else {
- /* Assume ~0ULL if DW_AT_high_pc not present. */
- hipc = ~0ULL;
- }
-
- if (addr >= lopc && addr < hipc) {
- in_cu = true;
- }
} else {
- /* Addr not in range die, try labels. */
- ret = check_labels(dbg, die, addr, range);
- return ret;
+ /* Assume ~0ULL if DW_AT_high_pc not present. */
+ hipc = ~0ULL;
}
+
+ if (addr >= lopc && addr < hipc) {
+ in_cu = true;
+ }
+ } else {
+ /* Addr not found above, try labels. */
+ ret = check_labels(dbg, die, addr, range);
+ return ret;
}
if (in_cu) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 3:40 PM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14700139
Default Alt Text
D27426.diff (1 KB)
Attached To
Mode
D27426: addr2line: rework check_range conditions
Attached
Detach File
Event Timeline
Log In to Comment