cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

btf_dump_test_case_multidim.c (623B)


      1// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
      2
      3/*
      4 * BTF-to-C dumper test for multi-dimensional array output.
      5 *
      6 * Copyright (c) 2019 Facebook
      7 */
      8/* ----- START-EXPECTED-OUTPUT ----- */
      9typedef int arr_t[2];
     10
     11typedef int multiarr_t[3][4][5];
     12
     13typedef int *ptr_arr_t[6];
     14
     15typedef int *ptr_multiarr_t[7][8][9][10];
     16
     17typedef int * (*fn_ptr_arr_t[11])();
     18
     19typedef int * (*fn_ptr_multiarr_t[12][13])();
     20
     21struct root_struct {
     22	arr_t _1;
     23	multiarr_t _2;
     24	ptr_arr_t _3;
     25	ptr_multiarr_t _4;
     26	fn_ptr_arr_t _5;
     27	fn_ptr_multiarr_t _6;
     28};
     29
     30/* ------ END-EXPECTED-OUTPUT ------ */
     31
     32int f(struct root_struct *s)
     33{
     34	return 0;
     35}