FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 01-29-2009, 07:56 PM
Dave Anderson
 
Default crash: load of module types LKCD_KERNTYPES

----- "Cliff Wickman" <cpw@sgi.com> wrote:

> This patch allows additional kerntypes files to be loaded as module
> debuginfo (namelist) files.
>
> It's a bit of a kludge, as sym -s module <file> still requires
> that these types be associated with a loaded module. (but its use
> would only be desirable when there are loaded modules, so that
> restriction should not be a problem)

The patch looks fine (segregated), and I've queued it for the next release.

But I'm not entirely clear what you mean by the comment above? You've
got this kerntypes object file that was created from a kernel module, and
you can load its debuginfo data individually with "mod -s module kerntypes".
What's the kludge again?

Dave

>
> Tested against a live 2.6.27 kernel.
> Diffed against crash-4.0-7.6
>
> Signed-off-by: Cliff Wickman <cpw@sgi.com>
>
> ---
> symbols.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> Index: crash-4.0-7.6.ia64/symbols.c
> ================================================== =================
> --- crash-4.0-7.6.ia64.orig/symbols.c
> +++ crash-4.0-7.6.ia64/symbols.c
> @@ -7992,8 +7992,12 @@ load_module_symbols(char *modref, char *
> error(FATAL, "cannot determine object file format: %s
",
> namelist);
>
> - if (!(bfd_get_file_flags(mbfd) & HAS_SYMS))
> - error(FATAL, "no symbols in object file: %s
",
> namelist);
> + if (LKCD_KERNTYPES() && file_elf_version(namelist) ==
> EV_DWARFEXTRACT) {
> + goto add_symbols; /* no symbols, add the debuginfo */
> + }
> +
> + if (!(bfd_get_file_flags(mbfd) & HAS_SYMS))
> + error(FATAL, "no symbols in object file: %s
", namelist);
>
> symcount = bfd_read_minisymbols(mbfd, FALSE, &minisyms, &size);
> if (symcount < 0)

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 01-29-2009, 08:42 PM
Dave Anderson
 
Default crash: load of module types LKCD_KERNTYPES

----- Forwarded Message -----
From: "Cliff Wickman" <cpw@sgi.com>
To: "Dave Anderson" <anderson@redhat.com>
Sent: Thursday, January 29, 2009 4:23:22 PM GMT -05:00 US/Canada Eastern
Subject: Re: [PATCH] crash: load of module types LKCD_KERNTYPES

Hi Dave,

On Thu, Jan 29, 2009 at 03:43:03PM -0500, Dave Anderson wrote:
>
> ----- "Cliff Wickman" <cpw@sgi.com> wrote:
>
> > This patch allows additional kerntypes files to be loaded as module
> > debuginfo (namelist) files.
> >
> > It's a bit of a kludge, as sym -s module <file> still requires
> > that these types be associated with a loaded module. (but its use
> > would only be desirable when there are loaded modules, so that
> > restriction should not be a problem)
>
> The patch looks fine (segregated), and I've queued it for the next release.
>
> But I'm not entirely clear what you mean by the comment above? You've
> got this kerntypes object file that was created from a kernel module, and
> you can load its debuginfo data individually with "mod -s module kerntypes".
> What's the kludge again?

Ok, not a kludge if the kerntypes was built from the module that you
name in the mod -s command.
But I would lump together the types from hundreds of modules into a
single compact file that I can load if needed. When I mod -s this file
it has to be associated with some loaded module.

-Cliff


>
> >
> > Tested against a live 2.6.27 kernel.
> > Diffed against crash-4.0-7.6
> >
> > Signed-off-by: Cliff Wickman <cpw@sgi.com>
> >
> > ---
> > symbols.c | 8 ++++++--
> > 1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > Index: crash-4.0-7.6.ia64/symbols.c
> > ================================================== =================
> > --- crash-4.0-7.6.ia64.orig/symbols.c
> > +++ crash-4.0-7.6.ia64/symbols.c
> > @@ -7992,8 +7992,12 @@ load_module_symbols(char *modref, char *
> > error(FATAL, "cannot determine object file format: %s
",
> > namelist);
> >
> > - if (!(bfd_get_file_flags(mbfd) & HAS_SYMS))
> > - error(FATAL, "no symbols in object file: %s
",
> > namelist);
> > + if (LKCD_KERNTYPES() && file_elf_version(namelist) ==
> > EV_DWARFEXTRACT) {
> > + goto add_symbols; /* no symbols, add the debuginfo */
> > + }
> > +
> > + if (!(bfd_get_file_flags(mbfd) & HAS_SYMS))
> > + error(FATAL, "no symbols in object file: %s
", namelist);
> >
> > symcount = bfd_read_minisymbols(mbfd, FALSE, &minisyms, &size);
> > if (symcount < 0)

--
Cliff Wickman
Silicon Graphics, Inc.
cpw@sgi.com
(651) 683-3824

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

Thread Tools




All times are GMT. The time now is 02:28 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org