public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Phil Muldoon <pmuldoon@redhat.com>
Cc: Mark Wielaard <mark@klomp.org>, frysk@sourceware.org
Subject: Re: Roundtable, breakpoints and lots of unwinding (Was: meeting   2007-08-15 9:30 us east coast time)
Date: Wed, 22 Aug 2007 21:43:00 -0000	[thread overview]
Message-ID: <46CCADFB.40407@redhat.com> (raw)
In-Reply-To: <1187688075.3852.32.camel@dijkstra.wildebeest.org>

Mark Wielaard wrote:
>> mjw: bug fixes for stepping;
>>     
>
> - Currently we hook into this new unw_get_unwind_table through
> UnwindH.hxx (createProcInfoFromElfImage), this is called indirectly
> through the libunwind find_proc_info callback which wants to see the
> unwind_info filled in. The ElfImage used is created in
> UnwindAddressSpace.findProcInfo() through the private method
> getElfImage(long address) by getting the MemoryMap of the address from
> the Task and either mapping the map from the elf file into memory or if
> the section is the VDSO by creating an anonymous mmap and filling that
> through reading the address map and then passing it to the libunwind
> dwarf reader. Directly mmapping these sections seems wrong here since
> the sections should already be available through the memory buffers of
> the proc we are inspecting (which might already have mapped in those
> sections). So it would be better to use the libunwind addressspace
> accessors that go through the ByteBuffers also for this. This might mean
> another change in the libunwind interface so all remote memory accesses
> go through the same hooks (although unw_get_unwind_table already
> provides an unw_address_space as argument, so I might be missing
> something).
>
>   

This strikes me as especially worry-some in core file unwinding. Why 
would you want to mmap at all anything? All access to any memroy/maps in 
a core file case should be done via .getMemory(). It should be left to  
the CorefileByteBuffer to arbitrate whether it can find the memory 
address in the core file and return that, or go to the relevant solib 
and get it for you. It is the only thing that has the sufficient 
meta-data, and thus smarts to make that decision.

Maybe I misunderstood, but other than the initial "beginning" of the 
unwind, the unwind code might be mmap'ing the library in directly?

Nice write up, by the way. This is ideal blogging material.

Regards

Phil

  reply	other threads:[~2007-08-22 21:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-15  1:32 meeting 2007-08-15 9:30 us east coast time Andrew Cagney
2007-08-15 13:20 ` Andrew Cagney
2007-08-15 17:52   ` Andrew Cagney
2007-08-21  9:21   ` Roundtable, breakpoints and lots of unwinding (Was: meeting 2007-08-15 9:30 us east coast time) Mark Wielaard
2007-08-22 21:43     ` Phil Muldoon [this message]
2007-08-15 15:56 ` meeting 2007-08-15 9:30 us east coast time Andrew Cagney

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=46CCADFB.40407@redhat.com \
    --to=pmuldoon@redhat.com \
    --cc=frysk@sourceware.org \
    --cc=mark@klomp.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).