From: Shahab Vahedi <shahab.vahedi@gmail.com>
To: gdb@sourceware.org
Subject: Getting rid of "Cannot access memory at address ..."
Date: Sat, 04 Jan 2020 12:07:00 -0000 [thread overview]
Message-ID: <20200104120749.GA166189@gmail.com> (raw)
Hello everyone,
I have sumbitted a bug [1]. I am not going to repeat the whole
description here but only the part pertaining to the solution.
To solve the whole bug completely, there are 2 things to tackle:
1. The overflow occuring in "tui_disasm_window::addr_is_displayed".
A patch has been submitted [2].
2. Calculation of "max_lines" in "tui_disasm_window::set_contents".
Ideally, "max_lines" should be:
max_lines = std::min<int>(height-2,
number_of_instructions_in_elf);
However, it's not trivial (to me) how to get the number of
instructions that exist there. Any thought on that?
--
Shahab
[1]
https://sourceware.org/bugzilla/show_bug.cgi?id=25345
[2]
with title: [PATCH] GDB: Fix the overflow in addr_is_displayed()
next reply other threads:[~2020-01-04 12:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-04 12:07 Shahab Vahedi [this message]
2020-01-08 13:03 ` Shahab Vahedi
2020-01-08 13:48 ` Shahab Vahedi
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=20200104120749.GA166189@gmail.com \
--to=shahab.vahedi@gmail.com \
--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