Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Getting rid of "Cannot access memory at address ..."
@ 2020-01-04 12:07 Shahab Vahedi
  2020-01-08 13:03 ` Shahab Vahedi
  2020-01-08 13:48 ` Shahab Vahedi
  0 siblings, 2 replies; 3+ messages in thread
From: Shahab Vahedi @ 2020-01-04 12:07 UTC (permalink / raw)
  To: gdb

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()


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-08 13:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-04 12:07 Getting rid of "Cannot access memory at address ..." Shahab Vahedi
2020-01-08 13:03 ` Shahab Vahedi
2020-01-08 13:48 ` Shahab Vahedi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox