summaryrefslogtreecommitdiff
path: root/extension_eppic.c
Commit message (Collapse)AuthorAge
* [PATCH] Close the dwfl handle before next invocation of init_dwarf_info().Mahesh J Salgaonkar2013-04-18
| | | | | | | | | | | | | | | | | | | | | | | | The init_dwarf_info() function initializes "dwarf_info.dwfl" handle everytime when it is called. The "dwarf_info.dwfl" handle should be freed once we are done with searching of desired debuginfo and before next invocation of init_dwarf_info(). Most of the functions (e.g get_debug_info()) that invokes init_dwarf_info() also invokes clean_dwfl_info() to free dwfl handle. But the function get_die_from_offset() that invokes init_dwarf_info(), does not free the dwfl handle and hence it keeps re-reading debuginfo ELF section into memory every time it is invoked until it starts failing with following errors: init_dwarf_info: Can't get first elf header of /usr/lib/debug/boot/vmlinux-x.x.x get_die_attr_type: Can't find the DIE. init_dwarf_info: Can't get first elf header of /usr/lib/debug/boot/vmlinux-x.x.x init_dwarf_info: Can't get first elf header of /usr/lib/debug/boot/vmlinux-x.x.x File eppic_macro/key.c, line 32, Error: Oops! Var ref1.[keyring_name_hash] This patch makes sure that clean_dwfl_info() is called once we are done with the debuginfo search. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
* [PATCH] Add support to module symbols.Aravinda Prasad2013-03-18
| | | | | | | | | | | | | Current version of makedumpfile/eppic integration patches works only for symbols in vmlinux. This patch adds support to module symbols. I have tested the patch on dynamically linked version of makedumpfile with EPPIC_LEGACY_MODE=1. However it should work on non-legacy mode also. Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
* [PATCH v4 8/9] Hack for the limitation when compiled with -static.Aravinda Prasad2013-02-05
| | | | | | | | | | | | | | | | | | | | For programs compiled with -static option, there is no dynamic section in the ELF file. Hence, the functions in the main executable cannot be invoked by dynamically loaded libraries as they cannot be resolved. The eppic extension for makedumpfile, which is dynamically loaded when -eppic flag is specified, needs to call few functions in makedumpfile. This will not work if makedumpfile is compiled with -static flag. This patch is a hack which overcomes this limitation by passing the address of the functions required by the dynamically loaded library, eppic_makedumpfile.so, during initialization. The dynamically loaded library branches to the function address eliminating the need to resolve functions. Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
* [PATCH v4 7/9] Support fully typed symbol access mode.Aravinda Prasad2013-02-05
| | | | | | | | | | | | | | | | | | | | | Eppic enables access to symbols in two ways. The first, is a more natural mode in that it makes symbols available as fully typed entities. The second, is generic and treats all symbols as an address to data which then needs to be cast to the proper type explicitly. The former obviously enables an easier cut & pasting of target code into eppic code. Currently generic symbol access mode is supported. This patch extends the functionality to include support for fully typed symbol access mode (which will be the default mode) in eppic macros. User can switch to generic symbol access mode by setting the following environmental variable - EPPIC_LEGACY_MODE. libeppic.a will take care of handling EPPIC_LEGACY_MODE. libeppic.a will pass NULL to VALUE_S* argument of apigetval() call back function if EPPIC_LEGACY_MODE is set. Refer to http://code.google.com/p/eppic/ for more information. Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
* [PATCH v4 6/9] Extend eppic built-in functions to include memset function.Aravinda Prasad2013-02-05
| | | | | | | | | | | The memset function will be used to specify the virtual address and the length of the data to be scrubbed in the dump file from the eppic macro. makedumpfile will convert these requests into filter_info nodes which will be enqueued for filtering. Existing makedumpfile functionality reads the filter_info nodes and scrubs the data accordingly. Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
* [PATCH v4 5/9] Implement apimember and apigetrtype call back functions.Aravinda Prasad2013-02-05
| | | | | | | | | | | | | | | The patch includes functionality for apimember and apigetrtype eppic callback routines along with helper functions to fetch information related to the member of the structure/union Whenever a structure/union member is accessed inside the eppic macro, eppic will query makedumpfile through call back functions requesting more information on the structure or union member. The information includes member name, offset from structure, data type and size. makedumpfile will get all these information using DWARF and pass back to eppic using libeppic API calls. Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
* [PATCH v4 4/9] Implement apigetctype call back function.Aravinda Prasad2013-02-05
| | | | | | | | | | libeppic will call apigetctype call back function whenever it encounters a token in the eppic macro. The call back function will use DWARF to query information related to the requested token and will pass it back to eppic using libeppic API calls. If the token does not exist, then apigetctype call returns 0. Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
* [PATCH v4 3/9] Eppic call back functions to query a dump image.Aravinda Prasad2013-02-05
| | | | | | | | | | | | | This patch implements a series of apigetuint* call back functions which are used to access data from the dump image. Eppic uses these call back functions to fetch the actual value of the global variables. This patch also adds other call back functions as a place holder which will be implemented in later patches. This is mainly to avoid compilation error while registering the call back functions using eppic_apiset() function. Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
* [PATCH v4 1/9] Initialize and setup eppic.Aravinda Prasad2013-02-05
This patch contains routines which initialize eppic and register call back function which will be called whenever a new eppic macro is loaded using eppic_load() API. The registered call back function executes the eppic macro as soon as it is loaded. Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>