Files
revng-revng/include/revng/Runtime/PrintPlainMetaAddress.h
Alessandro Di Federico f2c83d2f67 Introduce PlainMetaAddress
This commit extracts a plain `struct` from the `MetaAddress` class. This
enables us to use `MetaAddress` from C and therefore, runtime.

The definition of such `struct`, `PlainMetaAddress`, is in
`PlainMetaAddress.h`, which is included by `early-linked.c`.

A function to print the content of a `PlainMetaAddress` has also been
introduced.

Also, anticipating the linkage of `early-linked.c` triggered a
superflous assertion in `CPUStateAccessAnalysis`. This commit removes
it.
2021-02-19 09:39:49 +01:00

21 lines
531 B
C

#pragma once
/*
* This file is distributed under the MIT License. See LICENSE.md for details.
*/
#include <inttypes.h>
#include <stdio.h>
#include "revng/Runtime/PlainMetaAddress.h"
static int fprint_metaaddress(FILE *stream, PlainMetaAddress *address) {
return fprintf(stream,
"{ 0x%" PRIx32 ", 0x%" PRIx16 ", 0x%" PRIx16 ", 0x%" PRIx64
" }\n",
address->Epoch,
address->AddressSpace,
address->Type,
address->Address);
}