public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* Need help with StackAccessors needs to implement findProcInfo and  putProcInfo
@ 2007-03-01 21:17 Nurdin Premji
  2007-03-01 21:39 ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: Nurdin Premji @ 2007-03-01 21:17 UTC (permalink / raw)
  To: Frysk List

On the npremji-libunwind-20070228-branch

I've copied over the logic for the accessReg and accessMem accessor 
methods into StackAccessors. I have some work on the getProcName method 
using dwfl_addrname.

I now need to create logic for findProcInfo and putProcInfo methods.

I will not be able to use any of the libunwind UPT ptrace accessor 
methods as the PtraceAccessors class uses a proxy address space so it 
can call other accessor methods. The problem with this is that it seems 
as though findProcInfo calls accessMem, which won't work because it 
isn't being called in the thread that did the ptrace attach.

In short I need to implement findProcInfo and putProcInfo without 
relying on the UPT methods of the same name and I'm not sure what is 
involved in this.

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

* Re: Need help with StackAccessors needs to implement findProcInfo and  putProcInfo
  2007-03-01 21:17 Need help with StackAccessors needs to implement findProcInfo and putProcInfo Nurdin Premji
@ 2007-03-01 21:39 ` Roland McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2007-03-01 21:39 UTC (permalink / raw)
  To: Nurdin Premji; +Cc: Frysk List

As I recall, those callbacks are dismally designed.  What you'll have to
figure out is how to hook back in to the DWARF-format grovelling code in
libunwind.  It doesn't look good, it's all so poorly structured.  I think
you'll have to cannibalize some code from the ptrace parts of libunwind,
because for no good reason it has parts of the DWARF format header parsing
there (and the different ia64 version).  libdwfl will take you from a PC to
getting the libelf handles open on the ELF files containing the .eh_frame
or .debug_frame section to point libunwind at. 

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

end of thread, other threads:[~2007-03-01 21:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-01 21:17 Need help with StackAccessors needs to implement findProcInfo and putProcInfo Nurdin Premji
2007-03-01 21:39 ` Roland McGrath

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