diff options
author | Pedro Alves <palves@redhat.com> | 2017-02-01 00:07:50 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-02-01 00:07:50 +0000 |
commit | be85ce7dcbe99a8e7cd847a0c5b449a0b18a8ce7 (patch) | |
tree | 5246d83bdf8573089dda210b76a7d4df898158b9 /gdb | |
parent | a8128fa6a75e2d3da7d446bec9b8fa36573296cf (diff) | |
download | gdb-be85ce7dcbe99a8e7cd847a0c5b449a0b18a8ce7.zip gdb-be85ce7dcbe99a8e7cd847a0c5b449a0b18a8ce7.tar.gz gdb-be85ce7dcbe99a8e7cd847a0c5b449a0b18a8ce7.tar.bz2 |
[ob/pushed] Use gdb_insn_length instead of creating dummy stream
gdb/ChangeLog:
2017-02-01 Pedro Alves <palves@redhat.com>
* i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 91cde2b..710b181 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-02-01 Pedro Alves <palves@redhat.com> + + * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length. + 2017-01-31 Pedro Alves <palves@redhat.com> * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified): diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 8a4d59f..b86c623 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -8110,7 +8110,6 @@ i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, char **msg) { int len, jumplen; - static struct ui_file *gdb_null = NULL; /* Ask the target for the minimum instruction length supported. */ jumplen = target_get_min_fast_tracepoint_insn_len (); @@ -8133,12 +8132,8 @@ i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, jumplen = (register_size (gdbarch, 0) == 8) ? 5 : 4; } - /* Dummy file descriptor for the disassembler. */ - if (!gdb_null) - gdb_null = ui_file_new (); - /* Check for fit. */ - len = gdb_print_insn (gdbarch, addr, gdb_null, NULL); + len = gdb_insn_length (gdbarch, addr); if (len < jumplen) { |