diff options
Diffstat (limited to 'libdwfl')
-rw-r--r-- | libdwfl/=ideas | 16 | ||||
-rw-r--r-- | libdwfl/=oops | 88 | ||||
-rw-r--r-- | libdwfl/ChangeLog | 9 | ||||
-rw-r--r-- | libdwfl/cu.c | 4 | ||||
-rw-r--r-- | libdwfl/dwfl_error.c | 6 | ||||
-rw-r--r-- | libdwfl/dwfl_module.c | 2 | ||||
-rw-r--r-- | libdwfl/dwfl_module_getdwarf.c | 2 | ||||
-rw-r--r-- | libdwfl/lines.c | 4 | ||||
-rw-r--r-- | libdwfl/relocate.c | 4 |
9 files changed, 115 insertions, 20 deletions
diff --git a/libdwfl/=ideas b/libdwfl/=ideas new file mode 100644 index 00000000..bdce3253 --- /dev/null +++ b/libdwfl/=ideas @@ -0,0 +1,16 @@ +* dev+ino+mtime hash table, global +** share fd; if !isrel, share Elf*,Ebl*,Dwarf* + +* find_debuginfo + When local search fails, try "yum install-debugfor elf-file". + i.e., yum install `rpm -qf elffile --qf '%{SOURCERPM} %{V}-%{R} %{ARCH}\n' | awk '{ print substr($1, 1, length($1)-length("-" $2 ".src.rpm")) "-debuginfo-" $2 "." $3 }' ` + done in rpm-python inside yum(?) +** all yum ops should have a -qf mode, means `rpm -qf --qf %{name}.%{arch}` + plus debug-of modifier to name.arch or -qf * + +* libdw_findcu reads all cu hdrs from beginning +** good for dwarf_offdie: find cu containing that offset +** bad for dwarf_addrdie: reads in whole debuginfo file +** when from aranges (dwarf_addrdie), could read cuhdr offset directly w/o scan +*** aranges really store cu header offset, but libdw adds in header size to + get cu die offset; but libdw_findcu interning should start with header diff --git a/libdwfl/=oops b/libdwfl/=oops new file mode 100644 index 00000000..bba65b08 --- /dev/null +++ b/libdwfl/=oops @@ -0,0 +1,88 @@ +* regexp on multiple formats to yield records (pc, mod, sym, offset, size?) + +glibc backtrace_symbols_fd: + +foo.so(sym+0x123)[0x345] +foo.so(sym-0x123)[0x345] +foobar[0x12345678] + + ======= Backtrace: ========= + /lib/libc.so.6[0x715124] + /lib/libc.so.6(__libc_free+0x77)[0x71565f] + ./loser[0x80483f8] + /lib/libc.so.6(__libc_start_main+0xdf)[0x6c6d5f] + ./loser[0x804832d] + +--> + (0x715124, "/lib/libc.so.6", , , ) + (0x71565f, "/lib/libc.so.6", "__libc_free", +0x77, ) + (0x80483f8, "./loser", , , ) + (0x6c6d5f, "/lib/libc.so.6", "__libc_start_main", +0xdf, ) + (0x804832d, "./loser", , , ) + + +i386 kernel oops: + + st_size +[<%x>] sym+0x123/0x32 +[<%x>] sym-0x123/0x32 +[<%x>] sym+0x123/0x32 [mod] + +
<1>Unable to handle kernel NULL pointer dereference at virtual address 00000000 +
printing eip: +
f8c54000 +
*pde = 2f36a001 +
Oops: 0002 [#2] +
SMP +
last sysfs file: /block/hdc/removable +
Modules linked in: oopsmod2(U) oopsmod(U) nfs lockd nfs_acl ipv6 lp ppdev autofs4 rfcomm l2cap bluetooth sunrpc video button battery ac parport_pc parport floppy ohci1394 ieee1394 hw_random e1000 snd_intel8x0 snd_ac97_codec snd_ac97_bus snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer i2c_i801 snd soundcore i2c_core ehci_hcd snd_page_alloc shpchp uhci_hcd dm_snapshot dm_zero dm_mirror dm_mod ext3 jbd ata_piix libata sd_mod scsi_mod +
CPU: 0 +
EIP: 0060:[<f8c54000>] Not tainted VLI +
EFLAGS: 00010286 (2.6.14-1.1773_FC5smp) +
EIP is at crasher+0x0/0xc [oopsmod2] +
eax: f8bd2000 ebx: f8c54380 ecx: f8c54380 edx: 00000001 +
esi: 00000000 edi: 00000000 ebp: eecb8000 esp: eecb8fa8 +
ds: 007b es: 007b ss: 0068 +
Process insmod (pid: 3454, threadinfo=eecb8000 task=f768eaa0) +
Stack: f8bd2006 c01393d7 083d8018 00000000 c0103f19 083d8018 000109ca 083d8008 +
00000000 00000000 bfc73888 ffffffda 0000007b c010007b 00000080 0059a402 +
00000073 00000206 bfc7381c 0000007b 00000000 00000000 +
Call Trace: +
[<f8bd2006>] init_crash+0x6/0x9 [oopsmod2] [<c01393d7>] sys_init_module+0xe2/0x205 +
[<c0103f19>] syscall_call+0x7/0xb + +--> + kernel-release "2.6.14-1.1773_FC5smp" + (0xf8c54000, "oopsmod2", "crasher", 0x0, 0xc) + (0xf8bd2006, "oopsmod2", "init_crash", +0x6, 0x9) + (0xc01393d7, "kernel", "sys_init_module", +0xe2, 0x205) + (0xc0103f19, "kernel", "syscall_call", +0x7, 0xb) + + +x86-64 oops: + +[<%x>] +<%x>{sym+%d} +<%x>{sym-%d} +<%x>{:mod:sym+%d} +<%x>{:mod:sym-%d} + +kernel `uname -r`: + +... Not tainted (%s) +... Tainted: [A-Z]* (%s) + + +* guess mod loadbase from sym+ofs==pc -> pc-(symval+ofs)==bias + +* for kernel +** seen-modules = "kernel", "mod", ... +** dwfl_linux_kernel_report_offline with predicate = member seen-modules +** intuit mod bases +** dwfl_report_end, dwfl_report_begin, dwfl_report_elf on seen-modules w/bases + +* for user +** seen-modules = files +** dwfl_report_offline on seen-modules +** intuit mod bases +** dwfl_report_end, dwfl_report_begin, dwfl_report_elf on seen-modules w/bases diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index dafa98c8..dd0b9b69 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,12 +1,3 @@ -2006-07-12 Ulrich Drepper <drepper@redhat.com> - - * cu.c: Adjust for internal_function_def removal. - * dwfl_error.c: Likewise. - * dwfl_module.c: Likewise. - * dwfl_module_getdwarf.c: Likewise. - * lines.c: Likewise. - * relocate.c: Likewise. - 2006-07-11 Ulrich Drepper <drepper@redhat.com> * dwfl_module.c (compare_modules): Don't return GElf_Sxword value, diff --git a/libdwfl/cu.c b/libdwfl/cu.c index 8f01ea6b..4c6d876e 100644 --- a/libdwfl/cu.c +++ b/libdwfl/cu.c @@ -248,7 +248,7 @@ intern_cu (Dwfl_Module *mod, Dwarf_Off cuoff, struct dwfl_cu **result) /* Traverse all the CUs in the module. */ Dwfl_Error -internal_function +internal_function_def __libdwfl_nextcu (Dwfl_Module *mod, struct dwfl_cu *lastcu, struct dwfl_cu **cu) { @@ -315,7 +315,7 @@ arangecu (Dwfl_Module *mod, struct dwfl_arange *arange, struct dwfl_cu **cu) } Dwfl_Error -internal_function +internal_function_def __libdwfl_addrcu (Dwfl_Module *mod, Dwarf_Addr addr, struct dwfl_cu **cu) { struct dwfl_arange *arange; diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c index 414fbaf4..891fbf71 100644 --- a/libdwfl/dwfl_error.c +++ b/libdwfl/dwfl_error.c @@ -1,5 +1,5 @@ /* Error handling in libdwfl. - Copyright (C) 2005, 2006 Red Hat, Inc. + Copyright (C) 2005 Red Hat, Inc. This file is part of Red Hat elfutils. Red Hat elfutils is free software; you can redistribute it and/or modify @@ -162,14 +162,14 @@ canonicalize (Dwfl_Error error) } int -internal_function +internal_function_def __libdwfl_canon_error (Dwfl_Error error) { return canonicalize (error); } void -internal_function +internal_function_def __libdwfl_seterrno (Dwfl_Error error) { int value = canonicalize (error); diff --git a/libdwfl/dwfl_module.c b/libdwfl/dwfl_module.c index 3ccf8b16..e3db1e06 100644 --- a/libdwfl/dwfl_module.c +++ b/libdwfl/dwfl_module.c @@ -64,7 +64,7 @@ nofree (void *arg __attribute__ ((unused))) } void -internal_function +internal_function_def __libdwfl_module_free (Dwfl_Module *mod) { if (mod->lazy_cu_root != NULL) diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c index 07248bf7..1688f1e4 100644 --- a/libdwfl/dwfl_module_getdwarf.c +++ b/libdwfl/dwfl_module_getdwarf.c @@ -319,7 +319,7 @@ find_symtab (Dwfl_Module *mod) /* Try to open a libebl backend for MOD. */ Dwfl_Error -internal_function +internal_function_def __libdwfl_module_getebl (Dwfl_Module *mod) { if (mod->ebl == NULL) diff --git a/libdwfl/lines.c b/libdwfl/lines.c index ed4267fc..49005a0d 100644 --- a/libdwfl/lines.c +++ b/libdwfl/lines.c @@ -1,5 +1,5 @@ /* Fetch source line info for CU. - Copyright (C) 2005, 2006 Red Hat, Inc. + Copyright (C) 2005 Red Hat, Inc. This file is part of Red Hat elfutils. Red Hat elfutils is free software; you can redistribute it and/or modify @@ -51,7 +51,7 @@ #include "../libdw/libdwP.h" Dwfl_Error -internal_function +internal_function_def __libdwfl_cu_getsrclines (struct dwfl_cu *cu) { if (cu->lines == NULL) diff --git a/libdwfl/relocate.c b/libdwfl/relocate.c index 96cedcc3..f0013e3b 100644 --- a/libdwfl/relocate.c +++ b/libdwfl/relocate.c @@ -55,7 +55,7 @@ typedef uint8_t GElf_Byte; We update the section header in place to cache the result. */ Dwfl_Error -internal_function +internal_function_def __libdwfl_relocate_value (Dwfl_Module *mod, size_t symshstrndx, Elf32_Word shndx, GElf_Addr *value) { @@ -97,7 +97,7 @@ __libdwfl_relocate_value (Dwfl_Module *mod, size_t symshstrndx, } Dwfl_Error -internal_function +internal_function_def __libdwfl_relocate (Dwfl_Module *mod, Elf *debugfile) { assert (mod->e_type == ET_REL); |