Getting rid of "Cannot access memory at address ..."
Shahab Vahedi <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
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()