Home | History | Annotate | Line # | Download | only in gdb.dwarf2
      1 /* Copyright (C) 2020-2024 Free Software Foundation, Inc.
      2 
      3    This file is part of GDB.
      4 
      5    This program is free software; you can redistribute it and/or modify
      6    it under the terms of the GNU General Public License as published by
      7    the Free Software Foundation; either version 3 of the License, or
      8    (at your option) any later version.
      9 
     10    This program is distributed in the hope that it will be useful,
     11    but WITHOUT ANY WARRANTY; without even the implied warranty of
     12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13    GNU General Public License for more details.
     14 
     15    You should have received a copy of the GNU General Public License
     16    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
     17 
     18 /* A 16 bit slot holding a 7-bit value of -1.  Note that, for all
     19    these values, we explicitly set the endian-ness in the DWARF to
     20    avoid issues.  */
     21 unsigned char i16_m1[2] = { 0x7f, 0 };
     22 
     23 /* A 16 bit slot holding a 1-bit value of 1 at offset 2.  */
     24 unsigned char u16_1[2] = { 0x4, 0 };
     25 
     26 /* A 32 bit slot holding a 17-bit value of -2.  */
     27 unsigned char u32_m2[4] = { 0xfe, 0xff, 0x01, 0 };
     28 
     29 /* A 32 bit slot holding a 31 bit value of 1.  The high bit should be
     30    ignored when reading.  */
     31 unsigned char u32_1[4] = { 1, 0, 0, 0x80 };
     32 
     33 /* A 32 bit slot holding a 31 bit value of 1, offset by 1 bit.  */
     34 unsigned char u32_1_off[4] = { 2, 0, 0, 0 };
     35 
     36 /* A 32 bit slot holding a 30 bit value of 1, offset by 1 bit.
     37    Big-endian.  */
     38 unsigned char be30_1_off[4] = { 0x80, 0, 0, 2 };
     39 
     40 /* A 32 bit slot holding a 0 bit value.  We don't use 0 in the array
     41    here, to catch any situation where gdb tries to use the memory.  */
     42 unsigned char u32_0[4] = { 0xff, 0xff, 0xff, 0xff };
     43 
     44 int
     45 main (void)
     46 {
     47   return 0;
     48 }
     49