aboutsummaryrefslogtreecommitdiff
path: root/absl/debugging
Commit message (Collapse)AuthorAgeFilesLines
* Demangle C++ requires-expressions with parameters (rQ ... E).Chris Mihelich2024-05-292-0/+19
| | | | | PiperOrigin-RevId: 638266358 Change-Id: I8a750a53d5e98bc3ad3b6d36661789d97d6efb0a
* Demangle Clang's encoding of __attribute__((enable_if(condition, "message"))).Chris Mihelich2024-05-292-2/+62
| | | | | PiperOrigin-RevId: 638244694 Change-Id: I80393c6c00f1554057a915e0d71f88b7d899818c
* Demangle static_cast and friends.Chris Mihelich2024-05-292-0/+83
| | | | | PiperOrigin-RevId: 638232699 Change-Id: I134905927ba72eaa5eaf821bb5535942746a3672
* Demangle decltype(expr)::nested_type (NDT...E).Chris Mihelich2024-05-282-1/+18
| | | | | PiperOrigin-RevId: 638094845 Change-Id: I189ce357ccecbe6f341a311e405f9189bf6c0fee
* Demangle C++17 fold-expressions.Chris Mihelich2024-05-282-0/+84
| | | | | PiperOrigin-RevId: 638068943 Change-Id: I7ffe7df900ec4854d8712885d212854b31e79fea
* Demangle thread_local helper functions.Chris Mihelich2024-05-282-4/+33
| | | | | PiperOrigin-RevId: 638039514 Change-Id: I623d87e91ebe0a1166fee175151179b61ef54249
* Demangle lambdas with explicit template arguments (UlTy and similar forms).Chris Mihelich2024-05-282-1/+48
| | | | | PiperOrigin-RevId: 638019038 Change-Id: I96a87e4736677df9d44520e4510e089a27372765
* Demangle &-qualified function types.Chris Mihelich2024-05-282-8/+39
| | | | | PiperOrigin-RevId: 637972935 Change-Id: Ia684f7761b2a98a0d9d5ae096daba34e9140aa22
* Demangle valueless literals LDnE (nullptr) and LA<number>_<type>E ("foo").Chris Mihelich2024-05-282-4/+49
| | | | | PiperOrigin-RevId: 637958502 Change-Id: If81eba9729c16b5d5ac7187cf74738d8aaace367
* Correctly demangle the <unresolved-name> at the end of dt and pt (x.y, x->y).Chris Mihelich2024-05-282-1/+11
| | | | | PiperOrigin-RevId: 637934582 Change-Id: Ie89b4317b11adba058dd999800e514eff49d4d69
* Demangle C++ requires-expressions without parameters (rq ... E).Chris Mihelich2024-05-242-0/+135
| | | | | PiperOrigin-RevId: 637052089 Change-Id: I8e22c2479749c05d8ca5f9e8eeba480a93da2d18
* Recognize C++ vendor extended expressions (e.g., u9__is_same...E).Chris Mihelich2024-05-242-0/+20
| | | | | PiperOrigin-RevId: 636911360 Change-Id: I525e25b90b91712b95ab7499425de85610ff9115
* Demangle the C++ this pointer (fpT).Chris Mihelich2024-05-232-3/+27
| | | | | PiperOrigin-RevId: 636695970 Change-Id: I22d6f13271ab965563f1f575d9d7ba0ed1af466d
* Stop eating an extra E in ParseTemplateArg for some L<type><value>E literals.Chris Mihelich2024-05-232-4/+12
| | | | | PiperOrigin-RevId: 636682763 Change-Id: I9e5fd6827cb780c288ff5af54643ee4fbbaca6d5
* Demangle C++ direct-list-initialization (T{1, 2, 3}, tl ... E).Chris Mihelich2024-05-232-0/+93
| | | | | PiperOrigin-RevId: 636649618 Change-Id: I73a0be3defa438daf0e9db5c34c0e2feb0e52b69
* Demangle the C++ spaceship operator (ss, operator<=>).Chris Mihelich2024-05-232-0/+23
| | | | | PiperOrigin-RevId: 636634618 Change-Id: I812115d2a33dc71446a14deadc6af019eef6dfd7
* Demangle C++ sZ encodings (sizeof...(pack)).Chris Mihelich2024-05-232-17/+64
| | | | | PiperOrigin-RevId: 636615840 Change-Id: I34f584ea0c6603a0781e874d683b516de94c6928
* Demangle C++ so ... E encodings (typically array-to-pointer decay).Chris Mihelich2024-05-232-0/+50
| | | | | PiperOrigin-RevId: 636566755 Change-Id: I2c8c1f19a67a7a487dd2bbb46c17f9fb4e2b037c
* Recognize dyn-trait-type in Rust demangling.Chris Mihelich2024-05-232-1/+104
| | | | | PiperOrigin-RevId: 636563266 Change-Id: Id4ee907c30d7dac400f1f85776cc5f1fcb3e20b7
* Recognize fn-type and lifetimes in Rust demangling.Chris Mihelich2024-05-222-4/+124
| | | | | PiperOrigin-RevId: 636152885 Change-Id: If545903854ea39cc4b5c51c88cd555072d27d89e
* Recognize inherent-impl and trait-impl in Rust demangling.Chris Mihelich2024-05-212-2/+62
| | | | | PiperOrigin-RevId: 635955480 Change-Id: I9322b4e7732e252007f6ca6c9b0cefc25974c9f8
* Recognize const and array-type in Rust mangled names.Chris Mihelich2024-05-212-2/+119
| | | | | PiperOrigin-RevId: 635938476 Change-Id: I49cba8789452f13cfeb4a24203b3b46624aa7269
* Recognize generic arguments containing only types in Rust mangled names.Chris Mihelich2024-05-212-1/+62
| | | | | | | We follow the C++ demangler in not printing the arguments, just an empty <>. PiperOrigin-RevId: 635858791 Change-Id: I24903d4c5a1e2060e92ca950bf7a61647aee655f
* Give ReturnAddresses and N<uppercase> namespaces separate stacks for clarity.Chris Mihelich2024-05-151-26/+35
| | | | | PiperOrigin-RevId: 633974603 Change-Id: I7efd0f0fadf1803aa8eacb86a18366e9a8a07df0
* Demangle Rust backrefs.Chris Mihelich2024-05-142-6/+165
| | | | | PiperOrigin-RevId: 633738511 Change-Id: I3f895d5de1aec5b5b9666523a328f3a3b0344e59
* Use Nt for struct and trait names in Rust demangler test inputs.Chris Mihelich2024-05-141-43/+43
| | | | | | | The tests work either way, but this way the inputs are more realistic. PiperOrigin-RevId: 633606944 Change-Id: I6c0440f2fceb5b8d9d4aed5818c3171d3fce2fb8
* Demangle Rust's Y<type><path> production for passably simple <type>s.Chris Mihelich2024-05-133-6/+229
| | | | | PiperOrigin-RevId: 633229582 Change-Id: Ibda908d261b52b1af766304992edd77a5bdd56b5
* Recognize some simple Rust mangled names in Demangle.Chris Mihelich2024-05-068-2/+749
| | | | | PiperOrigin-RevId: 631018414 Change-Id: Ice8efa0af4cb1f72b5d62fbbea4cb12cbead8634
* Only check if the frame pointer is inside a signal stack with known boundsAbseil Team2024-03-281-0/+2
| | | | | | | | This function previously returned true whenever the signal stack had unknown bounds, that is obviously incorrect. PiperOrigin-RevId: 620084964 Change-Id: I3821730b45773300569b9cbdb7e72442ed109d04
* `demangle`: Parse template template and C++20 lambda template param ↵Dino Radakovic2024-02-152-2/+48
| | | | | | | | | substitutions These were described in https://github.com/itanium-cxx-abi/cxx-abi/pull/85 and implemented by LLVM. PiperOrigin-RevId: 607555558 Change-Id: I9991ac88c1fcf63b25b93d93977a83ca343cdb5d
* `demangle`: Parse optional single template argument for built-in typesDino Radakovic2024-02-132-6/+45
| | | | | | | The optional single template argument for built-in types is not documented in LLVM's comments that list the grammar, but it is [intentionally implemented](https://github.com/llvm/llvm-project/commit/4bc4d51c18d5c087dfbdad1753c84bba8dbf3be0). PiperOrigin-RevId: 606843797 Change-Id: Ib5ef1983812e9ea68a39fe64b87b6ad6ce81b93c
* `demangle`: Add complexity guard to `ParseQRequiresExpr`Dino Radakovic2024-02-131-0/+2
| | | | | | | | This function copies the parser's state onto the stack in order to perform backtracking. Adding a complexity guard will ensure that it fails gracefully, instead of contributing to excessive consumption of stack space. PiperOrigin-RevId: 606720511 Change-Id: I2f6f03e5f8bc4cc571a4159ecfc2af6f3e00fa68
* `demangle`: Parse `requires` clauses on template params, before function ↵Dino Radakovic2024-02-092-17/+59
| | | | | | | | | | | | | | | | return type For example, this covers the following: ``` template <typename T> requires std::integral<T> int foo(); ``` Refactor parsing of `Q <requires-clause expr>` into a single function that performs backtracking to avoid reimplementing `ParseTemplateArgs` in terms of nested if-else blocks. PiperOrigin-RevId: 605785418 Change-Id: I118998a75e050dcf46af125b613b690312fd3cbe
* `demangle`: Parse `requires` clauses on functionsDino Radakovic2024-02-092-8/+53
| | | | | | | These clauses show up in other places that end up mangled as parts of function signatures (e.g. on template struct params). We'll handle those in a follow-up. PiperOrigin-RevId: 605694497 Change-Id: I1bfe4c0cfaa739fdd24548b1547482410c92b5a7
* `demangle`: Parse C++20-compatible template param declarations, except those ↵Dino Radakovic2024-02-082-7/+97
| | | | | | | | | with `requires` expressions Support for `requires` expressions will be added in a follow-up. PiperOrigin-RevId: 605418370 Change-Id: I2c84cdf0c4599e36683b3c94dcbb173ab4fc3ee8
* `demangle`: Implement parsing for simplest constrained template argumentsDino Radakovic2024-02-072-0/+42
| | | | | | | | | | | | | | | | | C++20 introduced constraints, where concepts such as `std::integral` can be used to restrict template parameters: ``` template <std::integral T> int foo(T t); // Only accepts integral types. ``` Clang mangles these starting with a prefix `Tk`, followed by the concept name, which mangles as a type. For example, compare `foo` and `bar` here: https://godbolt.org/z/Kzbrrchde Note that this implementation doesn't cover the more complex case where the concept is templated too. See [llvm's implementation](https://github.com/llvm/llvm-project/commit/4b163e343cfa54c8d55c9da73c70d58f55ea9df2) and its tests for a thorough version. PiperOrigin-RevId: 604976260 Change-Id: Ic116c5f6f27c3f7714638bdee8de11dce871f0be
* Fix a typo.Abseil Team2024-02-041-1/+1
| | | | | PiperOrigin-RevId: 604094890 Change-Id: If5634a15c7ea7c8ef2cc9b6d09636ee7836946d2
* Always check if the new frame pointer is readable.Abseil Team2024-01-231-7/+8
| | | | | | | Terminate the stack trace if it isn't. PiperOrigin-RevId: 600839499 Change-Id: I5692fa6cb52c4c8061b4ac14d8fba70f7fbabc52
* Avoid a empty library build failure on Apple platformsDerek Mauro2024-01-031-0/+18
| | | | | | | | | | | | | | | | | | | | | https://github.com/abseil/abseil-cpp/issues/1465 reports that some CMake builds on Apply platforms issue ``` warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: libabsl_bad_any_cast_impl.a the table of contents is empty (no object file members in the library define global symbols) ``` Our CMake build handles this problem for header-only libraries by not building a library at all. For some libraries, for example our polyfills, the library is only conditionally empty. In these libraries, I added a single char variable on Apple platforms as a workaround. I have been able to reproduce the warnings reported in https://github.com/abseil/abseil-cpp/issues/1465, but they don't fail the build for me. I don't see them any more after this change. PiperOrigin-RevId: 595480705 Change-Id: Ie48637e84ebae2f2aea4e2de83b146f30f6a76b9
* AddressIsReadable: improve commentsFangrui Song2023-12-201-2/+4
| | | | | | | | | | | | | | | | | | | Linux kernel's rt_sigprocmask correctly handles an unaligned user address[1]. The original issue was for qemu-user, which seems long irrelevant. Tested locally on an AArch64 CPU and qemu-aarch64-static. The alignment operation actually serves another purpose: when addr resides in the last 7 bytes of a page (unaligned), check only the current page and not the next. Update the comment. [1]: kernel/signal.c `SYSCALL_DEFINE4(rt_sigprocmask` arch/arm64/include/asm/uaccess.h:raw_copy_from_user arch/arm64/lib/copy_template.S "alignment handled by the hardware" PiperOrigin-RevId: 592618320 Change-Id: Ifbd05aba42f46e36e710cca940570213036b3ce0
* Speed-up absl::Symbolize by ~6x via faster file reads.Abseil Team2023-11-151-44/+108
| | | | | | | | | | | | | | | | | | | | absl::Symbolize does tons of tiny reads. Speed this up by switching from lseek+read to a pread, and by reading more data than requested into a buffer. A faster absl::Symbolize will be helpful in tests and when printing stack traces on /threadz etc. Results for absl::Symbolize benchmark that exercises uncached behavior of absl::Symbolize: ``` name old time/op new time/op delta BM_Symbolize 16.4ms ±12% 2.6ms ± 0% -84.06% (p=0.001 n=5+9) ``` PiperOrigin-RevId: 582687566 Change-Id: I44caf189d81867f3fd8c050a3100a4b9a8e744d7
* Add explicit int -> uintptr_t conversion in stacktrace code for aarch64Abseil Team2023-11-081-1/+1
| | | | | PiperOrigin-RevId: 580515441 Change-Id: I64999b11f1d83d56ed3680cb2d41c8a1d5f389de
* Properly handle signal stacks and frame-size calculationsAbseil Team2023-11-071-17/+38
| | | | | | | | | | | | | We can determine the signal stack, so use that information to make better decisions about when to calculate the frame size and when not to. This fixes a several tests where the memory layout had the signal stack and main stack in position that confused some of the greater-than/less-than comparisons. Also cleanup certain types to avoid more casting than necessary. PiperOrigin-RevId: 580221819 Change-Id: I0365b03e7893741603dc66e6d36a069d0b7f5404
* Bazel: Support layering_check and parse_headersDerek Mauro2023-10-101-0/+10
| | | | | | | | | | | | | The layering_check feature ensures that rules that include a header explicitly depend on a rule that exports that header. Compiler support is required, and currently only Clang 16+ supports diagnoses layering_check failures. The parse_headers feature ensures headers are self-contained by compiling them with -fsyntax-only on supported compilers. PiperOrigin-RevId: 572350144 Change-Id: I37297f761566d686d9dd58d318979d688b7e36d1
* With sufficiently high-levels of optimization, this functionAbseil Team2023-10-041-0/+3
| | | | | | | | | and those that call it can be inlined sufficiently far to mess up high-level skip-counts. But this function assumes it is the bottommost frame, as in the comment below. PiperOrigin-RevId: 570790048 Change-Id: I4d354f9e79e13aaa6a8a62a9e0870fbeac075de6
* Re-submit with a fix for platforms without RTTI.Abseil Team2023-10-024-34/+85
| | | | | | | We test for `ABSL_INTERNAL_HAS_RTTI` in `absl::container_internal::TypeName` before calling `typeid`. PiperOrigin-RevId: 570101013 Change-Id: I1f2f9b2f475a6beae50d0b88718b17b296311155
* Delete dead function.Abseil Team2023-09-271-10/+0
| | | | | PiperOrigin-RevId: 568858834 Change-Id: I276efa86259aa425c4b6dff27f037f488a58c9ae
* Add an internal wrapper for `abi::__cxa_demangle()`.Abseil Team2023-09-264-85/+34
| | | | | PiperOrigin-RevId: 568665135 Change-Id: I42ec9bc6cfe923777f7b60ea032c7b64428493c9
* Add an internal wrapper for `abi::__cxa_demangle()`.Abseil Team2023-09-264-34/+85
| | | | | PiperOrigin-RevId: 568652465 Change-Id: I9f72a11cb514eaf694dae589a19dc139891e7af2
* PR #1509: Allow building when targeting WASIAnuraag Agrawal2023-08-151-1/+1
| | | | | | | | | | | | | Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1509 WASI is similar to emscripten, providing a syscall layer to WebAssembly focused on server side applications. There are some config knobs that are in place to allow building the repo for emscripten which also need to support wasi (as built with LLVM). Aside from that, there are still some features it supports less than escripten, for example related to signals, causing the build to be even more limited for it. Merge ec9fa081609687035005dfdafd312754f31c3fbb into 861e53c8f075c8c4d67bd4c82217c57239fc97cf Merging this change closes #1509 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1509 from anuraaga:wasi-sdk-build ec9fa081609687035005dfdafd312754f31c3fbb PiperOrigin-RevId: 557166498 Change-Id: Ic51149d8b092fd888c9a5c383275257fc8ff4232