Files
clang-p2996/lldb/test/API/functionalities/memory/find/main.cpp
Michael Buch 1c1df94d09 [lldb][Commands][NFC] Extract memory find expression evaluation into helpers (#143686)
This patch factors out the `-e` option logic into two helper functions.
The `EvaluateExpression` helper might seem redundant but I'll be adding
to it in a follow-up patch to fix an issue when running `memory find -e`
for Swift targets.

Also adds test coverage for the error cases that were previously
untested.

rdar://152113525
2025-06-12 16:48:57 +01:00

25 lines
628 B
C++

#include <stdio.h>
#include <stdint.h>
template <size_t T> struct [[gnu::packed]] Payload {
uint8_t data[T];
};
using ThreeBytes = Payload<3>;
using FiveBytes = Payload<5>;
using SixBytes = Payload<5>;
using SevenBytes = Payload<7>;
using NineBytes = Payload<9>;
int main (int argc, char const *argv[])
{
const char* stringdata = "hello world; I like to write text in const char pointers";
uint8_t bytedata[] = {0xAA,0xBB,0xCC,0xDD,0xEE,0xFF,0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99};
ThreeBytes b1;
FiveBytes b2;
SixBytes b3;
SevenBytes b4;
NineBytes b5;
return 0; // break here
}