[Crash-utility] merge extension lib and crash into one binary?
Denman, Robert
Robert.Denman at Teradata.com
Mon Nov 5 14:17:21 UTC 2012
> -----Original Message-----
> From: crash-utility-bounces at redhat.com [mailto:crash-utility-
> bounces at redhat.com] On Behalf Of Dave Anderson
> Sent: Monday, November 05, 2012 5:57 AM
> To: Discussion list for crash utility usage, maintenance and development
> Subject: Re: [Crash-utility] merge extension lib and crash into one binary?
>
>
>
> ----- Original Message -----
> > Hi Dave,
> >
> > Is there any existed method for merging extension lib with crash into one
> binary?
> > Although library is flexible, people don't like to handy load
> > multi-libs, especially for those not crash experts...
>
> No, not really. You could take any extension module and build it into the crash
> binary by adding it to the Makefile's CFILES and OBJECT_FILES lists, and adding
> a stanza to compile it. But you would have to copy the help page data
> manually to help.c, and perhaps tinker with the extension module source file if
> necessary if there are any namespace collisions.
>
> If you don't want to hand-load extension modules, install them in one of the
> appropriate locations, and then use "crash -x ..."
> to load them all automatically during initialization.
>
> $ crash --help
> ...
>
> -x
> Automatically load extension modules from a particular directory.
> The directory is determined by the following order of precedence:
>
> (1) the directory specified in the CRASH_EXTENSIONS shell
> environment variable
> (2) /usr/lib64/crash/extensions (64-bit architectures)
> (3) /usr/lib/crash/extensions (32-bit architectures)
> (4) the ./extensions subdirectory of the current directory
>
> ...
>
> Dave
>
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
You can use the .crashrc for this purpose. I use it to auto-load all extensions and run a few setup commands.
# cat .crashrc
# default settings
extend /root/.extensions/sial.so
extend /root/.extensions/gcore.so
set emacs
sf
- Robert -
More information about the Crash-utility
mailing list