summaryrefslogtreecommitdiff
path: root/debugger
diff options
context:
space:
mode:
authorYunlian Jiang <yunlian@google.com>2015-05-26 10:22:31 -0700
committerThomas Wood <thomas.wood@intel.com>2015-05-27 16:28:34 +0100
commit95019c2a3c4ed5943ad16e17c8dcf36fd6492adc (patch)
tree4e2e68dbb4c677de9a4099d17f8992b7fa8500a9 /debugger
parent88c9a82318bae6bf97e55bf1a28018708aca2200 (diff)
debugger: remove unnecessary struct per_thread_data
This removes unnecessary 'struct per_thread_data' and avoids the compilation error 'variable length array in structure extension will never be supported' by clang. The bug entry is https://code.google.com/p/chromium/issues/detail?id=476001 Cc: Benjamin Widawsky <benjamin.widawsky@intel.com> Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Yunlian Jiang <yunlian@google.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'debugger')
-rw-r--r--debugger/eudb.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/debugger/eudb.c b/debugger/eudb.c
index 0e810db1..39c5cca2 100644
--- a/debugger/eudb.c
+++ b/debugger/eudb.c
@@ -207,15 +207,11 @@ wait_for_attn(int timeout, int *out_bits) {
#define eu_tid(bit) eu_info->debuggees[bit].tid
static struct eu_state *
find_eu_shmem(int bit, volatile uint8_t *buf) {
- struct per_thread_data {
- uint8_t ____[dh.per_thread_scratch];
- }__attribute__((packed)) *data;
struct eu_state *eu;
int mem_tid, mem_euid, i;
- data = (struct per_thread_data *)buf;
for(i = 0; i < eu_info->num_threads; i++) {
- eu = (struct eu_state *)&data[i];
+ eu = (struct eu_state *)(buf + i * dh.per_thread_scratch);
mem_tid = eu->sr0 & 0x7;
mem_euid = (eu->sr0 >> 8) & 0xf;
if (mem_tid == eu_tid(bit) && mem_euid == eu_id(bit))