qute

A software analysis framework built around the QBE intermediate language

git clone https://git.8pit.net/qute.git

 1// SPDX-FileCopyrightText: 2026 Sören Tempel <soeren+git@soeren-tempel.net>
 2//
 3// SPDX-License-Identifier: GPL-3.0-only
 4
 5#include <stdlib.h>
 6
 7// (gdb) pt/o PaddedStruct
 8// type = struct PaddedStruct {
 9// /*      0      |       4 */    int status;
10// /* XXX  4-byte hole      */
11// /*      8      |       8 */    void *stamps;
12// /*     16      |       8 */    void **arguments;
13// /*     24      |       4 */    int argumentsN;
14// /* XXX  4-byte padding   */
15// /* total size:        32 */
16// }
17typedef struct PaddedStruct {
18  int status;
19  void *stamps;
20  void **arguments;
21  int argumentsN;
22} PaddedStruct;
23
24PaddedStruct somefunc(int status) {
25	return (PaddedStruct) {
26		.status = status,
27		.stamps = NULL,
28		.arguments = NULL,
29		.argumentsN = 0,
30	};
31}
32
33int main(void) {
34	PaddedStruct s = somefunc(23);
35	return s.status;
36}