Rev 2940 | Rev 2946 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2940 | Rev 2941 | ||
---|---|---|---|
Line 127... | Line 127... | ||
127 | futex_up(&async_futex); |
127 | futex_up(&async_futex); |
128 | } |
128 | } |
129 | 129 | ||
130 | unsigned dthread_get_pc(dthread_t *dt) |
130 | unsigned dthread_get_pc(dthread_t *dt) |
131 | { |
131 | { |
132 | static unsigned istate_buffer[1024]; |
132 | static istate_t istate; |
133 | int rc; |
133 | int rc; |
134 | 134 | ||
135 | rc = udebug_regs_read(app_phone, dt->hash, istate_buffer); |
135 | rc = udebug_regs_read(app_phone, dt->hash, &istate); |
136 | if (rc < 0) { |
136 | if (rc < 0) { |
137 | printf("failed reading registers (%d)\n", rc); |
137 | printf("failed reading registers (%d)\n", rc); |
138 | return 0; |
138 | return 0; |
139 | } |
139 | } |
140 | 140 | ||
141 | return istate_get_pc(istate_buffer); |
141 | return istate_get_pc(&istate); |
142 | } |
142 | } |
143 | 143 | ||
144 | /** @} |
144 | /** @} |
145 | */ |
145 | */ |