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 298703 Details for
Bug 438263
dwfl_module_getdwarf.c doesn't find debuginfo if there is a .dynsym
[?]
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.
reproducer source
438263.c (text/x-csrc), 1.52 KB, created by
Stan Cox
on 2008-03-20 15:22:39 UTC
(
hide
)
Description:
reproducer source
Filename:
MIME Type:
Creator:
Stan Cox
Created:
2008-03-20 15:22:39 UTC
Size:
1.52 KB
patch
obsolete
>#include <inttypes.h> >#include <sys/types.h> >#include <sys/stat.h> >#include <fcntl.h> >#include <stdio.h> >#include <stdio_ext.h> >#include <stdlib.h> >#include <string.h> >#include <error.h> >#include <locale.h> >#include <argp.h> >#include <dwarf.h> >#include <libdwfl.h> > >void >check_it (int code, char *routine) { > if (code == 1) { > printf ("%s failed.", routine); > abort(); > } >} > >int >main () >{ > Dwfl_Module * dwfl_module_ptr; > char *fname = {"/tmp/which-dir/usr/bin/which"}; > static char *flags = {"/tmp/which-dir/usr/lib/debug/usr/bin/"}; > int fd = open (fname, O_RDONLY); > check_it (fd < 0, "open"); > static Dwfl_Callbacks callbacks = { > &dwfl_linux_proc_find_elf, > &dwfl_standard_find_debuginfo, > NULL, > &flags, > }; > Dwfl *dwfl = dwfl_begin (&callbacks); > check_it (dwfl == NULL, "dwfl_begin"); > check_it (dwfl_report_offline (dwfl, "test", fname, fd) == NULL, "dwfl_report_offline"); > dwfl_report_end (dwfl, NULL, NULL); > dwfl_module_ptr = dwfl_report_offline (dwfl, fname, fname, -1); > int sym_count = dwfl_module_getsymtab(dwfl_module_ptr); > check_it (sym_count < 0, "dwfl_module_getsymtab"); > int found_main = 0; > for (int i = 0; i < sym_count; i++) { > GElf_Sym sym; > GElf_Word shndxp; > > char *sym_str = dwfl_module_getsym (dwfl_module_ptr, i, &sym, &shndxp); > if (strcmp(sym_str, "main") == 0) { > found_main = 1; > } > // printf ("%s\n", sym_str); > } > if (! found_main) { > printf ("FAIL: did not find main so probably did not find which.debuginfo\n"); > return 1; > } > else > return 0; >}
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 Raw
Actions:
View
Attachments on
bug 438263
: 298703 |
298704
|
299049