Re: GDB reading eh_frame/eh_frame_hdr from disk

Sterling Augustine via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAEG7qUwfui4dPbjjOHAHpmi_09eTg53nqQ0QkHBcHJgHDeyYHQ@mail.gmail.com>
The command:

set trust-readonly-sections [on|off]

toggles reading from memory vs reading from disk. The default is off, so
unless you have a weird target or a strange script, you should be getting
it from memory already. But it isn't hard to change to see if that fixes
your problem.



On Mon, Jun 22, 2020 at 11:08 AM Simon Marchi <[email protected]> wrote:

> On 2020-06-18 6:37 p.m., Mitch Souders wrote:
> > Is there any way to tell gdb to use the in-memory representation from the
> > inferior of the .eh_frame/.eh_frame_hdr sections when doing stack
> > unwinding? As best I can determine, gdb always reaches out to disk to
> find
> > .eh_frame/.eh_frame_hdr to do stack unwinding. Our product is doing some
> > runtime manipulation of these sections and gdb's current behavior is
> > undesired.
>
> If the section is allocated in the process, then I'd expect GDB to read
> it from memory (when there's a process).  You would need to step into
> GDB when it's doing one such read to see which target ends up handling
> the memory read.
>
> Simon
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.