Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Zied Guermazi <zied.guermazi@trande.de>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: A lean way for getting the size of the instruction at a given address
Date: Sun, 4 Apr 2021 09:59:01 +0200	[thread overview]
Message-ID: <442482d9-31bd-8101-38f0-fb7c7763e61c@trande.de> (raw)
In-Reply-To: <295a186e-0dd9-fb96-671a-3df0a5611dd9@trande.de>

hi

I need to get the size of the instruction at a given address. I am 
currently using gdb_insn_length (struct gdbarch *gdbarch, CORE_ADDR 
addr) which calls gdb_print_insn (struct gdbarch *gdbarch, CORE_ADDR 
memaddr, struct ui_file *stream, int *branch_delay_insns). and this is 
consuming a huge time, considering that this is used in branch tracing 
and this gets repeated up to few millions times.


Is there a lean way for getting the size of the instruction at a given 
address, I am using it for aarch64 and arm targets.

Kind Regards

Zied Guermazi



       reply	other threads:[~2021-04-04  7:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <295a186e-0dd9-fb96-671a-3df0a5611dd9@trande.de>
2021-04-04  7:59 ` Zied Guermazi [this message]
2021-04-05 13:01   ` Luis Machado via Gdb
2021-04-05 16:17     ` Zied Guermazi
2021-04-05 16:40       ` Luis Machado via Gdb
2021-04-05 21:47         ` Zied Guermazi
2021-04-05 22:04           ` Luis Machado via Gdb
2021-04-05 22:12             ` Zied Guermazi
2021-04-05 22:15               ` Luis Machado via Gdb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=442482d9-31bd-8101-38f0-fb7c7763e61c@trande.de \
    --to=zied.guermazi@trande.de \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox