Changeset 05b4cfb in rtems-tools


Ignore:
Timestamp:
Aug 26, 2017, 8:15:51 AM (22 months ago)
Author:
Fabien Chouteau <chouteau@…>
Branches:
master
Children:
b857151
Parents:
67d48e2
git-author:
Fabien Chouteau <chouteau@…> (08/26/17 08:15:51)
git-committer:
Chris Johns <chrisj@…> (08/29/17 08:05:13)
Message:

covoar/qemu-traces.h: Change to match current couverture-qemu file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tester/covoar/qemu-traces.h

    r67d48e2 r05b4cfb  
    22 * QEMU System Emulator
    33 *
    4  * Copyright (C) 2009, AdaCore
     4 * Copyright (C) 2009-2011, AdaCore
    55 *
    66 * Permission is hereby granted, free of charge, to any person obtaining a copy
     
    2424
    2525/*
    26  * Qemu trace file format.
     26 * QEMU trace file format.
    2727 * It requires proper definition for uintXX_t where XX is 8, 16, 32 and 64
    2828 * and target_ulong (32 or 64 bits).
     
    3232#define QEMU_TRACE_H
    3333
    34 /* XXX really not always right */
    35 /* XXX Added for covoar so this compiles */
    36 typedef uint32_t target_ulong;
     34
    3735
    3836/* File header definition.  */
    39 struct trace_header
    40 {
     37struct trace_header {
    4138    char magic[12];
    4239#define QEMU_TRACE_MAGIC "#QEMU-Traces"
     
    4744    /* File kind.  */
    4845    uint8_t kind;
    49 #define QEMU_TRACE_KIND_RAW            0
    50 #define QEMU_TRACE_KIND_HISTORY        1
    51 #define QEMU_TRACE_KIND_INFO           2
    52 #define QEMU_TRACE_KIND_DECISION_MAP   3
     46#define QEMU_TRACE_KIND_RAW          0
     47#define QEMU_TRACE_KIND_HISTORY      1
     48#define QEMU_TRACE_KIND_INFO         2
     49#define QEMU_TRACE_KIND_DECISION_MAP 3
    5350#define QEMU_TRACE_KIND_CONSOLIDATED 248
    5451
     
    6764
    6865/* Header is followed by trace entries.  */
    69 struct trace_entry
    70 {
    71     target_ulong pc;
     66struct trace_entry {
     67    /* FIXME: import target_ulong */
     68    /* target_ulong pc; */
     69    uint32_t pc;
     70
    7271    uint16_t size;
    73     uint8_t op;
     72    uint8_t  op;
    7473};
    7574
    76 struct trace_entry32
    77 {
     75struct trace_entry32 {
    7876    uint32_t pc;
    7977    uint16_t size;
    80     uint8_t op;
    81     uint8_t _pad[1];
     78    uint8_t  op;
     79    uint8_t  _pad[1];
    8280};
    8381
    84 struct trace_entry64
    85 {
     82struct trace_entry64 {
    8683    uint64_t pc;
    8784    uint16_t size;
    88     uint8_t op;
    89     uint8_t _pad[5];
     85    uint8_t  op;
     86    uint8_t  _pad[5];
    9087};
    9188
     
    9592
    9693/* _BLOCK means pc .. pc+size-1 was executed.  */
    97 #define TRACE_OP_BLOCK 0x10 /* Block fully executed.  */
    98 #define TRACE_OP_FAULT 0x20 /* Fault at pc.  */
    99 #define TRACE_OP_DYN   0x40 /* Dynamic branch.  */
    100 #define TRACE_OP_BR0 0x01 /* Branch taken "in direction 0".  */
    101 #define TRACE_OP_BR1 0x02 /* Branch taken "in direction 1". */
    102 #define TRACE_OP_BR2 0x04
    103 #define TRACE_OP_BR3 0x08
     94#define TRACE_OP_BLOCK 0x10     /* Block fully executed.  */
     95#define TRACE_OP_FAULT 0x20     /* Fault at pc.  */
     96#define TRACE_OP_BR0   0x01     /* Branch 0 taken at pc.  */
     97#define TRACE_OP_BR1   0x02
     98
     99#define TRACE_OP_SPECIAL 0x80   /* Special info in trace file.  */
     100/* Special operations (in size).  */
     101#define TRACE_SPECIAL_LOADADDR 0x1      /* Module loaded at PC.  */
     102
     103/* Only used internally in cpu-exec.c.  */
     104#define TRACE_OP_HIST_SET   0x100 /* Set in the map file.  */
     105#define TRACE_OP_HIST_CACHE 0x200 /* Has already been searched.  */
    104106
    105107/*
    106108 * Decision map operations
    107109 */
     110
     111/* Trace conditional jump instruction at address */
    108112#define TRACE_OP_TRACE_CONDITIONAL 1
    109 /* Trace conditional jump instruction at address */
    110113
    111114extern struct trace_entry *trace_current;
    112 extern int tracefile_enabled;
    113 extern int tracefile_nobuf;
    114 extern int tracefile_history;
     115extern int                 tracefile_enabled;
    115116
    116 void trace_init (const char *optarg);
    117 void trace_push_entry (void);
    118 
     117void trace_init(const char *optarg);
     118void trace_cleanup(void);
     119void trace_push_entry(void);
     120void trace_special(uint16_t subop, uint32_t data);
    119121#endif /* QEMU_TRACE_H */
Note: See TracChangeset for help on using the changeset viewer.