MCPcopy Create free account
hub / github.com/GJDuck/e9patch / record

Function record

test/regtest/patch.cpp:497–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

495};
496
497void record(const void *addr, intptr_t val)
498{
499 static struct NODE *vals = nullptr;
500 struct NODE *n;
501 for (n = vals; n != nullptr; n = n->next)
502 {
503 if (val == n->val)
504 return;
505 }
506 fprintf(stderr, "%p: add 0x%.16lx\n", addr, val);
507 n = (struct NODE *)malloc(sizeof(struct NODE));
508 if (n == NULL)
509 {
510 fprintf(stderr, "malloc() failed (%s)\n", strerror(errno));
511 abort();
512 }
513 n->val = val;
514 n->next = vals;
515 vals = n;
516}
517
518struct LOG_ENTRY
519{

Callers

nothing calls this directly

Calls 4

mallocFunction · 0.85
strerrorFunction · 0.85
abortFunction · 0.85
fprintfFunction · 0.50

Tested by

no test coverage detected