Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 147253 Details for
Bug 227167
libdwfl dwfl_module_addrname can't find symbol name for symbols with st_size=0.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to implement finding addrname of functions with st_size=0.
dwfl_module_addrname.patch (text/plain), 1.32 KB, created by
Nurdin Premji
on 2007-02-02 21:30:12 UTC
(
hide
)
Description:
Patch to implement finding addrname of functions with st_size=0.
Filename:
MIME Type:
Creator:
Nurdin Premji
Created:
2007-02-02 21:30:12 UTC
Size:
1.32 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P frysk >Index: frysk-imports/elfutils/libdwfl/dwfl_module_addrname.c >=================================================================== >RCS file: /cvs/frysk/frysk-imports/elfutils/libdwfl/dwfl_module_addrname.c,v >retrieving revision 1.1 >diff -u -r1.1 dwfl_module_addrname.c >--- frysk-imports/elfutils/libdwfl/dwfl_module_addrname.c 7 Aug 2006 22:11:09 -0000 1.1 >+++ frysk-imports/elfutils/libdwfl/dwfl_module_addrname.c 2 Feb 2007 21:23:59 -0000 >@@ -56,6 +56,9 @@ > if (syments < 0) > return NULL; > >+ GElf_Addr prev_value = 0; >+ const char *prev_name = NULL; >+ > /* Look through the symbol table for a matching symbol. */ > for (int i = 1; i < syments; ++i) > { >@@ -64,7 +67,23 @@ > if (name != NULL > && sym.st_value <= addr && addr < sym.st_value + sym.st_size) > return name; >+ >+ if (prev_value == 0) >+ prev_value = sym.st_value; >+ >+ //Playing blackjack find the closest symbol to the given address without going over. >+ if (sym.st_value > prev_value && sym.st_value <= addr) >+ { >+ prev_value = sym.st_value; >+ >+ //If this symbol doesn't have a size, it is a good candidate for the address. >+ //Otherwise it isn't. (It should have been caught above). >+ if (sym.st_size == 0) >+ prev_name = name; >+ else >+ prev_name = NULL; >+ } > } > >- return NULL; >+ return prev_name; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 227167
: 147253 |
147254