* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
***************************************************************************/
#ifdef HAVE_CONFIG_H
#include "config.h"
ADDR_COMPARATOR(14),
ADDR_COMPARATOR(15),
ADDR_COMPARATOR(16),
+ { 0, 0, 0, 0, NULL }
#undef ADDR_COMPARATOR
};
DATA_COMPARATOR(6),
DATA_COMPARATOR(7),
DATA_COMPARATOR(8),
+ { 0, 0, 0, 0, NULL }
#undef DATA_COMPARATOR
};
ETM_COUNTER(2),
ETM_COUNTER(3),
ETM_COUNTER(4),
+ { 0, 0, 0, 0, NULL }
#undef ETM_COUNTER
};
ETM_OUTPUT(2),
ETM_OUTPUT(3),
ETM_OUTPUT(4),
+ { 0, 0, 0, 0, NULL }
#undef ETM_OUTPUT
};
* version of the ETM, to the specified cache.
*/
for (; nreg--; r++) {
+ /* No more registers to add */
+ if (!r->size) {
+ LOG_ERROR("etm_reg_add is requested to add non-existing registers, ETM config might be bogus");
+ return;
+ }
/* this ETM may be too old to have some registers */
if (r->bcd_vers > bcd_vers)
etm_core, 1);
etm_get_reg(reg_list);
- etm_ctx->config = buf_get_u32((void *)&arch_info->value, 0, 32);
+ etm_ctx->config = buf_get_u32(&arch_info->value, 0, 32);
config = etm_ctx->config;
/* figure ETM version then add base registers */
etm_core + 1, 1);
etm_get_reg(reg_list + 1);
etm_ctx->id = buf_get_u32(
- (void *)&arch_info[1].value, 0, 32);
+ &arch_info[1].value, 0, 32);
LOG_DEBUG("ETM ID: %08x", (unsigned) etm_ctx->id);
bcd_vers = 0x10 + (((etm_ctx->id) >> 4) & 0xff);