Skip to content

Commit

Permalink
Merge pull request #9773 from jasonmolenda/cp/141727563-initialize-cp…
Browse files Browse the repository at this point in the history
…utype-in-test-corefile-61

[lldb][Mach-O] Initialize cputype/cpusubtype in test corefiles (llvm#120518)
  • Loading branch information
JDevlieghere authored Dec 19, 2024
2 parents 10942e8 + 283ec08 commit d3ced1f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ void add_lc_segment(std::vector<std::vector<uint8_t>> &loadcmds,

std::string get_uuid_from_binary(const char *fn, cpu_type_t &cputype,
cpu_subtype_t &cpusubtype) {
// We may be given a file, set reasonable values.
#if defined(__x86_64__)
cputype = CPU_TYPE_X86;
cpusubtype = CPU_SUBTYPE_X86_ALL;
#else
cputype = CPU_TYPE_ARM64;
cpusubtype = CPU_SUBTYPE_ARM64_ALL;
#endif
if (strlen(fn) == 0)
return {};

Expand Down

0 comments on commit d3ced1f

Please sign in to comment.