Loading debuginfo symbols

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I would like to be able to load symbols from a specific debuginfo directory using
'mod -S <dir>'.  This works if you unpack the corresponding kernel rpm too but I'd
like to be able to save on the disk space by just using the debuginfo rpm.  This
currently doesn't work because crash doesn't explicitly search for modules ending
in .ko.debug.  The simple patch below adds this support.  Is this a sensible change
to make or is there a better way to do this?

Lachlan

diff -up crash-5.1.9/kernel.c.orig crash-5.1.9/kernel.c
--- crash-5.1.9/kernel.c.orig	2011-11-08 14:15:51.467399576 +1100
+++ crash-5.1.9/kernel.c	2011-11-09 14:26:23.264253341 +1100
@@ -3588,7 +3588,10 @@ module_objfile_search(char *modref, char
 			{
 			case KMOD_V2:
 				sprintf(file, "%s.ko", modref);
-				retbuf = search_directory_tree(tree, file, 1);
+				if (!(retbuf = search_directory_tree(tree, file, 1))) {
+					sprintf(file, "%s.ko.debug", modref);
+					retbuf = search_directory_tree(tree, file, 1);
+				}
 			}
 		}
 		return retbuf;
@@ -3605,7 +3608,10 @@ module_objfile_search(char *modref, char
 			{
 			case KMOD_V2:
 				sprintf(file, "%s.ko", modref);
-				retbuf = search_directory_tree(dir, file, 0);
+				if (!(retbuf = search_directory_tree(dir, file, 0))) {
+					sprintf(file, "%s.ko.debug", modref);
+					retbuf = search_directory_tree(dir, file, 0);
+				}
 			}
 		}
 	}

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility


[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux