aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-08-07 14:16:26 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-08-07 14:46:48 +0300
commitc59a2427a037c1a04a24ed46497ab3a298ffa5d1 (patch)
tree59fa5633c15a4c6c45cb9798535ec81252bd91c8
parentb92a4e77b0ee24fc7ae9d4488d97999ac39f48e3 (diff)
downloadydb-c59a2427a037c1a04a24ed46497ab3a298ffa5d1.tar.gz
Intermediate changes
-rw-r--r--contrib/libs/llvm16/include/llvm/DebugInfo/DWARF/DWARFContext.h11
-rw-r--r--contrib/libs/llvm16/lib/DebugInfo/DWARF/DWARFContext.cpp23
-rw-r--r--contrib/libs/protobuf/ya.make4
3 files changed, 23 insertions, 15 deletions
diff --git a/contrib/libs/llvm16/include/llvm/DebugInfo/DWARF/DWARFContext.h b/contrib/libs/llvm16/include/llvm/DebugInfo/DWARF/DWARFContext.h
index 82da8b032d..490bf5ff3c 100644
--- a/contrib/libs/llvm16/include/llvm/DebugInfo/DWARF/DWARFContext.h
+++ b/contrib/libs/llvm16/include/llvm/DebugInfo/DWARF/DWARFContext.h
@@ -452,7 +452,16 @@ public:
/// address.
/// TODO: change input parameter from "uint64_t Address"
/// into "SectionedAddress Address"
- DWARFCompileUnit *getCompileUnitForAddress(uint64_t Address);
+ DWARFCompileUnit *getCompileUnitForCodeAddress(uint64_t Address);
+
+ /// Return the compile unit which contains data with the provided address.
+ /// Note: This is more expensive than `getCompileUnitForAddress`, as if
+ /// `Address` isn't found in the CU ranges (which is cheap), then it falls
+ /// back to an expensive O(n) walk of all CU's looking for data that spans the
+ /// address.
+ /// TODO: change input parameter from "uint64_t Address" into
+ /// "SectionedAddress Address"
+ DWARFCompileUnit *getCompileUnitForDataAddress(uint64_t Address);
/// Returns whether CU/TU should be populated manually. TU Index populated
/// manually only for DWARF5.
diff --git a/contrib/libs/llvm16/lib/DebugInfo/DWARF/DWARFContext.cpp b/contrib/libs/llvm16/lib/DebugInfo/DWARF/DWARFContext.cpp
index dd86144d16..f648ef8ff7 100644
--- a/contrib/libs/llvm16/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/contrib/libs/llvm16/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -1118,14 +1118,17 @@ DWARFCompileUnit *DWARFContext::getCompileUnitForOffset(uint64_t Offset) {
NormalUnits.getUnitForOffset(Offset));
}
-DWARFCompileUnit *DWARFContext::getCompileUnitForAddress(uint64_t Address) {
- // First, get the offset of the compile unit.
+DWARFCompileUnit *DWARFContext::getCompileUnitForCodeAddress(uint64_t Address) {
+ uint64_t CUOffset = getDebugAranges()->findAddress(Address);
+ return getCompileUnitForOffset(CUOffset);
+}
+
+DWARFCompileUnit *DWARFContext::getCompileUnitForDataAddress(uint64_t Address) {
uint64_t CUOffset = getDebugAranges()->findAddress(Address);
- // Retrieve the compile unit.
if (DWARFCompileUnit *OffsetCU = getCompileUnitForOffset(CUOffset))
return OffsetCU;
- // Global variables are often not found by the above search, for one of two
+ // Global variables are often missed by the above search, for one of two
// reasons:
// 1. .debug_aranges may not include global variables. On clang, it seems we
// put the globals in the aranges, but this isn't true for gcc.
@@ -1146,7 +1149,7 @@ DWARFCompileUnit *DWARFContext::getCompileUnitForAddress(uint64_t Address) {
DWARFContext::DIEsForAddress DWARFContext::getDIEsForAddress(uint64_t Address) {
DIEsForAddress Result;
- DWARFCompileUnit *CU = getCompileUnitForAddress(Address);
+ DWARFCompileUnit *CU = getCompileUnitForCodeAddress(Address);
if (!CU)
return Result;
@@ -1297,7 +1300,7 @@ void DWARFContext::addLocalsForDie(DWARFCompileUnit *CU, DWARFDie Subprogram,
std::vector<DILocal>
DWARFContext::getLocalsForAddress(object::SectionedAddress Address) {
std::vector<DILocal> Result;
- DWARFCompileUnit *CU = getCompileUnitForAddress(Address.Address);
+ DWARFCompileUnit *CU = getCompileUnitForCodeAddress(Address.Address);
if (!CU)
return Result;
@@ -1310,7 +1313,7 @@ DWARFContext::getLocalsForAddress(object::SectionedAddress Address) {
DILineInfo DWARFContext::getLineInfoForAddress(object::SectionedAddress Address,
DILineInfoSpecifier Spec) {
DILineInfo Result;
- DWARFCompileUnit *CU = getCompileUnitForAddress(Address.Address);
+ DWARFCompileUnit *CU = getCompileUnitForCodeAddress(Address.Address);
if (!CU)
return Result;
@@ -1331,7 +1334,7 @@ DILineInfo DWARFContext::getLineInfoForAddress(object::SectionedAddress Address,
DILineInfo
DWARFContext::getLineInfoForDataAddress(object::SectionedAddress Address) {
DILineInfo Result;
- DWARFCompileUnit *CU = getCompileUnitForAddress(Address.Address);
+ DWARFCompileUnit *CU = getCompileUnitForDataAddress(Address.Address);
if (!CU)
return Result;
@@ -1346,7 +1349,7 @@ DWARFContext::getLineInfoForDataAddress(object::SectionedAddress Address) {
DILineInfoTable DWARFContext::getLineInfoForAddressRange(
object::SectionedAddress Address, uint64_t Size, DILineInfoSpecifier Spec) {
DILineInfoTable Lines;
- DWARFCompileUnit *CU = getCompileUnitForAddress(Address.Address);
+ DWARFCompileUnit *CU = getCompileUnitForCodeAddress(Address.Address);
if (!CU)
return Lines;
@@ -1402,7 +1405,7 @@ DWARFContext::getInliningInfoForAddress(object::SectionedAddress Address,
DILineInfoSpecifier Spec) {
DIInliningInfo InliningInfo;
- DWARFCompileUnit *CU = getCompileUnitForAddress(Address.Address);
+ DWARFCompileUnit *CU = getCompileUnitForCodeAddress(Address.Address);
if (!CU)
return InliningInfo;
diff --git a/contrib/libs/protobuf/ya.make b/contrib/libs/protobuf/ya.make
index 5c676496d2..ec90ec4cd6 100644
--- a/contrib/libs/protobuf/ya.make
+++ b/contrib/libs/protobuf/ya.make
@@ -57,10 +57,6 @@ IF (OS_ANDROID)
EXTRALIBS(log)
ENDIF()
-IF (FIX_UNUSED_PARAMETR_PLS)
- GLOBAL_CFLAGS(-DFIX_UNUSED_PARAMETR_PLS=yes)
-ENDIF()
-
SRCS(
GLOBAL src/google/protobuf/generated_message_util.cc
src/google/protobuf/any.cc