162
162
#define GPR_SIZE 8
163
163
#define CR_SIZE 8
164
164
165
- #define STACK_FRAME_OVERHEAD 160 /* size of minimum stack frame */
165
+ #define STACK_FRAME_OVERHEAD 160 /* size of minimum stack frame */
166
166
167
167
#endif /* __s390x__ */
168
168
179
179
#define ACR_SIZE 4
180
180
181
181
182
- #define PTRACE_OLDSETOPTIONS 21
182
+ #define PTRACE_OLDSETOPTIONS 21
183
183
184
184
#ifndef __ASSEMBLY__
185
185
#include <linux/stddef.h>
186
186
#include <linux/types.h>
187
187
188
- typedef union
189
- {
190
- float f ;
191
- double d ;
192
- __u64 ui ;
188
+ typedef union {
189
+ float f ;
190
+ double d ;
191
+ __u64 ui ;
193
192
struct
194
193
{
195
194
__u32 hi ;
196
195
__u32 lo ;
197
196
} fp ;
198
197
} freg_t ;
199
198
200
- typedef struct
201
- {
202
- __u32 fpc ;
199
+ typedef struct {
200
+ __u32 fpc ;
203
201
__u32 pad ;
204
- freg_t fprs [NUM_FPRS ];
202
+ freg_t fprs [NUM_FPRS ];
205
203
} s390_fp_regs ;
206
204
207
- #define FPC_EXCEPTION_MASK 0xF8000000
208
- #define FPC_FLAGS_MASK 0x00F80000
209
- #define FPC_DXC_MASK 0x0000FF00
210
- #define FPC_RM_MASK 0x00000003
205
+ #define FPC_EXCEPTION_MASK 0xF8000000
206
+ #define FPC_FLAGS_MASK 0x00F80000
207
+ #define FPC_DXC_MASK 0x0000FF00
208
+ #define FPC_RM_MASK 0x00000003
211
209
212
210
/* this typedef defines how a Program Status Word looks like */
213
- typedef struct
214
- {
215
- unsigned long mask ;
216
- unsigned long addr ;
211
+ typedef struct {
212
+ unsigned long mask ;
213
+ unsigned long addr ;
217
214
} __attribute__ ((aligned (8 ))) psw_t ;
218
215
219
216
#ifndef __s390x__
@@ -282,8 +279,7 @@ typedef struct
282
279
/*
283
280
* The s390_regs structure is used to define the elf_gregset_t.
284
281
*/
285
- typedef struct
286
- {
282
+ typedef struct {
287
283
psw_t psw ;
288
284
unsigned long gprs [NUM_GPRS ];
289
285
unsigned int acrs [NUM_ACRS ];
@@ -294,8 +290,7 @@ typedef struct
294
290
* The user_pt_regs structure exports the beginning of
295
291
* the in-kernel pt_regs structure to user space.
296
292
*/
297
- typedef struct
298
- {
293
+ typedef struct {
299
294
unsigned long args [1 ];
300
295
psw_t psw ;
301
296
unsigned long gprs [NUM_GPRS ];
@@ -307,19 +302,17 @@ typedef struct
307
302
* touch or even look at it if you don't want to modify the user-space
308
303
* ptrace interface. In particular stay away from it for in-kernel PER.
309
304
*/
310
- typedef struct
311
- {
305
+ typedef struct {
312
306
unsigned long cr [NUM_CR_WORDS ];
313
307
} per_cr_words ;
314
308
315
309
#define PER_EM_MASK 0xE8000000UL
316
310
317
- typedef struct
318
- {
311
+ typedef struct {
319
312
#ifdef __s390x__
320
- unsigned : 32 ;
313
+ unsigned : 32 ;
321
314
#endif /* __s390x__ */
322
- unsigned em_branching : 1 ;
315
+ unsigned em_branching : 1 ;
323
316
unsigned em_instruction_fetch : 1 ;
324
317
/*
325
318
* Switching on storage alteration automatically fixes
@@ -328,44 +321,41 @@ typedef struct
328
321
unsigned em_storage_alteration : 1 ;
329
322
unsigned em_gpr_alt_unused : 1 ;
330
323
unsigned em_store_real_address : 1 ;
331
- unsigned : 3 ;
324
+ unsigned : 3 ;
332
325
unsigned branch_addr_ctl : 1 ;
333
- unsigned : 1 ;
326
+ unsigned : 1 ;
334
327
unsigned storage_alt_space_ctl : 1 ;
335
- unsigned : 21 ;
328
+ unsigned : 21 ;
336
329
unsigned long starting_addr ;
337
330
unsigned long ending_addr ;
338
331
} per_cr_bits ;
339
332
340
- typedef struct
341
- {
333
+ typedef struct {
342
334
unsigned short perc_atmid ;
343
335
unsigned long address ;
344
336
unsigned char access_id ;
345
337
} per_lowcore_words ;
346
338
347
- typedef struct
348
- {
349
- unsigned perc_branching : 1 ;
339
+ typedef struct {
340
+ unsigned perc_branching : 1 ;
350
341
unsigned perc_instruction_fetch : 1 ;
351
342
unsigned perc_storage_alteration : 1 ;
352
- unsigned perc_gpr_alt_unused : 1 ;
343
+ unsigned perc_gpr_alt_unused : 1 ;
353
344
unsigned perc_store_real_address : 1 ;
354
- unsigned : 3 ;
355
- unsigned atmid_psw_bit_31 : 1 ;
356
- unsigned atmid_validity_bit : 1 ;
357
- unsigned atmid_psw_bit_32 : 1 ;
358
- unsigned atmid_psw_bit_5 : 1 ;
359
- unsigned atmid_psw_bit_16 : 1 ;
360
- unsigned atmid_psw_bit_17 : 1 ;
361
- unsigned si : 2 ;
345
+ unsigned : 3 ;
346
+ unsigned atmid_psw_bit_31 : 1 ;
347
+ unsigned atmid_validity_bit : 1 ;
348
+ unsigned atmid_psw_bit_32 : 1 ;
349
+ unsigned atmid_psw_bit_5 : 1 ;
350
+ unsigned atmid_psw_bit_16 : 1 ;
351
+ unsigned atmid_psw_bit_17 : 1 ;
352
+ unsigned si : 2 ;
362
353
unsigned long address ;
363
- unsigned : 4 ;
364
- unsigned access_id : 4 ;
354
+ unsigned : 4 ;
355
+ unsigned access_id : 4 ;
365
356
} per_lowcore_bits ;
366
357
367
- typedef struct
368
- {
358
+ typedef struct {
369
359
union {
370
360
per_cr_words words ;
371
361
per_cr_bits bits ;
@@ -375,9 +365,9 @@ typedef struct
375
365
* the kernel always sets them to zero. To enable single
376
366
* stepping use ptrace(PTRACE_SINGLESTEP) instead.
377
367
*/
378
- unsigned single_step : 1 ;
368
+ unsigned single_step : 1 ;
379
369
unsigned instruction_fetch : 1 ;
380
- unsigned : 30 ;
370
+ unsigned : 30 ;
381
371
/*
382
372
* These addresses are copied into cr10 & cr11 if single
383
373
* stepping is switched off
@@ -387,11 +377,10 @@ typedef struct
387
377
union {
388
378
per_lowcore_words words ;
389
379
per_lowcore_bits bits ;
390
- } lowcore ;
380
+ } lowcore ;
391
381
} per_struct ;
392
382
393
- typedef struct
394
- {
383
+ typedef struct {
395
384
unsigned int len ;
396
385
unsigned long kernel_addr ;
397
386
unsigned long process_addr ;
@@ -401,12 +390,12 @@ typedef struct
401
390
* S/390 specific non posix ptrace requests. I chose unusual values so
402
391
* they are unlikely to clash with future ptrace definitions.
403
392
*/
404
- #define PTRACE_PEEKUSR_AREA 0x5000
405
- #define PTRACE_POKEUSR_AREA 0x5001
393
+ #define PTRACE_PEEKUSR_AREA 0x5000
394
+ #define PTRACE_POKEUSR_AREA 0x5001
406
395
#define PTRACE_PEEKTEXT_AREA 0x5002
407
396
#define PTRACE_PEEKDATA_AREA 0x5003
408
397
#define PTRACE_POKETEXT_AREA 0x5004
409
- #define PTRACE_POKEDATA_AREA 0x5005
398
+ #define PTRACE_POKEDATA_AREA 0x5005
410
399
#define PTRACE_GET_LAST_BREAK 0x5006
411
400
#define PTRACE_PEEK_SYSTEM_CALL 0x5007
412
401
#define PTRACE_POKE_SYSTEM_CALL 0x5008
@@ -424,21 +413,19 @@ typedef struct
424
413
* PT_PROT definition is loosely based on hppa bsd definition in
425
414
* gdb/hppab-nat.c
426
415
*/
427
- #define PTRACE_PROT 21
416
+ #define PTRACE_PROT 21
428
417
429
- typedef enum
430
- {
418
+ typedef enum {
431
419
ptprot_set_access_watchpoint ,
432
420
ptprot_set_write_watchpoint ,
433
421
ptprot_disable_watchpoint
434
422
} ptprot_flags ;
435
423
436
- typedef struct
437
- {
424
+ typedef struct {
438
425
unsigned long lowaddr ;
439
426
unsigned long hiaddr ;
440
427
ptprot_flags prot ;
441
- } ptprot_area ;
428
+ } ptprot_area ;
442
429
443
430
/* Sequence of bytes for breakpoint illegal instruction. */
444
431
#define S390_BREAKPOINT {0x0,0x1}
@@ -450,8 +437,7 @@ typedef struct
450
437
* The user_regs_struct defines the way the user registers are
451
438
* store on the stack for signal handling.
452
439
*/
453
- struct user_regs_struct
454
- {
440
+ struct user_regs_struct {
455
441
psw_t psw ;
456
442
unsigned long gprs [NUM_GPRS ];
457
443
unsigned int acrs [NUM_ACRS ];
0 commit comments