3 Commits

Author SHA1 Message Date
Will Hawkins
35cec805bf
[lldb][test] Workaround older systems that lack gettid (#104831)
Older glibc versions do not provide `gettid`. Provide our own `gettid`
in these cases.

Fixes a build failure caused by #104109.
2024-08-20 21:09:08 -07:00
Fred Grim
7a06ebdeb6
[lldb] PopulatePrpsInfoTest can fail due to hardcoded priority value (#104617)
In implementing this test one of the assertions assumes that the
priority is the default in linux (0) but, evidently, some of the build
runners prioritize the test to, at least, 5. This ensures that
regardless of the priority the test passes by validating that its the
process's priority
```
fgrim@host001 :~/llvm-project/debug_build> nice -n 15 tools/lldb/unittests/Process/elf-core/ProcessElfCoreTests
[==========] Running 2 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 2 tests from ElfCoreTest
[ RUN      ] ElfCoreTest.PopulatePrpsInfoTest
[       OK ] ElfCoreTest.PopulatePrpsInfoTest (4 ms)
[ RUN      ] ElfCoreTest.PopulatePrStatusTest
[       OK ] ElfCoreTest.PopulatePrStatusTest (3 ms)
[----------] 2 tests from ElfCoreTest (7 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test suite ran. (8 ms total)
[  PASSED  ] 2 tests.
===(10:03)===
fgrim@host001 :~/llvm-project/debug_build>
```
2024-08-19 08:41:11 -07:00
Fred Grim
a434cac523
[lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (#104109)
To create elf core files there are multiple notes in the core file that
contain these structs as the note. These populate methods take a Process
and produce fully specified structures that can be used to fill these
note sections. The pr also adds tests to ensure these structs are
correctly populated.
2024-08-16 08:53:15 -07:00