+2015-07-30 Pierre Langlois <pierre.langlois@arm.com>
+
+ * arch-utils.c (default_fast_tracepoint_valid_at): Remove unused
+ isize argument.
+ * arch-utils.h (default_fast_tracepoint_valid_at): Likewise.
+ * breakpoint.c (check_fast_tracepoint_sals): Adjust call to
+ gdbarch_fast_tracepoint_valid_at.
+ * gdbarch.sh (fast_tracepoint_valid_at): Remove isize argument.
+ * gdbarch.h: Regenerate.
+ * gdbarch.c: Regenerate.
+ * i386-tdep.c (i386_fast_tracepoint_valid_at): Remove isize
+ argument. Do not set it.
+ * remote.c (remote_download_tracepoint): Adjust call to
+ gdbarch_fast_tracepoint_valid_at. Call gdb_insn_length to get
+ the instruction length.
+
2015-07-30 Yao Qi <yao.qi@linaro.org>
* arm-tdep.h (enum gdb_regnum): Move it to ...
}
int
-default_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
- CORE_ADDR addr, int *isize, char **msg)
+default_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr,
+ char **msg)
{
/* We don't know if maybe the target has some way to do fast
tracepoints that doesn't need gdbarch, so always say yes. */
extern int default_has_shared_address_space (struct gdbarch *);
extern int default_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
- CORE_ADDR addr,
- int *isize, char **msg);
+ CORE_ADDR addr, char **msg);
extern void default_remote_breakpoint_from_pc (struct gdbarch *,
CORE_ADDR *pcptr, int *kindptr);
associated with SAL. */
if (sarch == NULL)
sarch = gdbarch;
- rslt = gdbarch_fast_tracepoint_valid_at (sarch, sal->pc,
- NULL, &msg);
+ rslt = gdbarch_fast_tracepoint_valid_at (sarch, sal->pc, &msg);
old_chain = make_cleanup (xfree, msg);
if (!rslt)
}
int
-gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg)
+gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, char **msg)
{
gdb_assert (gdbarch != NULL);
gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n");
- return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, isize, msg);
+ return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, msg);
}
void
/* True if a fast tracepoint can be set at an address. */
-typedef int (gdbarch_fast_tracepoint_valid_at_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg);
-extern int gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg);
+typedef int (gdbarch_fast_tracepoint_valid_at_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr, char **msg);
+extern int gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, char **msg);
extern void set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at);
/* Return the "auto" target charset. */
m:int:has_shared_address_space:void:::default_has_shared_address_space::0
# True if a fast tracepoint can be set at an address.
-m:int:fast_tracepoint_valid_at:CORE_ADDR addr, int *isize, char **msg:addr, isize, msg::default_fast_tracepoint_valid_at::0
+m:int:fast_tracepoint_valid_at:CORE_ADDR addr, char **msg:addr, msg::default_fast_tracepoint_valid_at::0
# Return the "auto" target charset.
f:const char *:auto_charset:void::default_auto_charset:default_auto_charset::0
string. */
static int
-i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
- CORE_ADDR addr, int *isize, char **msg)
+i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr,
+ char **msg)
{
int len, jumplen;
static struct ui_file *gdb_null = NULL;
/* Check for fit. */
len = gdb_print_insn (gdbarch, addr, gdb_null, NULL);
- if (isize)
- *isize = len;
if (len < jumplen)
{
#include "gdb_bfd.h"
#include "filestuff.h"
#include "rsp-low.h"
+#include "disasm.h"
#include <sys/time.h>
target capabilities at definition time. */
if (remote_supports_fast_tracepoints ())
{
- int isize;
-
- if (gdbarch_fast_tracepoint_valid_at (target_gdbarch (),
- tpaddr, &isize, NULL))
+ if (gdbarch_fast_tracepoint_valid_at (loc->gdbarch, tpaddr,
+ NULL))
xsnprintf (buf + strlen (buf), BUF_SIZE - strlen (buf), ":F%x",
- isize);
+ gdb_insn_length (loc->gdbarch, tpaddr));
else
/* If it passed validation at definition but fails now,
something is very wrong. */