Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 230903 - FEAT: dwfl_module_addrname() should also return lowpc+highpc
Summary: FEAT: dwfl_module_addrname() should also return lowpc+highpc
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: elfutils
Version: rawhide
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Roland McGrath
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 173278 229424
TreeView+ depends on / blocked
 
Reported: 2007-03-04 15:32 UTC by Jan Kratochvil
Modified: 2007-11-30 22:11 UTC (History)
3 users (show)

Fixed In Version: 0.127-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-04-19 18:28:20 UTC


Attachments (Terms of Use)

Description Jan Kratochvil 2007-03-04 15:32:27 UTC
Description of problem:
If DIE is not available but dwfl_module_addrname() is still able to locate the
symbol it returns only its name.  It could definitely return its base address
(lowpc) and according to ST_SIZE != 0 it could also return its highpc.

Version-Release number of selected component (if applicable):
elfutils-0.126-1.i386

How reproducible:
Always.

Steps to Reproduce:
1. name = dwfl_module_addrname (mod, 0xdeadf00d);

Actual results:
name

Expected results:
GElf_Addr lowpc, highpc;
name = dwfl_module_addrname (mod, 0xdeadf00d, &lowpc, &highpc);
if (name != NULL)
  process_lowpc (lowpc);
if (name != NULL && highpc != 0)
  process_highpc (highpc);

Additional info:
Patching dwfl_module_addrname() is trivia but some elfutils-wise API proposal
would be nice.

Comment 1 Roland McGrath 2007-03-04 21:43:58 UTC
I can add a similar call that takes an address but returns full info in the same
way as dwfl_module_getsym.

Comment 2 Jan Kratochvil 2007-03-04 21:59:42 UTC
Confirming I would like such API for these needs.  I hope it would
reuse/refactor some of the existing code of
dwfl_module_getsym()/gelf_getsymshndx() there.


Comment 3 Roland McGrath 2007-03-04 22:43:46 UTC
Of course it was already using that internally.  I've added the new
dwfl_module_addrsym call upstream, it was trivial.

Comment 4 Nurdin Premji 2007-03-26 17:29:43 UTC
Is the patch available?

Comment 5 Roland McGrath 2007-04-19 18:28:20 UTC
0.127 includes dwfl_module_addrsym


Note You need to log in before you can comment on or make changes to this bug.